[go: up one dir, main page]

CN115996215A - Method and device for real-time data push - Google Patents

Method and device for real-time data push Download PDF

Info

Publication number
CN115996215A
CN115996215A CN202111176054.XA CN202111176054A CN115996215A CN 115996215 A CN115996215 A CN 115996215A CN 202111176054 A CN202111176054 A CN 202111176054A CN 115996215 A CN115996215 A CN 115996215A
Authority
CN
China
Prior art keywords
information
data
recommended
data transmission
transmission message
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.)
Pending
Application number
CN202111176054.XA
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111176054.XA priority Critical patent/CN115996215A/en
Publication of CN115996215A publication Critical patent/CN115996215A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

本申请实施例提供一种实时数据推送的方法和装置,该方法包括:接收的数据传输报文,所述数据传输报文包括直播数据流和第一信息,其中,所述第一信息封装在所述数据传输报文的头部,所述第一信息用于描述推荐的数据;根据所述第一信息,获取所述推荐的数据。本申请实施例通过将用于描述推荐的数据的第一信息封装在数据传输报文的头部,使得数据的推送不需要定制化的开发,有助于提高推送数据的时效性,降低数据推送的成本。

Figure 202111176054

Embodiments of the present application provide a method and device for real-time data push, the method comprising: a received data transmission message, the data transmission message includes a live data stream and first information, wherein the first information is encapsulated in In the header of the data transmission message, the first information is used to describe the recommended data; according to the first information, the recommended data is acquired. In the embodiment of the present application, the first information used to describe the recommended data is encapsulated in the header of the data transmission message, so that the push of data does not require customized development, which helps to improve the timeliness of pushing data and reduce data push the cost of.

Figure 202111176054

Description

实时数据推送的方法和装置Method and device for real-time data push

技术领域technical field

本申请实施例涉及互联网技术领域,尤其涉及一种实时数据推送的方法和装置。The embodiments of the present application relate to the technical field of the Internet, and in particular to a method and device for real-time data push.

背景技术Background technique

随着互联网技术的快速发展,互联网直播已经成为当今潮流。一般来说,主播终端可以将直播数据进行推流到服务器,然后观众终端从服务器进行直播数据的拉流。在直播的过程中,主播终端可以向观众终端推荐物品信息,相应的观众终端可以展示该推荐的物品信息。With the rapid development of Internet technology, Internet live streaming has become the current trend. Generally speaking, the anchor terminal can push the live data to the server, and then the audience terminal can pull the live data from the server. During the live broadcast, the anchor terminal can recommend item information to the audience terminals, and the corresponding audience terminals can display the recommended item information.

在直播数据的推拉流过程中,可以采用数据传输协议,例如实时消息传输协议(Real Time Messaging Protocol,RTMP)、网页即时通信(Web Real-Time Communication,WebRTC)、基于用户数据报协议(User Datagram Protocol,UDP)封装的私有协议来传输流媒体数据。当直播场景中推荐的物品包括金融产品时,由于金融产品不属于流媒体数据,因此一般是通过可扩展通讯和表示协议(Extensible Messaging and Presence Protocol,XMPP),或超文本传输协议(Hyper Text Transfer Protocol,HTTP)进行数据的传输。因此,金融产品的数据的推送需要定制化的开发,成本较高。因此,亟需一种低成本的数据推送方案。In the push-pull streaming process of live data, data transmission protocols can be used, such as Real Time Messaging Protocol (RTMP), Web Real-Time Communication (WebRTC), and User Datagram Protocol (UDP). Protocol, UDP) encapsulated private protocol to transmit streaming media data. When the items recommended in the live broadcast scene include financial products, since financial products do not belong to streaming media data, it is generally through Extensible Messaging and Presence Protocol (XMPP), or Hyper Text Transfer Protocol (Hyper Text Transfer) Protocol, HTTP) for data transmission. Therefore, the data push of financial products requires customized development, and the cost is relatively high. Therefore, there is an urgent need for a low-cost data push solution.

发明内容Contents of the invention

本申请实施例提供一种实时数据推送的方法和装置,通过将用于描述推荐的数据的第一信息封装在数据传输报文的头部,使得数据的推送不需要定制化的开发,有助于提高推送数据的时效性,降低数据推送的成本。The embodiment of the present application provides a method and device for real-time data push, by encapsulating the first information used to describe the recommended data in the head of the data transmission message, so that the data push does not require customized development, which is helpful To improve the timeliness of pushing data and reduce the cost of data pushing.

第一方面,本申请的实施例提供一种实时数据的推送方法,该方法包括:In a first aspect, an embodiment of the present application provides a method for pushing real-time data, the method comprising:

接收的数据传输报文,所述数据传输报文包括直播数据流和第一信息,其中,所述第一信息封装在所述数据传输报文的头部,所述第一信息用于描述推荐的数据;A received data transmission message, the data transmission message includes a live data stream and first information, wherein the first information is encapsulated in the header of the data transmission message, and the first information is used to describe the recommended The data;

根据所述第一信息,获取所述推荐的数据。Acquiring the recommended data according to the first information.

在一些可选的实施例中,该方法可以由第一设备执行,该第一设备可以接收来自第二设备的数据传输报文。In some optional embodiments, the method may be executed by the first device, and the first device may receive the data transmission packet from the second device.

可选的,该第一设备包括观众终端,第二设备包括服务器。或者,该第一设备包括服务器,所述第二设备包括主播终端,不做限定。Optionally, the first device includes a viewer terminal, and the second device includes a server. Alternatively, the first device includes a server, and the second device includes an anchor terminal, which is not limited.

在一些可选的实施例中,所述方法还包括:根据所述第一信息,发送所述推荐的数据,例如可以向第三设备发送该推荐的数据。In some optional embodiments, the method further includes: sending the recommended data according to the first information, for example, sending the recommended data to a third device.

在一些可选的实施例中,当第一设备包括服务器,第二设备包括主播终端时,第三设备包括观众终端。In some optional embodiments, when the first device includes a server, the second device includes an anchor terminal, and the third device includes an audience terminal.

在一些可选的实施例中,所述推荐的数据包括金融产品。In some optional embodiments, the recommended data includes financial products.

第二方面,本申请的实施例提供了一种实时数据推送的方法,包括:In a second aspect, the embodiments of the present application provide a method for real-time data push, including:

获取推荐的数据;Get recommended data;

确定第一信息,所述第一信息用于描述所述推荐的数据;determining first information, the first information being used to describe the recommended data;

发送数据传输报文,所述数据传输报文包括直播数据流和所述第一信息,所述第一信息封装在所述数据传输报文的头部。Sending a data transmission message, where the data transmission message includes the live data stream and the first information, and the first information is encapsulated in the header of the data transmission message.

在一些可选的实施例中,该方法可以由第二设备执行,该第二设备可以向第一设备发送该数据传输报文。In some optional embodiments, the method may be executed by the second device, and the second device may send the data transmission packet to the first device.

可选的,该第一设备包括观众终端,第二设备包括服务器。或者,该第一设备包括服务器,所述第二设备包括主播终端,不做限定。Optionally, the first device includes a viewer terminal, and the second device includes a server. Alternatively, the first device includes a server, and the second device includes an anchor terminal, which is not limited.

第三方面,提供了一种实时数据推送的装置,包括:In the third aspect, a device for pushing real-time data is provided, including:

收发单元,用于接收数据传输报文,所述数据传输报文包括直播数据流和第一信息,其中,所述第一信息封装在所述数据传输报文的头部,所述第一信息用于描述推荐的数据;A transceiver unit, configured to receive a data transmission message, the data transmission message includes a live data stream and first information, wherein the first information is encapsulated in the header of the data transmission message, and the first information Data used to describe recommendations;

处理单元,用于根据所述第一信息,获取所述推荐的数据。A processing unit, configured to acquire the recommended data according to the first information.

第四方面,提供了实时数据推送的装置,包括:In the fourth aspect, a real-time data push device is provided, including:

获取单元,用于获取推荐的数据;An acquisition unit, configured to acquire recommended data;

处理单元,用于确定第一信息,所述第一信息用于描述所述推荐的数据;a processing unit configured to determine first information for describing the recommended data;

收发单元,用于发送数据传输报文,所述数据传输报文包括直播数据流和所述第一信息,所述第一信息封装在所述数据传输报文的头部。The transceiver unit is configured to send a data transmission message, the data transmission message includes the live data stream and the first information, and the first information is encapsulated in the header of the data transmission message.

第五方面,提供了一种电子设备,其包括:处理器和存储器;In a fifth aspect, an electronic device is provided, which includes: a processor and a memory;

所述存储器,用于存储计算机程序;The memory is used to store computer programs;

所述处理器,用于执行所述计算机程序以实现前面所述的方法。The processor is configured to execute the computer program to implement the aforementioned method.

第六方面,提供了一种芯片,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的设备执行如前面所述的方法。According to a sixth aspect, a chip is provided, including: a processor, configured to invoke and run a computer program from a memory, so that a device installed with the chip executes the aforementioned method.

第七方面,提供了一种计算机可读存储介质,所述存储介质包括计算机指令,当所述指令被计算机执行时,使得所述计算机实现如前面所述的方法。In a seventh aspect, a computer-readable storage medium is provided, the storage medium includes computer instructions, and when the instructions are executed by a computer, the computer implements the method as described above.

第八方面,提供了一种计算机程序产品,包括计算机程序指令,当计算机程序指令在计算机上运行时,使得计算机执行前面所述的方法。In an eighth aspect, a computer program product is provided, including computer program instructions. When the computer program instructions are run on a computer, the computer is made to execute the aforementioned method.

本申请实施例通过将用于描述推荐的数据的第一信息封装在数据传输报文的头部,即采用与直播数据流相同的数据传输协议来推送第一信息,从而不需要定制化的开发来实现实时数据的推送,一方面可以有助于提高推送数据的时效性,另一方面可以降低推送实时数据的成本。In this embodiment of the present application, the first information used to describe the recommended data is encapsulated in the header of the data transmission message, that is, the same data transmission protocol as the live data stream is used to push the first information, so that no customized development is required To realize the push of real-time data, on the one hand, it can help to improve the timeliness of pushing data, and on the other hand, it can reduce the cost of pushing real-time data.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application.

图1是适用于本申请实施例的一种系统架构示意图;FIG. 1 is a schematic diagram of a system architecture applicable to an embodiment of the present application;

图2是本申请实施例提供的一种直播方法的示意性流程图;FIG. 2 is a schematic flow chart of a live broadcast method provided by an embodiment of the present application;

图3是本申请实施例提供的主播终端的显示界面的一个示例;Fig. 3 is an example of the display interface of the anchor terminal provided by the embodiment of the present application;

图4是本申请实施例提供的主播终端的显示界面的另一个示例;Fig. 4 is another example of the display interface of the anchor terminal provided by the embodiment of the present application;

图5是本申请实施例提供的RTMP报文的一个示例;Fig. 5 is an example of the RTMP message that the embodiment of the present application provides;

图6是本申请书实施例提供的解析后的索引信息的一个示例;Figure 6 is an example of the parsed index information provided by the embodiment of this application;

图7是本申请实施例提供的actor缓存池列表的一个示例;Fig. 7 is an example of the actor cache pool list provided by the embodiment of the present application;

图8是本申请实施例提供的一种实时数据推送的装置的示意性框图;FIG. 8 is a schematic block diagram of a device for pushing real-time data provided by an embodiment of the present application;

图9是本申请实施例提供的另一种实时数据推送的装置的示意性框图;FIG. 9 is a schematic block diagram of another device for pushing real-time data provided by an embodiment of the present application;

图10是本申请实施例提供的一种电子设备的示意性框图。Fig. 10 is a schematic block diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.

应理解,在本申请实施例中,“与A对应的B”表示B与A相关联。在一种实现方式中,可以根据A确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。It should be understood that in this embodiment of the present application, "B corresponding to A" means that B is associated with A. In one implementation, B may be determined from A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B may also be determined according to A and/or other information.

在本申请的描述中,除非另有说明,“至少一个”是指一个或多个,“多个”是指两个或多于两个。In the description of the present application, unless otherwise specified, "at least one" means one or more, and "plurality" means two or more than two.

另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not necessarily limit the difference.

为了便于理解本申请的实施例,首先对本申请实施例涉及到的相关概念进行如下简单介绍:In order to facilitate the understanding of the embodiments of the present application, firstly, the relevant concepts involved in the embodiments of the present application are briefly introduced as follows:

直播推流:指的是将采集阶段封包好的内容传输到服务器的过程,即将现场的音视频信号传到网络的过程。具体而言,可以对采集的音视频内容进行编码,并基于特定数据传输协议将编码后的音视频内容上传到服务器。Live streaming: refers to the process of transmitting the packaged content in the acquisition stage to the server, that is, the process of transmitting the live audio and video signals to the network. Specifically, the collected audio and video content can be encoded, and the encoded audio and video content can be uploaded to the server based on a specific data transmission protocol.

直播拉流:指的是对服务器已有直播内容用指定地址进行拉取的过程,即将网络上的音视频信号传到播放端的过程。具体而言,可以基于特定数据传输协议从服务器拉取音视频内容,并对该音视频内容进行解码播放。Live streaming: refers to the process of pulling the existing live content from the server with a specified address, that is, the process of transmitting the audio and video signals on the network to the playback terminal. Specifically, the audio and video content can be pulled from the server based on a specific data transmission protocol, and the audio and video content can be decoded and played.

示例性的,数据传输协议,例如RTMP、WebRTC、基于UDP封装的私有协议等,不做限定。Exemplarily, the data transmission protocol, such as RTMP, WebRTC, a private protocol based on UDP encapsulation, etc., is not limited.

金融产品数据(FinancialProductData,FPD):指直播场景下的金融产品数据结构。其中,金融产品包括证券、基金、股票、期权或其组合等,不做限定。FPD可以包括金融产品的标识ID、名称、最低金额、年利率、落地页统一资源定位器(Uniform ResourceLocator,URL)和时间限制中的至少一种。完整的金融产品需要配置完善的FPD。本申请实施例中,主播终端侧、服务器侧可以配置封装统一的FPD。Financial Product Data (Financial Product Data, FPD): refers to the financial product data structure in the live broadcast scene. Among them, financial products include securities, funds, stocks, options or their combinations, etc., without limitation. The FPD may include at least one of the identification ID, name, minimum amount, annual interest rate, uniform resource locator (Uniform ResourceLocator, URL) of the landing page and time limit of the financial product. A complete financial product requires a well-configured FPD. In this embodiment of the application, the anchor terminal side and the server side can be configured with a unified FPD package.

RTMP,基于传输控制协议(Transmission Control Protocol,TCP),是一个协议族,包括RTMP基本协议及RTMPT/RTMPS/RTMPE等多种变种。RTMP是一种设计用来进行实时数据通信的网络协议,主要用来在Flash/AIR平台和支持RTMP协议的流媒体/交互服务器之间进行音视频和数据通信。本申请实施例中,在RTMP协议头中传输用于指示金融产品或FPD的信息。RTMP, based on Transmission Control Protocol (TCP), is a protocol family, including RTMP basic protocol and various variants such as RTMPT/RTMPS/RTMPE. RTMP is a network protocol designed for real-time data communication. It is mainly used for audio, video and data communication between the Flash/AIR platform and streaming media/interactive servers that support the RTMP protocol. In the embodiment of the present application, the information used to indicate the financial product or FPD is transmitted in the RTMP protocol header.

actor对象:一个actor对象指的是一个最基本的计算单元。它能接收消息并且基于其执行计算。并且actor对象是具有状态的,可以自我控制或者由消息发送方控制状态。在本申请实施例中,actor对象与推荐的数据,例如金融产品(比如金融产品的FPD)关联,可以通过控制actor对象的状态为执行状态,来控制发送推荐的数据,例如金融产品的数据(比如FPD中的数据)。Actor object: An actor object refers to the most basic computing unit. It can receive messages and perform calculations based on them. And the actor object has a state, which can be self-controlled or controlled by the message sender. In the embodiment of this application, the actor object is associated with recommended data, such as financial products (such as FPD of financial products), and the sending of recommended data, such as financial product data ( Such as data in FPD).

下面将对本申请实施例的技术方案能够适用的应用场景做一些简单介绍。图1是本申请实施例适用的一种网络系统的示意图。如图1所示,该系统中包括至少一个主播终端101(图1中以1个为例)、至少一个观众终端102(图1中以3个为例)和服务器103。其中,主播终端101、观众终端102和服务器之间可以通过无线或有线网络连接。示例性的,主播终端101或观众终端102可以包括电脑、手机、平板电话、智能电视或者其他终端,服务器103可以为后台服务器,或者提供云计算或云存储服务的云服务器,本申请对此不做限定。The following briefly introduces the applicable application scenarios of the technical solutions of the embodiments of the present application. FIG. 1 is a schematic diagram of a network system to which the embodiment of the present application is applicable. As shown in FIG. 1 , the system includes at least one host terminal 101 (one is taken as an example in FIG. 1 ), at least one audience terminal 102 (three are taken as an example in FIG. 1 ) and a server 103 . Wherein, the anchor terminal 101, the audience terminal 102 and the server may be connected through a wireless or wired network. Exemplarily, the anchor terminal 101 or the audience terminal 102 may include computers, mobile phones, tablet phones, smart TVs or other terminals, and the server 103 may be a backend server, or a cloud server that provides cloud computing or cloud storage services, which is not discussed in this application. Do limited.

需要说明的是,本申请实施例以主播终端、观众终端为例对实施本申请实施例的直播方法的终端进行区别,但本申请实施例并不限于此,例如主播终端还可以称为第一终端,观众终端还可以称为第二终端,或者其他。It should be noted that the embodiment of the present application uses the anchor terminal and the audience terminal as examples to distinguish the terminals implementing the live broadcast method of the embodiment of the present application, but the embodiment of the present application is not limited thereto. For example, the anchor terminal can also be called the first terminal, the audience terminal may also be called a second terminal, or others.

作为示例,主播终端101或观众终端102上可以安装应用程序,主播终端101或观众终端102可以通过该应用程序,通过服务器103实现例如数据传输、消息交互等功能。可选的,该应用程序可以为操作系统中的应用程序,或者第三方提供的应用程序,不做限定。例如,该应该程序可以为直播应用程序,该直播应用程序具有视频直播的功能。可选的,该直播应用程序还可以具有其他功能,例如购物功能、音乐功能、游戏功能等,本申请对此不做限定。As an example, an application program can be installed on the host terminal 101 or the audience terminal 102, and the host terminal 101 or the audience terminal 102 can implement functions such as data transmission and message interaction through the server 103 through the application program. Optionally, the application program may be an application program in the operating system or an application program provided by a third party, without limitation. For example, the application program may be a live broadcast application, and the live broadcast application has a function of live video broadcasting. Optionally, the live broadcast application program may also have other functions, such as shopping functions, music functions, game functions, etc., which are not limited in this application.

需要说明的是,上面介绍的应用场景仅用于说明本申请实施例而非限定。在具体实施时,可以根据实际需要灵活地应用本申请实施例提供的技术方案。例如,本申请实施例可以还可以应用于定向消息推送,或者广告推送的场景,不作限定。It should be noted that the application scenarios described above are only used to illustrate the embodiments of the present application rather than limit them. During specific implementation, the technical solutions provided by the embodiments of the present application may be flexibly applied according to actual needs. For example, the embodiments of the present application may also be applied to targeted message push or advertisement push scenarios, which are not limited.

在直播的场景下,主播终端101和观众终端102可以基于账号登录直播应用程序,相应的主播终端101使用该直播应用程序进行直播,将采集的直播内容推流上传至服务器103实现直播推流,观众终端102通过该直播应用从服务器103拉取该直播内容实现直播拉流。在直播过程中,主播终端101可以向观众终端102推送实时数据,例如直播中推荐的物品的数据,金融产品的数据等,不作限定。目前,对于推荐的物品包括金融产品的情况,需要进行定制化的开发,例如通过XMPP、或HTTP协议进行数据的传输,维护成本较高。In the live broadcast scenario, the anchor terminal 101 and the audience terminal 102 can log in to the live broadcast application program based on the account number, and the corresponding anchor terminal 101 uses the live broadcast application program to perform live broadcast, and uploads the collected live content push stream to the server 103 to realize live push stream, The viewer terminal 102 pulls the live broadcast content from the server 103 through the live broadcast application to realize live streaming. During the live broadcast, the host terminal 101 may push real-time data to the audience terminal 102, such as data of items recommended in the live broadcast, data of financial products, etc., without limitation. At present, when the recommended items include financial products, customized development is required, such as data transmission through XMPP or HTTP protocol, and the maintenance cost is relatively high.

有鉴于此,本申请实施例提供了一种实时数据的推送方法,在该方法中,可以在包含直播数据流的数据传输报文(例如头部)中封装第一信息,该第一信息用于描述推荐的数据,从而实现对该实时数据的推送。由于本申请实施例将用于描述推荐的数据的第一信息封装在数据传输报文(例如头部)中,因此不需要定制化的开发即可实现实时数据推送,一方面能够有助于提高推送数据的时效性,另一方面有助于降低数据推送的成本。In view of this, the embodiment of the present application provides a method for pushing real-time data, in this method, the first information can be encapsulated in the data transmission message (such as the header) containing the live data stream, and the first information is used It is used to describe the recommended data, so as to realize the push of the real-time data. Since the embodiment of the present application encapsulates the first information used to describe the recommended data in a data transmission message (such as a header), real-time data push can be realized without customized development, and on the one hand, it can help to improve The timeliness of pushing data, on the other hand, helps to reduce the cost of data pushing.

示例性的,该推荐的数据例如为直播过程中推荐的物品(比如金融产品),或广告消息,或定向消息等,不作限定。Exemplarily, the recommended data is, for example, items recommended during the live broadcast (such as financial products), or advertising messages, or directional messages, etc., without limitation.

图2示出了本申请实施例提供的一种实时数据推送的方法200的示意性流程图。方法200中的主播终端例如可以为图1中的主播终端101,观众终端例如可以为图1中的观众终端102,服务器例如可以为图1中的服务器103,不做限定。如图2所示,方法200包括步骤210至250。FIG. 2 shows a schematic flowchart of a method 200 for pushing real-time data provided by an embodiment of the present application. The anchor terminal in method 200 may be, for example, the anchor terminal 101 in FIG. 1 , the audience terminal may be, for example, the audience terminal 102 in FIG. 1 , and the server may be, for example, the server 103 in FIG. 1 , without limitation. As shown in FIG. 2 , method 200 includes steps 210 to 250 .

210,主播终端获取推荐的数据。210. The anchor terminal acquires recommended data.

示例性的,在直播过程中,主播终端侧的主播(用户的一个示例)可以根据当前直播讲解的内容,实时操作主播终端以输入推送(推荐)的产品,或者在开播前通过操作主播终端预设推送的产品。响应于主播的操作,主播终端获取推荐的产品。作为一个示例,主播推荐的物品可以包括金融产品,此时该推荐的数据包括金融产品。Exemplarily, during the live broadcast, the anchor on the anchor terminal side (an example of the user) can operate the anchor terminal in real time to input pushed (recommended) products according to the content explained in the current live broadcast, or operate the anchor terminal to preview Set the product to push. In response to the host's operation, the host terminal acquires recommended products. As an example, the items recommended by the host may include financial products, and in this case, the recommended data includes financial products.

在一些可选的实施例中,当推荐的数据包括金融产品时,主播终端可以根据推荐的金融产品的FPD,显示金融产品。然后,通过第一输入区域获取用户输入的推送指令,该推送指令用于指示推送所述金融产品。根据该推送指令,主播终端可以确定推荐该金融产品。可选的,主播终端可以在界面上显示该第一输入区域,相应的用户可以通过点击或触摸该第一输入区域来输入推送指令。In some optional embodiments, when the recommended data includes financial products, the anchor terminal can display the financial products according to the FPD of the recommended financial products. Then, a push instruction input by the user is acquired through the first input area, and the push instruction is used to instruct to push the financial product. According to the push instruction, the host terminal can determine to recommend the financial product. Optionally, the host terminal may display the first input area on the interface, and the corresponding user may input push instructions by clicking or touching the first input area.

如表1所示,FPD可以包括金融产品的标识ID、名称、最低金额、年利率、落地页统一资源定位器(Uniform Resource Locator,URL)和时间限制中的至少一种。As shown in Table 1, the FPD may include at least one of the identification ID, name, minimum amount, annual interest rate, Uniform Resource Locator (Uniform Resource Locator, URL) of the landing page and time limit of the financial product.

表1Table 1

字段名称Field Name 说明illustrate productIDproductID 产品IDProduct ID productNameproductName 产品名称product name minAmountminAmount 最低金额minimum amount rateOfYearrateOfYear 年利率annual interest rate deatailUrldeatailUrl 落地页UrlLanding page Url timeLimittimeLimit 时间限制time limit

图3示出了主播终端显示界面的一个示例。如图3所示,主播终端可以根据预先存储的FPD,显示至少一个(图3中为2个)金融产品,例如可以显示每个金融产品的数据,例如产品名称、最低金额、年利率、时间限制等信息。可选的,主播终端还可以为每个金融产品显示一个“推送”按钮(即输入区域的一个示例)。当主播推荐一个金融产品时,可以点击或触摸该金融产品对应的“推送”按钮。响应于点击或触摸该“推送”按钮,主播终端可以获取推送指令,确定该“推送”按钮对应的金融产品为推荐的金融产品。Fig. 3 shows an example of the display interface of the anchor terminal. As shown in Figure 3, the anchor terminal can display at least one (two in Figure 3) financial products according to the pre-stored FPD, for example, the data of each financial product can be displayed, such as product name, minimum amount, annual interest rate, time Restrictions and other information. Optionally, the anchor terminal can also display a "push" button (that is, an example of the input area) for each financial product. When the host recommends a financial product, he can click or touch the "push" button corresponding to the financial product. In response to clicking or touching the "Push" button, the anchor terminal can obtain a push instruction, and determine that the financial product corresponding to the "Push" button is a recommended financial product.

作为一种可能的实现方式,主播终端可以内置创建FPD工具(tool)。当主播终端即将开始直播,或者在直播过程中,可以基于创建FPDtool,构造FPD,或修改FPD。示例性的,如图4所示,创建FPDtool可以通过界面,向主播终端显示多个关联产品的名称,和/或者金融产品的其他信息,例如最低金额、年利率、时间限制、风险等级等。用户(例如主播)可以从这多个关联产品中,选择一个或多个金融产品(例如在图4中选择了山西证券超短债券C)。响应于用户的选择,创建FPDtool建立该金融产品的FPD。As a possible implementation, the anchor terminal may have a built-in FPD creation tool (tool). When the host terminal is about to start live broadcast, or in the process of live broadcast, it can construct FPD or modify FPD based on the creation of FPDtool. Exemplarily, as shown in Figure 4, the creation of FPDtool can display the names of multiple associated products and/or other information of financial products, such as minimum amount, annual interest rate, time limit, risk level, etc., to the anchor terminal through the interface. A user (such as an anchor) can select one or more financial products from these multiple related products (for example, Shanxi Securities ultra-short bond C is selected in Figure 4). Create FPDtool builds the FPD of the financial product in response to the user's selection.

在一些可选的实施例中,主播可以输入推送数据的时间、种类和接收人群等。示例性的,主播可以输入事件或时间信息,来指示推送数据的时间、种类或接收人群。相应的,主播终端可以获取该事件或时间信息。也就是说,当在直播过程中,到达某个(或某些)事件或时间后,可以向观众终端推送数据。示例性的,对于不同的观众人群,服务器将推送不同的数据,例如物品或金融产品,该物品或金融产品例如是由主播当前进行讲解的物品或金融产品。In some optional embodiments, the host can input the time, type, and recipient groups of the data to be pushed. Exemplarily, the anchor can input event or time information to indicate the time, type or recipients of the data to be pushed. Correspondingly, the anchor terminal can acquire the event or time information. That is to say, when a certain (or some) event or time is reached during the live broadcast, data can be pushed to the audience terminal. Exemplarily, for different audience groups, the server will push different data, such as items or financial products, such as items or financial products currently explained by the anchor.

作为示例,事件或时间信息可以包括如下一项或多项:As an example, event or time information may include one or more of the following:

1)用户关注了主播(即用户在观众终端的直播应用程序上登录的账户关注了主播在主播终端的直播应用程序上登录的账户);1) The user has followed the anchor (that is, the account logged in by the user on the live broadcast application of the audience terminal has followed the account logged in by the anchor on the live broadcast application of the anchor terminal);

2)用户观看直播的时间到达了一定的时长(即观众终端播放该主播终端的直播数据流的时间达到了一定的时长);2) The time for the user to watch the live broadcast reaches a certain length of time (that is, the time for the audience terminal to play the live data stream of the anchor terminal reaches a certain length of time);

3)用户进入直播的观看次数达到了某个量(即观众终端播放该主播终端的直播数据流的次数)3) The number of times the user has watched the live broadcast reaches a certain amount (that is, the number of times the audience terminal plays the live data stream of the anchor terminal)

4)到达某个特定的时间点。4) Arrive at a certain point in time.

220,主播终端获取第一信息。220. The anchor terminal acquires first information.

其中,第一信息用于描述推荐的数据,即步骤210中获取的推荐的数据,例如可以为物品或金融产品。Wherein, the first information is used to describe recommended data, that is, the recommended data obtained in step 210, for example, may be items or financial products.

在一些可选的实施例中,第一信息包括所推荐的数据的类型信息、时间信息和业务信息中的至少一种。其中,类型信息可以用于指示推荐的数据的类型,时间信息可以指推荐的数据的有效的时间段,业务信息可以用于指示推荐的数据的业务内容。In some optional embodiments, the first information includes at least one of recommended data type information, time information, and service information. Wherein, the type information may be used to indicate the type of the recommended data, the time information may be used to indicate the effective time period of the recommended data, and the service information may be used to indicate the service content of the recommended data.

示例性的,当推荐的数据包括金融产品时,金融产品的类型包括证券、基金、股票、期权或其组合等。作为一个示例,类型信息可以包括数据通信协议信息,其中所述数据通信协议信息与推荐的数据的类型对应。例如,当传输的类型信息以codeM://v17开头时,该推荐的金融产品为证券。Exemplarily, when the recommended data includes financial products, the types of financial products include securities, funds, stocks, options or combinations thereof. As an example, the type information may include data communication protocol information, wherein the data communication protocol information corresponds to the type of recommended data. For example, when the transmitted type information starts with codeM://v17, the recommended financial product is securities.

示例性的,当推荐的数据包括金融产品时,业务信息可以指示金融产品的数据,例如FPD。作为具体的例子,业务信息可以包括金融产品(或FPD)的ID,名称,或索引等信息中的至少一种,不做限定。Exemplarily, when the recommended data includes financial products, the service information may indicate data of financial products, such as FPD. As a specific example, the business information may include at least one of information such as ID, name, or index of the financial product (or FPD), which is not limited.

在一些可选的实施例中,主播终端还可以获取服务器下发的公钥,并根据该公钥,对第一信息进行加密。也就是说,第一信息可以是经过加密之后的信息。可选的,主播终端可以预先获取服务器下发的公钥,并保存该公钥。In some optional embodiments, the anchor terminal may also obtain a public key delivered by the server, and encrypt the first information according to the public key. That is to say, the first information may be encrypted information. Optionally, the anchor terminal can obtain the public key issued by the server in advance, and save the public key.

作为示例,主播终端可以将金融产品数据的索引,比如一个2位的16进制的数据,通过哈希运算消息认证码(Hash-based Message Authentication Code,HMAC)的方式进行加密,生成字符串和索引信息(indexMsg)。示例性的,该字符串的长度可以为64位,本申请对此不做限定。此时,可以将该字符串和索引信息作为第一信息。本申请实施例通过对金融产品的数据进行加密得到第一信息,能够进一步提高推送金融产品的安全性和可靠性。As an example, the anchor terminal can encrypt the index of financial product data, such as a 2-digit hexadecimal data, by means of hash operation message authentication code (Hash-based Message Authentication Code, HMAC), to generate a string and Index information (indexMsg). Exemplarily, the length of the character string may be 64 bits, which is not limited in this application. At this time, the character string and index information may be used as the first information. In the embodiment of the present application, the first information is obtained by encrypting the data of the financial product, which can further improve the security and reliability of pushing the financial product.

在一些可选的实施例中,主播终端还可以获取第二信息,该第二信息用于指示触发服务器向观众终端推送所述金融产品的条件。示例性的,第二信息可以为上述事件或时间信息。也就是说,当满足第二信息指示的条件,或时间,或事件时,服务器向观众终端推送相应的金融产品。In some optional embodiments, the host terminal may also obtain second information, which is used to indicate the conditions that trigger the server to push the financial product to the audience terminal. Exemplarily, the second information may be the above event or time information. That is to say, when the condition indicated by the second information, or the time, or the event is met, the server pushes the corresponding financial product to the audience terminal.

230,主播终端向服务器发送数据传输报文。这里,该数据传输报文即为按照数据流传输协议封装的推流数据报文。230. The anchor terminal sends a data transmission message to the server. Here, the data transmission message is a streaming data message encapsulated according to the data streaming transmission protocol.

其中,该数据传输报文包括直播数据流和上述第一信息,该第一信息封装在数据传输报文的头部。作为示例,当数据传输报文为RTMP报文时,第一信息可以封装在RTMP报文的基本头(basic header),和/或消息头(message header),例如可以封装在basicheader或messageheader中的可扩展字段中,不做限定。Wherein, the data transmission message includes the live data stream and the above-mentioned first information, and the first information is encapsulated in the header of the data transmission message. As an example, when the data transmission message is an RTMP message, the first information can be encapsulated in the basic header (basic header) of the RTMP message, and/or the message header (message header), for example, can be encapsulated in basicheader or messageheader In the expandable field, there is no limit.

在一些实施例中,RTMP协议传输时可以对数据格式化得到RTMP消息(message)。实际传输时,发送端将message划分为带有message ID的块(chunk),每个chunk可能是一个单独的message,也可能是message的一部分。接受端可以根据chunk中包含message ID,将chunk还原成完整的message,从而实现信息的收发。In some embodiments, the data may be formatted to obtain an RTMP message (message) during RTMP protocol transmission. During actual transmission, the sender divides the message into chunks with message IDs. Each chunk may be a separate message or a part of the message. The receiving end can restore the chunk to a complete message according to the message ID contained in the chunk, so as to realize the sending and receiving of information.

图5示出了块的格式(chunkformat)的一个示例,其中一个chunk包括块头(chunkheader)和块数据(chunkdata),chunkheader包括basicheader、message header和扩展时间戳(extendedtimestamp)。在一些可选的实施例中,第一信息可以封装在chunkheader中的basicheader,或messageheader中,本申请对此不作限定。FIG. 5 shows an example of a chunk format (chunkformat), wherein a chunk includes a chunk header (chunkheader) and chunk data (chunkdata), and the chunkheader includes a basicheader, a message header, and an extended timestamp (extendedtimestamp). In some optional embodiments, the first information may be encapsulated in the basicheader or the messageheader in the chunkheader, which is not limited in this application.

作为一个示例,当第一信息包括索引信息时,可以通过HMAC方式加密得到的字符串和索引信息时,可以将索引信息封装在chunk header中的basic header中,将字符串放在chunkheader中的message header中。As an example, when the first information includes index information, when the string and index information obtained by HMAC encryption can be used, the index information can be encapsulated in the basic header in the chunk header, and the string can be placed in the message in the chunk header header.

在一些可选的实施例中,数据传输报文还可以包括第二信息。示例性的,第二信息可以封装在该数据传输报文的头部,例如RTMP协议报文的basic header,或messageheader中,不做限定,具体可以参见第一信息的描述。作为一个具体的例子,第二信息可以和第一信息封装在相邻的字段中,不作限定。In some optional embodiments, the data transmission packet may further include second information. Exemplarily, the second information may be encapsulated in the header of the data transmission message, such as the basic header or message header of the RTMP protocol message, which is not limited. For details, please refer to the description of the first information. As a specific example, the second information and the first information may be encapsulated in adjacent fields, which is not limited.

对应的,服务器接收该数据传输报文,并从该数据传输报文中获取第一信息。例如,服务器在接收到数据传输报文后,可以检查报文的头部,以获取第一信息。可选的,服务器还可以检查报文的头部以获得第二信息。Correspondingly, the server receives the data transmission packet, and obtains the first information from the data transmission packet. For example, after receiving the data transmission message, the server may check the header of the message to obtain the first information. Optionally, the server may also check the header of the packet to obtain the second information.

在一些可选的实施例中,当索引信息封装在chunk header中的basic header中,将字符串放在chunkheader中的message header中时,可以检查数据传输报文的basicheader中的索引信息,和message header中的字符串,并根据HMAC算法,通过字符串对索引信息进行解析,获取解析后的索引信息作为第一信息。In some optional embodiments, when the index information is encapsulated in the basic header in the chunk header, and the character string is placed in the message header in the chunk header, the index information in the basic header of the data transmission message can be checked, and the message The string in the header, and according to the HMAC algorithm, the index information is parsed through the string, and the parsed index information is obtained as the first information.

240,服务器根据第一信息,获取推荐的数据。240. The server acquires recommended data according to the first information.

示例性的,服务器可以根据第一信息包括的类型信息、时间信息和业务信息中的至少一种,获取推荐的数据。Exemplarily, the server may acquire recommended data according to at least one of type information, time information, and business information included in the first information.

作为具体的例子,当类型信息包括数据通信协议信息,例如以codeM://v17开头时,接收端(比如服务器)根据约定的协议信息(即codeM://v17)对应的产品类型(例如证券类型)对第一信息进行解析,确定推荐的金融产品。As a specific example, when the type information includes data communication protocol information, such as beginning with codeM://v17, the receiving end (such as the server) according to the agreed protocol information (ie codeM://v17) corresponding to the product type (such as securities type) analyze the first information to determine the recommended financial product.

作为另一个具体的例子,当业务信息可以用于指示FPD,例如可以包括FPD的ID,名称,或索引等信息中的至少一种。此时,服务器可以根据该业务信息,确定推荐的金融产品的FPD。As another specific example, when the service information can be used to indicate the FPD, for example, it may include at least one of information such as ID, name, or index of the FPD. At this time, the server may determine the FPD of the recommended financial product according to the business information.

作为具体的示例,图6示出了索引信息的一个示例。这里,第一信息包括由6位16进制的数据构成的索引信息,可以用于指示推荐的金融产品。示例性的,该6位16进制的数据中的前2位的索引值可以用于指示金融产品的FPD。例如,服务器中可以存储索引值与FPD的对应关系,当解析到索引信息的前2位时,可以根据该对应关系,确定FPD。As a specific example, FIG. 6 shows an example of index information. Here, the first information includes index information composed of 6-digit hexadecimal data, and may be used to indicate recommended financial products. Exemplarily, the index value of the first 2 digits in the 6-digit hexadecimal data may be used to indicate the FPD of the financial product. For example, the server may store the correspondence between the index value and the FPD, and when the first two bits of the index information are resolved, the FPD may be determined according to the correspondence.

在一些可选的实施例中,服务器还可以根据业务信息,将推荐的数据分配在服务器侧的不同的主机中进行业务处理。例如,当根据业务信息,确定推荐的金融产品对应第一FPD时,将该第一FPD分配到主机B中进行业务处理,例如由主机B获取推荐的第一FPD,并向观众终端发送该第一FPD的数据。In some optional embodiments, the server may also distribute recommended data to different hosts on the server side for business processing according to business information. For example, when it is determined that the recommended financial product corresponds to the first FPD according to the business information, the first FPD is allocated to the host B for business processing, for example, the host B obtains the recommended first FPD and sends the first FPD to the audience terminal. A FPD data.

本申请一些具体的实现方式中,主播终端和服务器之间可以定义数据传输协议或传输格式,该传输协议或传输格式可以对应于不同的数据类型。例如,对于证券类的金融产品,可以定义codeM://v17的传输协议或传输格式。示例性的,服务器中可以内置解析器用于解析主播终端发送的用于描述推荐的产品的信息,该解析器在主播终端和服务器之间建立推流连接时确认双方的通信协议以及数据的封装格式。服务器在接收到用于描述推荐的产品的信息后,解析器可以按照约定的协议格式对数据进行解析,获取推荐的数据。具体的,解析过程可以参见上文中的描述,不再赘述。In some specific implementation manners of the present application, a data transmission protocol or transmission format may be defined between the anchor terminal and the server, and the transmission protocol or transmission format may correspond to different data types. For example, for securities financial products, the transmission protocol or transmission format of codeM://v17 can be defined. Exemplarily, the server may have a built-in parser for parsing the information describing the recommended product sent by the host terminal, and the parser confirms the communication protocol and data encapsulation format of both parties when establishing a streaming connection between the host terminal and the server . After the server receives the information describing the recommended product, the parser can parse the data according to the agreed protocol format to obtain the recommended data. Specifically, for the parsing process, reference may be made to the description above, and details are not repeated here.

250,服务器向观众终端发送推荐的数据。250. The server sends recommended data to the audience terminal.

示例性的,当推荐的数据为金融产品时,服务器可以根据第一信息,向观众终端发送金融产品的数据。相应的,观众终端接收该金融产品的数据,进而能够将该金融产品展示在观众终端的屏幕上,帮助观众实时了解主播正则讲解的产品。Exemplarily, when the recommended data is a financial product, the server may send the data of the financial product to the audience terminal according to the first information. Correspondingly, the audience terminal receives the data of the financial product, and then can display the financial product on the screen of the audience terminal, helping the audience understand the product that the anchor is explaining in real time.

因此,本申请实施例通过将用于描述推荐的数据的第一信息封装在数据传输报文的头部,即采用与直播数据流相同的数据传输协议来推送第一信息,从而不需要定制化的开发来实现实时数据的推送,一方面可以有助于提高推送数据的时效性,另一方面可以降低推送实时数据的成本。Therefore, in the embodiment of the present application, the first information used to describe the recommended data is encapsulated in the header of the data transmission message, that is, the same data transmission protocol as the live data stream is used to push the first information, so that no customization is required. The development of real-time data push can help improve the timeliness of pushing data on the one hand, and reduce the cost of pushing real-time data on the other hand.

在一些可选的实施例中,服务器可以根据第一信息,获取推荐的数据关联的actor对象,然后可以确定该actor对象的状态为执行状态,以向观众终端发送推荐的数据。在一些实施例中,actor对象的内部可以持有一个状态(status)字段来标识与该actor对象所关联的数据的状态信息。也就是说,可以根据actor对象的状态来控制推荐的数据的状态,例如,当控制actor对象为执行状态时,可以实现将该actor关联的推荐数据发送给观众终端。In some optional embodiments, the server can acquire the actor object associated with the recommended data according to the first information, and then can determine that the state of the actor object is the execution state, so as to send the recommended data to the audience terminal. In some embodiments, the actor object may hold a status (status) field inside to identify the status information of the data associated with the actor object. That is to say, the state of the recommended data can be controlled according to the state of the actor object. For example, when the actor object is controlled to be in the execution state, the recommendation data associated with the actor can be sent to the audience terminal.

本申请实施例通过将actor对象与推荐的数据关联,从而可以通过控制actor对象的状态,来控制推荐的数据的发送状态,以实现向观众终端发送该推荐的数据,从而可以有助于进一步提高推送数据的时效性,提高数据传输的效率。In the embodiment of the present application, by associating the actor object with the recommended data, the sending state of the recommended data can be controlled by controlling the state of the actor object, so as to realize sending the recommended data to the audience terminal, which can help to further improve The timeliness of pushing data improves the efficiency of data transmission.

示例性的,第一信息所描述的金融产品(例如业务信息指示的FPD)可以与actor对象关联,例如在服务器中可以预存该金融产品(或FPD)与actor对象的关联关系。服务器可以根据第一信息和该关联关系,确定actor对象。这里,金融产品(或FPD)与actor对象的关联关系,即该金融产品的数据(或FPD中包含的数据)与actor对象的关联关系。作为一种可能的实现方式,金融产品的数据(或FPD中包含的数据)在actor对象中可以由索引函数来实现关联,即通过actor对象的索引函数,可以获取与该actor对象关联的金融产品的数据(或FPD的数据)。当确定该actor对象为执行状态时,向观众终端发送与该actor对象关联的FPD的数据。Exemplarily, the financial product described in the first information (such as the FPD indicated by the business information) may be associated with the actor object, for example, the association between the financial product (or FPD) and the actor object may be pre-stored in the server. The server may determine the actor object according to the first information and the association relationship. Here, the association relationship between the financial product (or FPD) and the actor object is the association relationship between the data of the financial product (or the data contained in the FPD) and the actor object. As a possible implementation, the data of financial products (or the data contained in the FPD) can be associated in the actor object by the index function, that is, through the index function of the actor object, the financial product associated with the actor object can be obtained data (or FPD data). When it is determined that the actor object is in the execution state, the data of the FPD associated with the actor object is sent to the audience terminal.

在一些可选的实施例中,服务器(例如存储器中)可以保存缓存池列表,其中可以包含至少一个actor对象。当确定该缓存池列表中包括第一信息描述的数据(即推荐的数据)关联的actor对象时,将该actor对象的状态由复用状态修改为等待状态。在一些实施例中,还可以将该actor对象保存到内存中。当确定该缓存池列表中不包括第一信息描述的数据(即推荐的数据)关联的actor对象时,建立该第一信息描述的数据的actor对象,并确定该actor对象的状态为等待状态。In some optional embodiments, the server (for example, in the storage) may store a cache pool list, which may contain at least one actor object. When it is determined that the buffer pool list includes an actor object associated with the data described in the first information (ie, the recommended data), the state of the actor object is changed from the reuse state to the waiting state. In some embodiments, the actor object may also be saved in memory. When it is determined that the cache pool list does not include the actor object associated with the data described by the first information (ie recommended data), an actor object of the data described by the first information is established, and the state of the actor object is determined to be a waiting state.

例如,如图7所示,服务器可以保存actor缓存池列表(例如可以以数组列表的形式保存),其中可以包含至少一个actor对象,例如actor_A,actor_B,actor_C,actor_D等,每个actor对象可以对应一个索引值。另外,actor缓存池中的各个actor对象的状态为复用状态。这里,复用状态表示actor对象已经执行过且没有被销毁。示例性的,服务器中的处理模块(例如处理器)可以从actor缓存池列表中获取actor对象,或者向actor缓存池列表中存储actor对象等,不做限定。For example, as shown in Figure 7, the server can save the actor cache pool list (for example, it can be saved in the form of an array list), which can contain at least one actor object, such as actor_A, actor_B, actor_C, actor_D, etc., and each actor object can correspond to an index value. In addition, the state of each actor object in the actor buffer pool is the reuse state. Here, the reuse state means that the actor object has been executed and has not been destroyed. Exemplarily, a processing module (such as a processor) in the server may obtain actor objects from the actor cache pool list, or store actor objects in the actor cache pool list, etc., without limitation.

参见图6,当服务器接收到主播终端的推流数据,并从中获取到索引值“05”时,可以从actor缓存池中查找“05”对应的actor对象。当actor缓存池列表中包括“05”对应的actor对象,例如为actor_B时,将该actor_B对象的状态由复用状态修改为等待状态。这里,等待状态表示actor对象等待被执行并且已经关联数据(例如金融产品的数据)。当actor缓存池列表中不包括“05”对应的actor对象时,建立该“05”关联的actor对象,并确定该actor对象的状态为等待状态。Referring to Fig. 6, when the server receives the streaming data from the host terminal and obtains the index value "05", it can search the actor object corresponding to "05" from the actor cache pool. When the actor cache pool list includes the actor object corresponding to "05", such as actor_B, the state of the actor_B object is changed from the reuse state to the waiting state. Here, the waiting state means that the actor object is waiting to be executed and has associated data (such as data of financial products). When the actor object corresponding to "05" is not included in the actor cache pool list, the actor object associated with "05" is established, and the state of the actor object is determined to be the waiting state.

在一些可选的实施例中,当推荐的数据包括金融产品的情况下,可以根据第一信息,从数据库中获取所述金融产品的FPD,并建立与该FPD关联的actor对象。示例性的,可以根据索引函数,确定FPD对应的索引字段,然后根据该索引字段,建立actor对象,其中,该actor对象包括该索引字段。这里,该索引函数可以为预设的函数,不做限定。可选的,建立actor对象后,可以确定该actor的状态为等待状态。这样,在确定该actor对象的状态为执行状态时,可以向第三设备发送该actor对象的索引字段对应的FPD中的数据。示例性的,在actor对象为执行状态后,可以根据该actor对象中的索引字段和索引函数,在数据库中获取对应的FPD的数据,并发送该FPD中的数据。In some optional embodiments, when the recommended data includes a financial product, the FPD of the financial product may be obtained from the database according to the first information, and an actor object associated with the FPD may be established. Exemplarily, an index field corresponding to the FPD may be determined according to an index function, and then an actor object is created according to the index field, wherein the actor object includes the index field. Here, the index function may be a preset function without limitation. Optionally, after the actor object is created, it can be determined that the state of the actor is waiting. In this way, when it is determined that the state of the actor object is the execution state, the data in the FPD corresponding to the index field of the actor object may be sent to the third device. Exemplarily, after the actor object is in the execution state, the data of the corresponding FPD can be obtained in the database according to the index field and the index function in the actor object, and the data in the FPD can be sent.

继续上面的例子,在建立“05”对应的actor对象时,可以先确定“05”对应的金融产品的FPD,然后建立与该FPD,例如索引“05”关联的actor对象,并确定该actor的状态为等待状态。例如,可以根据索引函数,确定该“05”对应的FPD对应的索引字段,然后可以建立包括该索引字段的actor对象,即“05”对应的actor对象。在该actor对象为执行状态后,可以根据该actor对象中的索引字段和索引函数,在数据库中获取索引“05”对应的FPD的数据,并发送该FPD中的数据。Continuing the above example, when creating the actor object corresponding to "05", you can first determine the FPD of the financial product corresponding to "05", and then create the actor object associated with the FPD, such as the index "05", and determine the actor's Status is waiting. For example, the index field corresponding to the FPD corresponding to "05" can be determined according to the index function, and then an actor object including the index field, that is, the actor object corresponding to "05" can be created. After the actor object is in the execution state, the data of the FPD corresponding to the index "05" can be obtained in the database according to the index field and index function in the actor object, and the data in the FPD can be sent.

因此,本申请实施例通过将用于描述推荐的金融产品的信息封装在数据传输报文的头部,即采用与直播数据流相同的数据传输协议来推送金融产品,从而不需要定制化的开发来实现金融产品的推送,一方面可以有助于提高推送金融产品的时效性,另一方面可以降低推送金融产品的成本。Therefore, in the embodiment of the present application, the information used to describe the recommended financial product is encapsulated in the header of the data transmission message, that is, the same data transmission protocol as the live data stream is used to push the financial product, so that no customized development is required To realize the push of financial products, on the one hand, it can help to improve the timeliness of pushing financial products, and on the other hand, it can reduce the cost of pushing financial products.

需要说明的是,本申请实施例以第一信息包括FPD的索引,即根据FPD的索引来确定FPD为例描述本申请实施例提供的方法,但是本申请实施例并不限制与此,例如第一信息还可以包括FPD的ID、名称,或者其他信息。It should be noted that the embodiment of the present application describes the method provided by the embodiment of the present application by taking the first information including the index of the FPD, that is, determining the FPD according to the index of the FPD as an example, but the embodiment of the present application is not limited thereto. For example, A message may also include the FPD's ID, name, or other information.

在一些可选的实施例中,在确定actor对象的状态为执行状态之后,还可以将该actor对象放入缓存池列表中,并确定该actor对象的状态为复用状态。这样,当再次接收到该推荐的数据时,可以直接从缓存池列表中获取与该推荐的数据关联的actor对象,而不需要建立该actor对象,从而可以有助于进一步提高推送数据的时效性,提高数据传输的效率。In some optional embodiments, after it is determined that the state of the actor object is the execution state, the actor object can also be put into the buffer pool list, and the state of the actor object is determined to be the reuse state. In this way, when the recommended data is received again, the actor object associated with the recommended data can be obtained directly from the cache pool list without creating the actor object, which can help to further improve the timeliness of pushing data , improve the efficiency of data transmission.

在一些可选的实施例中,当在数据传输报文的头部获取到第二信息时,可以在确定满足该第二信息指示的条件时,向观众终端发送金融产品的数据,例如将actor对象的状态由等待状态变为执行状态,以实现将actor对象中的数据发送给观众终端,从而可以定向推送数据,提高用户体验。In some optional embodiments, when the second information is obtained at the head of the data transmission message, the data of the financial product may be sent to the audience terminal when it is determined that the condition indicated by the second information is satisfied, for example, the actor The state of the object is changed from the waiting state to the execution state, so as to send the data in the actor object to the audience terminal, so that the data can be pushed in a targeted manner and the user experience can be improved.

在一些可选的实施例中,金融产品的数据可以与直播拉流一起发送给观众终端,例如服务器可以继续将描述推荐的数据的信息封装在数据传输报文的头部,观众终端可以根据该数据传输报文,获取直播数据流和第一信息,进而可以根据该第一信息,获取推荐的数据。In some optional embodiments, the data of financial products can be sent to the audience terminal together with the live streaming. For example, the server can continue to encapsulate the information describing the recommended data in the header of the data transmission message, and the audience terminal can The data transmission message obtains the live data stream and the first information, and then obtains the recommended data according to the first information.

类似的,服务器和观众终端之间可以定义数据传输协议或传输格式。示例性的,观众终端中可以内置解析器用于解析服务器发送的用于描述推荐的数据的信息,该解析器可以在观众终端进入直播间时进行初始化。初始化成功后,可以在服务器和观众终端之间建立拉流连接时确认双方的通信协议以及数据的封装格式。观众终端在接收到用于描述推荐的产品的信息后,解析器可以按照约定的协议格式对数据进行解析,获取推荐的数据。具体的,该过程与上文中主播终端与服务器之间传输用于描述推荐的数据的信息的过程类似,可以参见上文中的描述。Similarly, a data transmission protocol or transmission format can be defined between the server and the audience terminal. Exemplarily, a parser may be built in the viewer terminal to parse the information sent by the server to describe the recommended data, and the parser may be initialized when the viewer terminal enters the live broadcast room. After the initialization is successful, the communication protocol and data encapsulation format of both parties can be confirmed when the streaming connection is established between the server and the audience terminal. After the viewer terminal receives the information describing the recommended product, the parser can parse the data according to the agreed protocol format to obtain the recommended data. Specifically, this process is similar to the above process of transmitting information for describing recommended data between the host terminal and the server, and reference may be made to the above description.

在一些可选的实施例中,服务器还可以通过厂商推送,或自建长链接的方式向观众终端发送金融产品的数据,本申请对此不做限定。In some optional embodiments, the server may also send financial product data to the audience terminal through vendor push or self-built long link, which is not limited in this application.

以上结合附图详细描述了本申请的具体实施方式,但是,本申请并不限于上述实施方式中的具体细节,在本申请的技术构思范围内,可以对本申请的技术方案进行多种简单变型,这些简单变型均属于本申请的保护范围。例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。The specific implementation of the application has been described in detail above in conjunction with the accompanying drawings. However, the application is not limited to the specific details in the above-mentioned implementation. Within the scope of the technical concept of the application, various simple modifications can be made to the technical solution of the application. These simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific implementation manners can be combined in any suitable manner if there is no contradiction. Separately. As another example, any combination of various implementations of the present application can also be made, as long as they do not violate the idea of the present application, they should also be regarded as the content disclosed in the present application.

还应理解,在本申请的各种方法实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should also be understood that in the various method embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the order of execution of the processes should be determined by their functions and internal logic, and should not be used in this application. The implementation of the examples constitutes no limitation.

上文结合图1至图7,详细描述了本申请的方法实施例,下文结合图8至图10,详细描述本申请的装置实施例。The method embodiment of the present application is described in detail above with reference to FIG. 1 to FIG. 7 , and the device embodiment of the present application is described in detail below in conjunction with FIG. 8 to FIG. 10 .

图8示出了本申请实施例提供的一种实时数据推送的装置400的示意性框图。如图8所示,装置400包括收发单元410和处理单元420。FIG. 8 shows a schematic block diagram of an apparatus 400 for pushing real-time data provided by an embodiment of the present application. As shown in FIG. 8 , the device 400 includes a transceiver unit 410 and a processing unit 420 .

收发单元410,用于接收数据传输报文,所述数据传输报文包括直播数据流和第一信息,其中,所述第一信息封装在所述数据传输报文的头部,所述第一信息用于描述推荐的数据。The transceiver unit 410 is configured to receive a data transmission message, the data transmission message includes a live data stream and first information, wherein the first information is encapsulated in the header of the data transmission message, and the first Information is used to describe the recommended data.

处理单元420,用于根据所述第一信息,获取所述推荐的数据。The processing unit 420 is configured to acquire the recommended data according to the first information.

可选的,收发单元410可以用于接收来自第二设备的数据传输报文。Optionally, the transceiver unit 410 may be configured to receive a data transmission packet from the second device.

在一些实施例中,该实时数据推送的装置400可以为服务器,或设置于服务器中的芯片或电路。此时,该第二设备可以为主播终端。也就是说,主播终端和服务器之间可以通过将描述推荐的数据的信息封装在数据传输报文的头部来实现实时数据的推送。In some embodiments, the device 400 for pushing real-time data may be a server, or a chip or circuit set in the server. At this time, the second device may be a broadcast terminal. That is to say, real-time data push can be realized between the anchor terminal and the server by encapsulating the information describing the recommended data in the header of the data transmission message.

在一些实施例中,该实时数据推送的装置400可以为观众终端,或设置于观众终端中的芯片或电路。此时,该第二设备可以为服务器。也就是说,服务器和观众终端之间可以通过将描述推荐的数据的信息封装在数据传输报文的头部来实现实时数据的推送。In some embodiments, the apparatus 400 for pushing real-time data may be an audience terminal, or a chip or a circuit set in an audience terminal. In this case, the second device may be a server. That is to say, real-time data push can be realized between the server and the viewer terminal by encapsulating the information describing the recommended data in the header of the data transmission message.

在一些可选的实施例中,所述第一信息包括所述推荐的数据的类型信息、时间信息和业务信息中的至少一种。In some optional embodiments, the first information includes at least one of type information, time information, and service information of the recommended data.

在一些可选的实施例中,所述类型信息包括数据通信协议信息,其中所述数据通信协议信息与所述推荐的数据的类型对应。In some optional embodiments, the type information includes data communication protocol information, where the data communication protocol information corresponds to the type of the recommended data.

在一些可选的实施例中,所述数据传输报文包括实时消息传输协议RTMP报文,所述第一信息封装在所述RTMP报文的基本头或消息头中。In some optional embodiments, the data transmission packet includes a real-time messaging protocol RTMP packet, and the first information is encapsulated in a basic header or a message header of the RTMP packet.

在一些可选的实施例中,收发单元410还用于根据所述第一信息,发送所述推荐的数据。示例性的,可以向第三设备发送该推荐的数据。在第一设备为服务器,第二设备为主播终端的情况下,第三设备例如为观众终端。In some optional embodiments, the transceiving unit 410 is further configured to send the recommended data according to the first information. Exemplarily, the recommended data may be sent to the third device. In the case where the first device is a server and the second device is a host terminal, the third device is, for example, an audience terminal.

在一些可选的实施例中,收发单元410具体用于:In some optional embodiments, the transceiver unit 410 is specifically configured to:

根据所述第一信息,获取所述推荐的数据关联的actor对象;According to the first information, acquire the actor object associated with the recommended data;

确定所述actor对象的状态为执行状态,以发送所述推荐的数据。Determine that the state of the actor object is an execution state, so as to send the recommended data.

在一些可选的实施例中,处理单元420还用于将所述actor对象放入缓存池列表,并确定所述actor对象的状态为复用状态。In some optional embodiments, the processing unit 420 is further configured to put the actor object into a buffer pool list, and determine that the state of the actor object is a reuse state.

在一些可选的实施例中,收发单元410具体用于::In some optional embodiments, the transceiver unit 410 is specifically configured to:

当确定缓存池列表中包括所述推荐的数据关联的actor对象时,将所述actor对象的状态由复用状态修改为等待状态;When it is determined that the recommended data-associated actor object is included in the buffer pool list, the state of the actor object is modified from a reuse state to a waiting state;

当确定所述缓存池列表中不包括所述推荐的数据关联的actor对象时,建立所述推荐的数据关联的actor对象,并确定所述actor对象的状态为等待状态。When it is determined that the recommended data-associated actor object is not included in the buffer pool list, the recommended data-associated actor object is established, and the state of the actor object is determined to be a waiting state.

在一些可选的实施例中,在推荐的数据包括金融产品的情况下,收发单元410具体用于:根据所述第一信息,从数据库中获取金融产品数据FPD,所述FPD包括金融产品的标识ID、名称、最低金额、年利率、落地页统一资源定位器URL和时间限制中的至少一种;In some optional embodiments, when the recommended data includes financial products, the transceiving unit 410 is specifically configured to: acquire financial product data FPD from the database according to the first information, and the FPD includes financial product data Identify at least one of ID, name, minimum amount, APR, landing page URL, and time limit;

根据索引函数,确定所述FPD对应的索引字段;According to the index function, determine the index field corresponding to the FPD;

建立所述FPD关联的actor对象,其中,所述actor对象包括所述索引字段;Establishing an actor object associated with the FPD, wherein the actor object includes the index field;

确定所述actor对象的状态为执行状态,以向所述第三设备发送所述actor对象的索引字段对应的FPD中的数据。Determine that the state of the actor object is an execution state, so as to send the data in the FPD corresponding to the index field of the actor object to the third device.

在一些可选的实施例中,所述数据传输报文还包括第二信息,所述第一信息封装在所述数据传输报文的头部,所述第二信息用于指示触发所述服务器向观众终端推送所述金融产品的条件。In some optional embodiments, the data transmission message further includes second information, the first information is encapsulated in the header of the data transmission message, and the second information is used to indicate triggering the server The conditions of the financial product are pushed to the audience terminal.

应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图8所示的实时数据推荐的装置400可以对应于执行本申请实施例的方法200中的服务器,或观众终端,并且装置400中的各个模块的前述和其它操作和/或功能分别为了实现图2中的服务器或观众终端执行的相应流程,为了简洁,在此不再赘述。It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, details are not repeated here. Specifically, the device 400 for real-time data recommendation shown in FIG. 8 may correspond to the server executing the method 200 in the embodiment of the present application, or the audience terminal, and the aforementioned and other operations and/or functions of the modules in the device 400 are respectively In order to realize the corresponding process performed by the server or the audience terminal in FIG. 2 , for the sake of brevity, details are not repeated here.

图9示出了本申请实施例提供的一种实时数据推送的装置600的示意性框图。如图9所示,实时数据推送的装置600包括获取单元610、处理单元620和收发单元630。FIG. 9 shows a schematic block diagram of an apparatus 600 for pushing real-time data according to an embodiment of the present application. As shown in FIG. 9 , an apparatus 600 for pushing real-time data includes an acquisition unit 610 , a processing unit 620 and a transceiver unit 630 .

获取单元610,用于获取推荐的数据。The acquiring unit 610 is configured to acquire recommended data.

处理单元620,用于确定第一信息,所述第一信息用于描述所述推荐的数据。The processing unit 620 is configured to determine first information, where the first information is used to describe the recommended data.

收发单元630,用于发送数据传输报文,所述数据传输报文包括直播数据流和所述第一信息,所述第一信息封装在所述数据传输报文的头部。The transceiver unit 630 is configured to send a data transmission packet, the data transmission packet includes the live data stream and the first information, and the first information is encapsulated in the header of the data transmission packet.

可选的,收发单元630可以用于向第一设备发送数据传输报文。Optionally, the transceiver unit 630 may be configured to send a data transmission packet to the first device.

在一些实施例中,该实时数据推送的装置600可以为主播终端,或设置于主播终端中的芯片或电路。此时,该第一设备可以为服务器。也就是说,主播终端和服务器之间可以通过将描述推荐的数据的信息封装在数据传输报文的头部来实现实时数据的推送。In some embodiments, the device 600 for pushing real-time data may be a host terminal, or a chip or circuit provided in the host terminal. At this time, the first device may be a server. That is to say, real-time data push can be realized between the anchor terminal and the server by encapsulating the information describing the recommended data in the header of the data transmission message.

在一些实施例中,该实时数据推送的装置600可以为服务器,或设置于服务器中的芯片或电路。此时,该第一设备可以为观众终端。也就是说,服务器和观众终端之间可以通过将描述推荐的数据的信息封装在数据传输报文的头部来实现实时数据的推送。In some embodiments, the device 600 for pushing real-time data may be a server, or a chip or circuit set in the server. At this time, the first device may be a viewer terminal. That is to say, real-time data push can be realized between the server and the viewer terminal by encapsulating the information describing the recommended data in the header of the data transmission message.

在一些可选的实施例中,所述第一信息包括所述推荐的数据的类型信息、时间信息和业务信息中的至少一种。In some optional embodiments, the first information includes at least one of type information, time information, and service information of the recommended data.

在一些可选的实施例中,所述类型信息包括数据通信协议信息,其中所述数据通信协议信息与所述推荐的数据的类型对应。In some optional embodiments, the type information includes data communication protocol information, where the data communication protocol information corresponds to the type of the recommended data.

在一些可选的实施例中,所述数据传输报文包括实时消息传输协议RTMP报文,所述第一信息封装在所述RTMP报文的基本头或消息头中。In some optional embodiments, the data transmission packet includes a real-time messaging protocol RTMP packet, and the first information is encapsulated in a basic header or a message header of the RTMP packet.

在一些可选的实施例中,所述获取单元610具体用于:In some optional embodiments, the acquiring unit 610 is specifically configured to:

根据推荐的金融产品的金融产品数据FPD,显示所述金融产品,所述FPD包括金融产品的标识、名称、最低金额、年利率、落地页统一资源定位器URL和时间限制中的至少一种;According to the financial product data FPD of the recommended financial product, display the financial product, the FPD includes at least one of the logo, name, minimum amount, annual interest rate, URL of the landing page uniform resource locator and time limit of the financial product;

通过第一输入区域获取用户输入的推送指令,所述推送指令用于指示推送所述金融产品;Acquiring a push instruction input by a user through the first input area, the push instruction being used to instruct to push the financial product;

根据所述推送指令,确定推荐所述金融产品。According to the push instruction, it is determined to recommend the financial product.

在一些可选的实施例中,所述数据传输报文还包括第二信息,所述第二信息封装在所述数据传输报文的头部,所述第二信息用于指示触发所述服务器向观众终端推送所述金融产品的条件。In some optional embodiments, the data transmission message further includes second information, the second information is encapsulated in the header of the data transmission message, and the second information is used to indicate triggering the server The conditions of the financial product are pushed to the audience terminal.

应理解,装置实施例与方法实施例可以相互对应,类似的描述可以参照方法实施例。为避免重复,此处不再赘述。具体地,图9所示的实时数据推送的装置600可以对应于执行本申请实施例的方法200中的主播终端或服务器,并且装置600中的各个模块的前述和其它操作和/或功能分别为了实现图2中的主播终端或服务器执行的相应流程,为了简洁,在此不再赘述。It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, details are not repeated here. Specifically, the device 600 for real-time data push shown in FIG. 9 may correspond to the host terminal or server performing the method 200 in the embodiment of the present application, and the aforementioned and other operations and/or functions of each module in the device 600 are respectively for To realize the corresponding flow executed by the host terminal or server in FIG. 2 , for the sake of brevity, details are not repeated here.

上文中结合附图从功能模块的角度描述了本申请实施例的装置。应理解,该功能模块可以通过硬件形式实现,也可以通过软件形式的指令实现,还可以通过硬件和软件模块组合实现。具体地,本申请实施例中的方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路和/或软件形式的指令完成,结合本申请实施例公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。可选地,软件模块可以位于随机存储器,闪存、只读存储器、可编程只读存储器、电可擦写可编程存储器、寄存器等本领域的成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法实施例中的步骤。The device in the embodiment of the present application is described above from the perspective of functional modules with reference to the accompanying drawings. It should be understood that the functional modules may be implemented in the form of hardware, may also be implemented by instructions in the form of software, and may also be implemented by a combination of hardware and software modules. Specifically, each step of the method embodiment in the embodiment of the present application can be completed by an integrated logic circuit of the hardware in the processor and/or instructions in the form of software, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as hardware The execution of the processor is completed, or the execution is completed by a combination of hardware and software modules in the processor. Optionally, the software module may be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, and registers. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps in the above method embodiments in combination with its hardware.

图10为本申请实施例涉及的电子设备的框图,该设备可以是图1所示的服务器,或主播终端,用于执行上述实施例所述的实时数据推荐的方法,具体参见上述方法实施例中的说明。Fig. 10 is a block diagram of an electronic device involved in an embodiment of the present application. The device may be the server shown in Fig. 1, or an anchor terminal, and is used to execute the method for recommending real-time data described in the above embodiment. For details, refer to the above method embodiment description in .

图10所示的电子设备800包括存储器801、处理器802、通信接口803。存储器801、处理器802、通信接口803之间彼此通信连接。例如,存储器801、处理器802、通信接口803之间可以采用网络连接的方式,实现通信连接。或者,上述电子设备800还可以包括总线804。存储器801、处理器802、通信接口803通过总线804实现彼此之间的通信连接。图10是以存储器801、处理器802、通信接口803通过总线804实现彼此之间的通信连接的电子设备800。The electronic device 800 shown in FIG. 10 includes a memory 801 , a processor 802 and a communication interface 803 . The memory 801, the processor 802, and the communication interface 803 are communicatively connected to each other. For example, the memory 801, the processor 802, and the communication interface 803 may be connected through a network to implement a communication connection. Alternatively, the electronic device 800 may further include a bus 804 . The memory 801 , the processor 802 , and the communication interface 803 are connected to each other through a bus 804 . FIG. 10 is an electronic device 800 in which a memory 801 , a processor 802 , and a communication interface 803 are connected to each other through a bus 804 for communication.

存储器801可以是只读存储器(Read Only Memory,ROM),静态存储设备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存储器801可以存储程序,当存储器801中存储的程序被处理器802执行时,处理器802和通信接口803用于执行上述方法。The memory 801 may be a read-only memory (Read Only Memory, ROM), a static storage device, a dynamic storage device or a random access memory (Random Access Memory, RAM). The memory 801 may store programs, and when the programs stored in the memory 801 are executed by the processor 802, the processor 802 and the communication interface 803 are used to execute the above method.

处理器802可以采用通用的中央处理器(Central Processing Unit,CPU),微处理器,应用专用集成电路(Application Specific Integrated Circuit,ASIC),图形处理器(graphics processing unit,GPU)或者一个或多个集成电路。The processor 802 may be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a graphics processing unit (graphics processing unit, GPU) or one or more integrated circuit.

处理器802还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,本申请的方法可以通过处理器802中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器802还可以是通用处理器、数字信号处理器(digital signal processing,DSP)、专用集成电路(ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器801,处理器802读取存储器801中的信息,结合其硬件完成本申请实施例的方法。The processor 802 may also be an integrated circuit chip with signal processing capability. In the implementation process, the method of the present application may be completed by an integrated logic circuit of hardware in the processor 802 or instructions in the form of software. The above-mentioned processor 802 can also be a general-purpose processor, a digital signal processor (digital signal processing, DSP), an application-specific integrated circuit (ASIC), a ready-made programmable gate array (field programmable gate array, FPGA) or other programmable logic devices , discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 801, and the processor 802 reads the information in the memory 801, and implements the method in the embodiment of the present application in combination with its hardware.

通信接口803使用例如但不限于收发器一类的收发模块,来实现电子设备800与其他设备或通信网络之间的通信。例如,可以通过通信接口803发送或接收数据传输报文。The communication interface 803 uses a transceiver module such as but not limited to a transceiver to implement communication between the electronic device 800 and other devices or communication networks. For example, a data transmission message may be sent or received through the communication interface 803 .

当上述电子设备800包括总线804时,总线804可包括在电子设备800各个部件(例如,存储器801、处理器802、通信接口803)之间传送信息的通路。When the above-mentioned electronic device 800 includes a bus 804, the bus 804 may include a path for transmitting information among various components of the electronic device 800 (for example, a memory 801, a processor 802, and a communication interface 803).

根据本申请的还提供了一种计算机存储介质,其上存储有计算机程序,该计算机程序被计算机执行时使得该计算机能够执行上述方法实施例的方法。或者说,本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得计算机执行上述方法实施例的方法。According to the present application, there is also provided a computer storage medium, on which a computer program is stored, and when the computer program is executed by a computer, the computer can execute the methods of the above method embodiments. In other words, the embodiments of the present application further provide a computer program product including instructions, and when the instructions are executed by a computer, the computer executes the methods of the foregoing method embodiments.

根据本申请的还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方法实施例的方法。According to the present application there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method of the above method embodiment.

换言之,当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如数字视频光盘(digital video disc,DVD))、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In other words, when implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a digital video disc (digital video disc, DVD)), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the modules and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.

作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。例如,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。A module described as a separate component may or may not be physically separated, and a component displayed as a module may or may not be a physical module, that is, it may be located in one place, or may also be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。另外,各个方法实施例之间、各个装置实施例之间也可以互相参考,在不同实施例中的相同或对应内容可以互相引用,不做赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here. In addition, various method embodiments and various device embodiments may also refer to each other, and the same or corresponding content in different embodiments may refer to each other, and details are not repeated here.

Claims (19)

1.一种实时数据推送的方法,其特征在于,包括:1. A method for real-time data push, comprising: 接收数据传输报文,所述数据传输报文包括直播数据流和第一信息,其中,所述第一信息封装在所述数据传输报文的头部,所述第一信息用于描述推荐的数据;Receive a data transmission message, the data transmission message includes a live data stream and first information, wherein the first information is encapsulated in the header of the data transmission message, and the first information is used to describe the recommended data; 根据所述第一信息,获取所述推荐的数据。Acquiring the recommended data according to the first information. 2.根据权利要求1所述的方法,其特征在于,所述第一信息包括所述推荐的数据的类型信息、时间信息和业务信息中的至少一种;2. The method according to claim 1, wherein the first information includes at least one of type information, time information and business information of the recommended data; 其中,所述类型信息包括数据通信协议信息,其中所述数据通信协议信息与所述推荐的数据的类型对应。Wherein, the type information includes data communication protocol information, wherein the data communication protocol information corresponds to the type of the recommended data. 3.根据权利要求1或2所述的方法,其特征在于,所述数据传输报文包括实时消息传输协议RTMP报文,所述第一信息封装在所述RTMP报文的基本头或消息头中。3. The method according to claim 1 or 2, wherein the data transmission message comprises a real-time message transfer protocol RTMP message, and the first information is encapsulated in a basic header or a message header of the RTMP message middle. 4.根据权利要求1-3任一项所述的方法,其特征在于,还包括:4. The method according to any one of claims 1-3, further comprising: 根据所述第一信息,发送所述推荐的数据。Send the recommended data according to the first information. 5.根据权利要求4所述的方法,其特征在于,所述根据所述第一信息,发送所述推荐的数据,包括:5. The method according to claim 4, wherein the sending the recommended data according to the first information comprises: 根据所述第一信息,获取所述推荐的数据关联的actor对象;According to the first information, acquire the actor object associated with the recommended data; 确定所述actor对象的状态为执行状态,以发送所述推荐的数据。Determine that the state of the actor object is an execution state, so as to send the recommended data. 6.根据权利要求5所述的方法,其特征在于,还包括:6. The method according to claim 5, further comprising: 将所述actor对象放入缓存池列表,并确定所述actor对象的状态为复用状态。Put the actor object into the cache pool list, and determine that the state of the actor object is a reuse state. 7.根据权利要求5或6所述的方法,其特征在于,所述根据所述第一信息,获取所述推荐的数据关联的actor对象,包括:7. The method according to claim 5 or 6, wherein said acquiring the recommended data-associated actor object according to said first information comprises: 当确定缓存池列表中包括所述推荐的数据关联的actor对象时,将所述actor对象的状态由复用状态修改为等待状态;When it is determined that the recommended data-associated actor object is included in the buffer pool list, the state of the actor object is modified from a reuse state to a waiting state; 当确定所述缓存池列表中不包括所述推荐的数据关联的actor对象时,建立所述推荐的数据关联的actor对象,并确定所述actor对象的状态为等待状态。When it is determined that the recommended data-associated actor object is not included in the buffer pool list, the recommended data-associated actor object is established, and the state of the actor object is determined to be a waiting state. 8.根据权利要求7所述的方法,其特征在于,在推荐的数据包括金融产品的情况下,所述建立所述推荐的数据关联的actor对象,包括:8. The method according to claim 7, wherein when the recommended data includes a financial product, the establishment of the actor object associated with the recommended data includes: 根据所述第一信息,从数据库中获取金融产品数据FPD,所述FPD包括金融产品的标识ID、名称、最低金额、年利率、落地页统一资源定位器URL和时间限制中的至少一种;According to the first information, the financial product data FPD is obtained from the database, and the FPD includes at least one of the identification ID, name, minimum amount, annual interest rate, landing page uniform resource locator URL and time limit of the financial product; 根据索引函数,确定所述FPD对应的索引字段;According to the index function, determine the index field corresponding to the FPD; 建立所述FPD关联的actor对象,其中,所述actor对象包括所述索引字段;Establishing an actor object associated with the FPD, wherein the actor object includes the index field; 其中,所述确定所述actor对象的状态为执行状态,以向所述第三设备发送所述推荐的数据,包括:Wherein, the determining that the state of the actor object is an execution state so as to send the recommended data to the third device includes: 确定所述actor对象的状态为执行状态,以向所述第三设备发送所述actor对象的索引字段对应的FPD中的数据。Determine that the state of the actor object is an execution state, so as to send the data in the FPD corresponding to the index field of the actor object to the third device. 9.根据权利要求1-8任一项所述的方法,其特征在于,所述数据传输报文还包括第二信息,所述第一信息封装在所述数据传输报文的头部,所述第二信息用于指示触发所述服务器向观众终端推送所述金融产品的条件。9. The method according to any one of claims 1-8, wherein the data transmission message further includes second information, and the first information is encapsulated in the header of the data transmission message, so The second information is used to indicate the conditions that trigger the server to push the financial product to the audience terminal. 10.一种实时数据推送的方法,其特征在于,包括:10. A method for real-time data push, comprising: 获取推荐的数据;Get recommended data; 确定第一信息,所述第一信息用于描述所述推荐的数据;determining first information, the first information being used to describe the recommended data; 发送数据传输报文,所述数据传输报文包括直播数据流和所述第一信息,所述第一信息封装在所述数据传输报文的头部。Sending a data transmission message, where the data transmission message includes the live data stream and the first information, and the first information is encapsulated in the header of the data transmission message. 11.根据权利要求10所述的方法,其特征在于,所述第一信息包括所述推荐的数据的类型信息、时间信息和业务信息中的至少一种;11. The method according to claim 10, wherein the first information includes at least one of type information, time information and business information of the recommended data; 其中,所述类型信息包括数据通信协议信息,其中所述数据通信协议信息与所述推荐的数据的类型对应。Wherein, the type information includes data communication protocol information, wherein the data communication protocol information corresponds to the type of the recommended data. 12.根据权利要求10或11所述的方法,其特征在于,所述数据传输报文包括实时消息传输协议RTMP报文,所述第一信息封装在所述RTMP报文的基本头或消息头中。12. The method according to claim 10 or 11, wherein the data transmission message comprises a real-time message transmission protocol RTMP message, and the first information is encapsulated in a basic header or a message header of the RTMP message middle. 13.根据权利要求10-12任一项所述的方法,其特征在于,所述获取推荐的数据,包括:13. The method according to any one of claims 10-12, wherein said acquiring recommended data comprises: 根据推荐的金融产品的金融产品数据FPD,显示所述金融产品,所述FPD包括金融产品的标识、名称、最低金额、年利率、落地页统一资源定位器URL和时间限制中的至少一种;According to the financial product data FPD of the recommended financial product, display the financial product, the FPD includes at least one of the logo, name, minimum amount, annual interest rate, URL of the landing page uniform resource locator and time limit of the financial product; 通过第一输入区域获取用户输入的推送指令,所述推送指令用于指示推送所述金融产品;Acquiring a push instruction input by a user through the first input area, the push instruction being used to instruct to push the financial product; 根据所述推送指令,确定推荐所述金融产品。According to the push instruction, it is determined to recommend the financial product. 14.根据权利要求10-13任一项所述的方法,其特征在于,所述数据传输报文还包括第二信息,所述第二信息封装在所述数据传输报文的头部,所述第二信息用于指示触发所述服务器向观众终端推送所述金融产品的条件。14. The method according to any one of claims 10-13, wherein the data transmission message further includes second information, and the second information is encapsulated in the header of the data transmission message, so The second information is used to indicate the conditions that trigger the server to push the financial product to the audience terminal. 15.一种实时数据推送的装置,其特征在于,包括:15. A real-time data push device, characterized in that it comprises: 收发单元,用于接收数据传输报文,所述数据传输报文包括直播数据流和第一信息,其中,所述第一信息封装在所述数据传输报文的头部,所述第一信息用于描述推荐的数据;A transceiver unit, configured to receive a data transmission message, the data transmission message includes a live data stream and first information, wherein the first information is encapsulated in the header of the data transmission message, and the first information Data used to describe recommendations; 处理单元,用于根据所述第一信息,获取所述推荐的数据。A processing unit, configured to acquire the recommended data according to the first information. 16.一种实时数据推送的装置,其特征在于,包括:16. A device for real-time data push, comprising: 获取单元,用于获取推荐的数据;An acquisition unit, configured to acquire recommended data; 处理单元,用于确定第一信息,所述第一信息用于描述所述推荐的数据;a processing unit configured to determine first information for describing the recommended data; 收发单元,用于发送数据传输报文,所述数据传输报文包括直播数据流和所述第一信息,所述第一信息封装在所述数据传输报文的头部。The transceiver unit is configured to send a data transmission message, the data transmission message includes the live data stream and the first information, and the first information is encapsulated in the header of the data transmission message. 17.一种电子设备,其特征在于,包括:处理器和存储器;17. An electronic device, comprising: a processor and a memory; 所述存储器,用于存储计算机程序;The memory is used to store computer programs; 所述处理器,用于执行所述计算机程序以实现如权利要求1~14任一项所述的方法。The processor is configured to execute the computer program to implement the method according to any one of claims 1-14. 18.一种计算机可读存储介质,其特征在于,所述存储介质包括计算机指令,当所述指令被计算机执行时,使得所述计算机实现如权利要求1~14任一项所述的方法。18. A computer-readable storage medium, characterized in that the storage medium comprises computer instructions, and when the instructions are executed by a computer, the computer implements the method according to any one of claims 1-14. 19.一种计算机程序产品,其特征在于,包括计算机程序代码,当所述计算机程序代码被电子设备运行时,使得所述电子设备执行权利要求1~14中任一项所述的方法。19. A computer program product, characterized by comprising computer program code, when the computer program code is executed by an electronic device, the electronic device is made to execute the method according to any one of claims 1-14.
CN202111176054.XA 2021-10-09 2021-10-09 Method and device for real-time data push Pending CN115996215A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111176054.XA CN115996215A (en) 2021-10-09 2021-10-09 Method and device for real-time data push

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111176054.XA CN115996215A (en) 2021-10-09 2021-10-09 Method and device for real-time data push

Publications (1)

Publication Number Publication Date
CN115996215A true CN115996215A (en) 2023-04-21

Family

ID=85990630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111176054.XA Pending CN115996215A (en) 2021-10-09 2021-10-09 Method and device for real-time data push

Country Status (1)

Country Link
CN (1) CN115996215A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110231995A (en) * 2019-05-20 2019-09-13 平安科技(深圳)有限公司 A kind of method for scheduling task based on Actor model, device and storage medium
CN112399200A (en) * 2019-08-13 2021-02-23 腾讯科技(深圳)有限公司 Method, device and storage medium for recommending information in live broadcast
CN112492331A (en) * 2020-11-05 2021-03-12 北京三快在线科技有限公司 Live broadcast method, device, system and storage medium
CN112532719A (en) * 2020-11-26 2021-03-19 腾讯科技(深圳)有限公司 Information flow pushing method, device, equipment and computer readable storage medium
CN112612604A (en) * 2020-12-14 2021-04-06 上海哔哩哔哩科技有限公司 Task scheduling method and device based on Actor model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110231995A (en) * 2019-05-20 2019-09-13 平安科技(深圳)有限公司 A kind of method for scheduling task based on Actor model, device and storage medium
CN112399200A (en) * 2019-08-13 2021-02-23 腾讯科技(深圳)有限公司 Method, device and storage medium for recommending information in live broadcast
CN112492331A (en) * 2020-11-05 2021-03-12 北京三快在线科技有限公司 Live broadcast method, device, system and storage medium
CN112532719A (en) * 2020-11-26 2021-03-19 腾讯科技(深圳)有限公司 Information flow pushing method, device, equipment and computer readable storage medium
CN112612604A (en) * 2020-12-14 2021-04-06 上海哔哩哔哩科技有限公司 Task scheduling method and device based on Actor model

Similar Documents

Publication Publication Date Title
US12153873B2 (en) Reducing time to first encrypted frame in a content stream
JP4363847B2 (en) Digital TV application protocol for interactive TV
US9369330B2 (en) Service gateway for interactive television
WO2021114845A1 (en) Interactive service processing method, system and device, and storage medium
CN103581699B (en) Video playing method, streaming media server and streaming media playing system
CN107666619B (en) Live data transmission method, device, electronic device, server and storage medium
CN110996160B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN108200447B (en) Live broadcast data transmission method and device, electronic equipment, server and storage medium
US8862766B2 (en) Customized data delivery and network configuration via aggregation of device attributes
CN103974111B (en) By the method, apparatus of the data transfer on intelligent terminal to television terminal
CN105407365A (en) Advertisement data management method and advertisement management server side
CN103281294A (en) Data sharing method and electronic equipment
KR20190003729A (en) Method and apparatus for mpeg media transport integration in content distribution networks
US20080248782A1 (en) Providing Devices With Command Functionality in Content Streams
CN103024491A (en) Video playing method and video playing system of mobile terminal
KR102473346B1 (en) Method and apparatus for digital broadcast services
CN104735475A (en) Video-on-demand method, back-stage management server and video-on-demand system
GB2508138A (en) Delivering video content to a device by storing multiple formats
CN116261021B (en) A video stream playing method, device, electronic equipment and storage medium
CN115996215A (en) Method and device for real-time data push
CN103152385A (en) Triggering, achieving and executing method of relevant application and relevant equipment
US10231004B2 (en) Network recording service
WO2022166591A1 (en) Method and apparatus for playing live streaming resource, and storage medium and electronic device
KR101390892B1 (en) Dynamic item management system for decive with multi-version protocal using srs and method thereof
KR102593528B1 (en) Method for managing notification request for warehousing of product, device for the same, and computer program for the same

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