Movatterモバイル変換


[0]ホーム

URL:


CN108574850A - A live broadcast resource allocation method, device, electronic equipment and storage medium - Google Patents

A live broadcast resource allocation method, device, electronic equipment and storage medium
Download PDF

Info

Publication number
CN108574850A
CN108574850ACN201710779700.9ACN201710779700ACN108574850ACN 108574850 ACN108574850 ACN 108574850ACN 201710779700 ACN201710779700 ACN 201710779700ACN 108574850 ACN108574850 ACN 108574850A
Authority
CN
China
Prior art keywords
user
main broadcaster
resource
label
anchor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710779700.9A
Other languages
Chinese (zh)
Other versions
CN108574850B (en
Inventor
王晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co LtdfiledCriticalBeijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201710779700.9ApriorityCriticalpatent/CN108574850B/en
Publication of CN108574850ApublicationCriticalpatent/CN108574850A/en
Application grantedgrantedCritical
Publication of CN108574850BpublicationCriticalpatent/CN108574850B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例提供了一种直播资源分配方法、装置、电子设备及存储介质,其中方法包括:为一个或多个视频直播应用程序的后台服务器集群创建消息队列;获取所述消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于所述所有用户日志以及所有主播日志,确定所述预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容;按照预设资源配置规则以及所述一个或多个视频直播应用程序的每个资源请求,将与所述每个资源请求对应的用户资源或主播资源,对应分配给所述一个或多个视频直播应用程序。本发明实施例实现了不同直播平台的用户和主播的资源整合及用户和主播的资源按需分配。

Embodiments of the present invention provide a live broadcast resource allocation method, device, electronic equipment, and storage medium, wherein the method includes: creating a message queue for one or more background server clusters of live video application programs; obtaining the preset information in the message queue All user logs and all anchor logs within the time period, through the rules corresponding to each label in the preset label list, based on the all user logs and all anchor logs, determine the label content corresponding to each user resource within the preset time, and the label content corresponding to each anchor resource; according to the preset resource configuration rules and each resource request of the one or more live video application programs, the user resources or anchor resources corresponding to each resource request are corresponding to Assigned to the one or more live video applications. The embodiment of the present invention realizes resource integration of users and anchors of different live broadcast platforms and resource allocation of users and anchors on demand.

Description

Translated fromChinese
一种直播资源分配方法、装置、电子设备及存储介质A live broadcast resource allocation method, device, electronic equipment and storage medium

技术领域technical field

本发明涉及计算机信息处理技术领域,特别是涉及一种直播资源分配方法、装置、电子设备及存储介质。The present invention relates to the technical field of computer information processing, in particular to a live resource allocation method, device, electronic equipment and storage medium.

背景技术Background technique

随着互联网产业的快速发展,视频直播的爆发已势不可挡。在当前直播市场日益火爆的今天,有很多公司和客户都有运营一款直播产品的需求。如直播展示主播的才艺、直播卖自己的商品、直播高竞技水平的游戏比赛、直播户外有趣的活动、直播制作精良的综艺节目等。With the rapid development of the Internet industry, the outbreak of live video broadcasting is unstoppable. In today's increasingly hot live broadcast market, many companies and customers have the need to operate a live broadcast product. Such as live showcasing the talent of the anchor, live selling your own products, live broadcasting high-level game competitions, live broadcasting outdoor interesting activities, live broadcasting well-produced variety shows, etc.

现有视频直播平台大多为观众用户与主播进行互动的交互平台。视频直播平台通过后台集群服务,为观众用户以及主播提供账号管理、房间管理等基础服务,还通过状态管理、反馈管理等为主播以及用户提供直播过程中的业务服务,另外还为用户以及主播提供第三方支付管理等业务。Most of the existing video live broadcast platforms are interactive platforms for audience users to interact with anchors. The video live broadcast platform provides basic services such as account management and room management for viewers and anchors through background cluster services. Third-party payment management and other services.

现有视频直播平台存在的问题为,部分视频直播平台有优质的内容和主播资源,但缺少观众用户,导致优质的直播内容无法更好的让更多人看到并推广出去,严重限制了视频直播平台收入。另外,部分视频直播平台有庞大的观众用户,但是缺少优质的主播和内容,或者自己的主播和内容资源有限满足不了海量观众用户的需求,导致观众用户流失。The problem existing in the existing video live broadcast platforms is that some video live broadcast platforms have high-quality content and anchor resources, but lack viewers and users, resulting in high-quality live broadcast content that cannot be seen and promoted by more people, which seriously limits the quality of video broadcasting. Live platform revenue. In addition, some live video platforms have huge audiences, but lack high-quality anchors and content, or their own anchors and content resources are limited and cannot meet the needs of a large number of audience users, resulting in the loss of audience users.

发明内容Contents of the invention

本发明实施例的目的在于提供一种直播资源分配方法、装置、电子设备及存储介质,以实现不同直播平台的用户和主播的资源整合及用户和主播的资源按需分配。具体技术方案如下:The purpose of the embodiment of the present invention is to provide a live broadcast resource allocation method, device, electronic equipment and storage medium, so as to realize the resource integration of users and anchors of different live broadcast platforms and the resource allocation of users and anchors on demand. The specific technical scheme is as follows:

为达到上述发明目的,本发明实施例公开了一种直播资源分配方法,包括:In order to achieve the purpose of the above invention, the embodiment of the present invention discloses a live broadcast resource allocation method, including:

为一个或多个视频直播应用程序的后台服务器集群创建消息队列;Create a message queue for one or more background server clusters of live video applications;

获取该消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于该所有用户日志以及所有主播日志,确定该预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容;Obtain all user logs and all anchor logs in the message queue within the preset time, and determine the resources of each user within the preset time based on all user logs and all anchor logs through the rules corresponding to each tag in the preset tag list. The corresponding label content, and the label content corresponding to each anchor resource;

按照预设资源配置规则以及该一个或多个视频直播应用程序的每个资源请求,将与该每个资源请求对应的用户资源或主播资源,对应分配给该一个或多个视频直播应用程序,其中,该每个资源请求为每个用户资源请求或每个主播资源请求,该每个用户资源请求包括所请求的用户资源对应的标签内容,该每个主播资源请求包括所请求的主播资源对应的标签内容。According to the preset resource configuration rules and each resource request of the one or more live video applications, correspondingly allocate the user resources or anchor resources corresponding to each resource request to the one or more live video applications, Wherein, each resource request is each user resource request or each anchor resource request, each user resource request includes the tag content corresponding to the requested user resource, and each anchor resource request includes the requested anchor resource corresponding content of the label.

可选地,该为一个或多个视频直播应用程序的后台服务器集群创建消息队列,包括:Optionally, create a message queue for one or more background server clusters of live video applications, including:

获取该一个或多个视频直播应用程序对应的每个主题,为该每个主题均创建队列,将该队列对应确定为该一个或多个视频直播应用程序的消息队列,其中,该主题包括用户日志以及主播日志。Obtain each topic corresponding to the one or more live video applications, create a queue for each topic, and determine the queue as the message queue of the one or more live video applications, wherein the topic includes user logs and host logs.

可选地,该获取该消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于该所有用户日志以及所有主播日志,确定该预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容,包括:Optionally, the acquisition of all user logs and all anchor logs in the message queue within a preset time period determines the preset time based on all user logs and all anchor logs through the rules corresponding to each tag in the preset tag list The label content corresponding to each user resource in , and the label content corresponding to each anchor resource, including:

获取该消息队列中所有用户日志以及所有主播日志,存储到全文搜索引擎;Obtain all user logs and all anchor logs in the message queue and store them in the full-text search engine;

获取该全文搜索引擎中预设时间内该所有用户日志以及该所有主播日志;Obtain all user logs and all anchor logs within the preset time in the full-text search engine;

根据每个用户对应的所有用户日志,形成该每个用户的目标信息;根据每个主播对应的所有主播日志,形成该每个主播的目标信息;Form the target information of each user according to all user logs corresponding to each user; form the target information of each anchor according to all anchor logs corresponding to each anchor;

从数据库的预设标签列表中,获取每个标签以及该每个标签对应的规则;Obtain each tag and the rules corresponding to each tag from the preset tag list in the database;

在该每个标签对应的用户评分规则下,对该每个用户的目标信息打分,得到该每个用户对应于该每个标签的分数值;Under the user scoring rule corresponding to each label, score the target information of each user, and obtain the score value corresponding to each label of each user;

获取该每个用户的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为该每个用户对应的标签内容,其中,该N为1≤N≤3的自然数;Obtaining the score value greater than the threshold value of each user, and determining N labels corresponding to the score value greater than the threshold value as the label content corresponding to each user, wherein the N is a natural number of 1≤N≤3;

在该每个标签对应的主播评分规则下,对该每个主播的目标信息打分,得到该每个主播对应于该每个标签的分数值;Under the anchor scoring rules corresponding to each label, score the target information of each anchor, and obtain the score value corresponding to each label of each anchor;

获取该每个主播的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为该每个主播对应的标签内容。Obtain the score value of each anchor greater than the threshold, and determine the N tags corresponding to the score greater than the threshold as the tag content corresponding to each anchor.

可选地,该在该每个标签对应的用户评分规则下,对该每个用户的目标信息打分,得到该每个用户对应于该每个标签的分数值,包括:Optionally, under the user scoring rules corresponding to each label, score the target information of each user to obtain the score value of each user corresponding to each label, including:

获取该每个标签所对应的一个或多个用户信息评分项目,将该一个或多个用户信息评分项目对应的评分规则,对应确定为该每个标签对应的用户评分规则,其中,该用户信息评分项目为表示用户日志属性的项目;Obtain one or more user information scoring items corresponding to each label, and determine the scoring rules corresponding to the one or more user information scoring items as the user scoring rules corresponding to each label, wherein the user information The scoring item is an item representing a user log attribute;

通过该每个标签对应的用户评分规则,对该每个用户的目标信息打分,得到该每个用户对应于该每个标签的分数值;Score the target information of each user through the user scoring rules corresponding to each label, and obtain the score value corresponding to each label of each user;

该在该每个标签对应的主播评分规则下,对该每个主播的目标信息打分,得到该每个主播对应于该每个标签的分数值,包括:Under the anchor scoring rules corresponding to each label, score the target information of each anchor to obtain the score value of each anchor corresponding to each label, including:

获取该每个标签所对应的一个或多个主播信息评分项目,将该一个或多个主播信息评分项目对应的评分规则,对应确定为该每个标签对应的主播评分规则,其中,该主播信息评分项目为表示主播日志属性的项目;Obtain one or more anchor information scoring items corresponding to each label, and determine the scoring rules corresponding to the one or more anchor information scoring items as the anchor scoring rules corresponding to each label, wherein the anchor information The scoring item is an item representing the attribute of the anchor log;

通过该每个标签对应的主播评分规则,对该每个主播的目标信息打分,得到该每个主播对应于该每个标签的分数值。The target information of each anchor is scored according to the anchor scoring rule corresponding to each label, and the score value corresponding to each label of each anchor is obtained.

可选地,该获取该每个用户的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为该每个用户对应的标签内容之后,该方法还包括:Optionally, after obtaining the score value greater than the threshold value of each user, and determining the N tags corresponding to the score value greater than the threshold value as the tag content corresponding to each user, the method further includes:

将该预设时间内该每个用户以及该每个用户对应的标签内容,存储在缓存中;Store each user and the label content corresponding to each user in the cache within the preset time;

该获取该每个主播的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为该每个主播对应的标签内容之后,该方法还包括:After obtaining the score value greater than the threshold value of each anchor, and determining the N labels corresponding to the score value greater than the threshold value as the label content corresponding to each anchor, the method also includes:

将该预设时间内该每个主播以及该每个主播对应的标签内容,存储在缓存中。Store each anchor and tag content corresponding to each anchor within the preset time in the cache.

可选地,该按照预设资源配置规则以及该一个或多个视频直播应用程序的每个资源请求,将与该每个资源请求对应的用户资源或主播资源,对应分配给该一个或多个视频直播应用程序之前,该方法还包括:Optionally, according to the preset resource configuration rules and each resource request of the one or more live video application programs, the user resources or anchor resources corresponding to each resource request are correspondingly assigned to the one or more Before the live video application, the method also includes:

获取该一个或多个视频直播应用程序的每个资源请求;Obtain each resource request of the one or more live video applications;

按照每行对应为一条资源请求的排列方式,分别将该一个或多个视频直播应用程序中的用户资源请求或主播资源请求排列,形成该一个或多个视频直播应用程序的每个资源请求对应的一个或多个直播房间列表;According to the arrangement in which each row corresponds to a resource request, arrange the user resource requests or host resource requests in the one or more live video application programs respectively to form a corresponding resource request for the one or more live video application programs One or more live room lists of ;

该按照预设资源配置规则以及该一个或多个视频直播应用程序的每个资源请求,将与该每个资源请求对应的用户资源或主播资源,对应分配给该一个或多个视频直播应用程序,包括:According to the preset resource configuration rules and each resource request of the one or more live video applications, the user resources or anchor resources corresponding to each resource request are correspondingly assigned to the one or more live video applications ,include:

按照该预设资源配置规则以及该一个或多个视频直播应用程序的每个资源请求,确定该每个资源请求所请求的用户资源或主播资源;According to the preset resource configuration rules and each resource request of the one or more live video application programs, determine the user resources or host resources requested by each resource request;

将该一个或多个视频直播应用程序的资源请求所请求的用户资源或主播资源,对应分配到该一个或多个视频直播应用程序的直播房间列表。The user resource or anchor resource requested by the resource request of the one or more live video application programs corresponds to a list of live room rooms assigned to the one or more live video application programs.

可选地,该按照预设资源配置规则以及该一个或多个视频直播应用程序的每个资源请求,将与该每个资源请求对应的用户资源或主播资源,对应分配给该一个或多个视频直播应用程序之前,该方法还包括:Optionally, according to the preset resource configuration rules and each resource request of the one or more live video application programs, the user resources or anchor resources corresponding to each resource request are correspondingly assigned to the one or more Before the live video application, the method also includes:

获取该一个或多个视频直播应用程序中的每个用户资源请求;Obtain each user resource request in the one or more live video applications;

按照每行对应为一条用户资源请求的排列方式,分别将该一个或多个视频直播应用程序的用户资源请求排列,形成该一个或多个视频直播应用程序的每个用户资源请求对应的用户房间列表;According to the arrangement method in which each row corresponds to a user resource request, arrange the user resource requests of the one or more live video applications respectively to form the user room corresponding to each user resource request of the one or more live video applications list;

获取该一个或多个视频直播应用程序的每个主播资源请求;Obtain each anchor resource request of the one or more live video applications;

按照每行对应为一条主播资源请求的排列方式,分别将该一个或多个视频直播应用程序中的主播资源请求排列,形成该一个或多个视频直播应用程序的每个主播资源请求对应的主播房间列表;According to the arrangement method in which each row corresponds to a host resource request, respectively arrange the host resource requests in the one or more live video application programs to form the host corresponding to each host resource request of the one or more live video application programs room list;

该按照预设资源配置规则以及该一个或多个视频直播应用程序的每个资源请求,将与该每个资源请求对应的用户资源或主播资源,对应分配给该一个或多个视频直播应用程序,包括:According to the preset resource configuration rules and each resource request of the one or more live video applications, the user resources or anchor resources corresponding to each resource request are correspondingly assigned to the one or more live video applications ,include:

按照该预设资源配置规则以及该一个或多个视频直播应用程序的用户资源请求,确定该每个用户资源请求所请求的用户资源;According to the preset resource configuration rules and the user resource requests of the one or more live video application programs, determine the user resources requested by each user resource request;

将该一个或多个视频直播应用程序所请求的用户资源,对应分配给该一个或多个视频直播应用程序的用户房间列表;The user resources requested by the one or more live video applications correspond to the list of user rooms assigned to the one or more live video applications;

按照该预设资源配置规则以及该一个或多个视频直播应用程序的主播资源请求,确定该每个主播资源请求所请求的主播资源;According to the preset resource configuration rules and the anchor resource requests of the one or more live video application programs, determine the anchor resource requested by each anchor resource request;

将该一个或多个视频直播应用程序所请求的主播资源,对应分配给该一个或多个视频直播应用程序的主播房间列表。The host resource requested by the one or more live video applications corresponds to a list of host rooms allocated to the one or more live video applications.

可选地,在将与该每个资源请求对应的用户资源或主播资源,对应分配给该一个或多个视频直播应用程序之前,该方法还包括:Optionally, before assigning the user resources or anchor resources corresponding to each resource request to the one or more live video application programs, the method further includes:

在缓存中获取该一个或多个视频直播应用程序的用户资源请求所需的标签内容对应的用户资源,或该一个或多个视频直播应用程序的主播资源请求所需的标签内容对应的主播资源。Obtain in the cache the user resource corresponding to the tag content required by the user resource request of the one or more live video applications, or the anchor resource corresponding to the tag content required by the anchor resource request of the one or more live video applications .

为达到上述发明目的,本发明实施例还公开了一种直播资源分配装置,包括:In order to achieve the purpose of the above invention, the embodiment of the present invention also discloses a live broadcast resource allocation device, including:

创建队列模块,用于为一个或多个视频直播应用程序的后台服务器集群创建消息队列;Create a queue module, which is used to create a message queue for the background server cluster of one or more live video applications;

标签确定模块,用于获取该消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于该所有用户日志以及所有主播日志,确定该预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容;The label determination module is used to obtain all user logs and all anchor logs in the message queue within a preset time period, and determine the preset based on the rules corresponding to each label in the preset label list The tag content corresponding to each user resource and the tag content corresponding to each anchor resource within the time period;

分配模块,用于按照预设资源配置规则以及该一个或多个视频直播应用程序的每个资源请求,将与该每个资源请求对应的用户资源或主播资源,对应分配给该一个或多个视频直播应用程序,其中,该每个资源请求为每个用户资源请求或每个主播资源请求,该每个用户资源请求包括所请求的用户资源对应的标签内容,该每个主播资源请求包括所请求的主播资源对应的标签内容。An allocation module, configured to allocate the user resources or anchor resources corresponding to each resource request to the one or more live video applications according to preset resource configuration rules and each resource request of the one or more live video applications A live video application program, wherein each resource request is each user resource request or each anchor resource request, each user resource request includes the tag content corresponding to the requested user resource, and each anchor resource request includes the The tag content corresponding to the requested host resource.

可选地,该创建队列模块,具体用于获取该一个或多个视频直播应用程序对应的每个主题,为该每个主题均创建队列,将该队列对应确定为该一个或多个视频直播应用程序的消息队列,其中,该主题包括用户日志以及主播日志。Optionally, the queue creation module is specifically configured to obtain each topic corresponding to the one or more live video applications, create a queue for each topic, and determine the queue as the one or more live video applications The message queue of the application, where the topic includes user logs and anchor logs.

可选地,该标签确定模块,包括:Optionally, the tags identify modules, including:

存储子模块,用于获取该消息队列中所有用户日志以及所有主播日志,存储到全文搜索引擎;The storage sub-module is used to obtain all user logs and all anchor logs in the message queue and store them in the full-text search engine;

第一获取子模块,用于获取该全文搜索引擎中预设时间内该所有用户日志以及该所有主播日志;The first obtaining sub-module is used to obtain all user logs and all anchor logs in the full-text search engine within a preset time;

目标信息确定子模块,用于根据每个用户对应的所有用户日志,形成该每个用户的目标信息;根据每个主播对应的所有主播日志,形成该每个主播的目标信息;The target information determination sub-module is used to form the target information of each user according to all user logs corresponding to each user; to form the target information of each anchor according to all the anchor logs corresponding to each anchor;

第二获取子模块,用于从数据库的预设标签列表中,获取每个标签以及该每个标签对应的规则;The second obtaining submodule is used to obtain each tag and the rules corresponding to each tag from the preset tag list in the database;

用户分数确定子模块,用于在该每个标签对应的用户评分规则下,对该每个用户的目标信息打分,得到该每个用户对应于该每个标签的分数值;The user score determination submodule is used to score the target information of each user under the user scoring rules corresponding to each label, and obtain the score value corresponding to each label of each user;

用户标签确定子模块,用于获取该每个用户的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为该每个用户对应的标签内容,其中,该N 为1≤N≤3的自然数;The user label determination sub-module is used to obtain the score value greater than the threshold value of each user, and determine the N labels corresponding to the score value greater than the threshold value as the label content corresponding to each user, wherein the N is 1≤N ≤3 natural numbers;

主播分数确定子模块,用于在该每个标签对应的主播评分规则下,对该每个主播的目标信息打分,得到该每个主播对应于该每个标签的分数值;The anchor score determination submodule is used to score the target information of each anchor under the anchor scoring rules corresponding to each label, and obtain the score value corresponding to each label of each anchor;

主播标签确定子模块,用于获取该每个主播的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为该每个主播对应的标签内容。The host label determination sub-module is used to obtain the score value greater than the threshold value of each anchor, and determine the N labels corresponding to the score value greater than the threshold value as the label content corresponding to each anchor.

可选地,该用户分数确定子模块,包括:Optionally, the user score determination submodule includes:

用户规则确定单元,用于获取该每个标签所对应的一个或多个用户信息评分项目,将该一个或多个用户信息评分项目对应的评分规则,对应确定为该每个标签对应的用户评分规则,其中,该用户信息评分项目为表示用户日志属性的项目;A user rule determination unit, configured to obtain one or more user information scoring items corresponding to each label, and determine the scoring rules corresponding to the one or more user information scoring items as the user scoring corresponding to each label A rule, wherein the user information scoring item is an item representing user log attributes;

用户分数确定单元,用于通过该每个标签对应的用户评分规则,对该每个用户的目标信息打分,得到该每个用户对应于该每个标签的分数值;The user score determination unit is used to score the target information of each user through the user scoring rule corresponding to each label, and obtain the score value corresponding to each label of each user;

该主播分数确定子模块,包括:The anchor score determination sub-module includes:

主播规则确定单元,用于获取该每个标签所对应的一个或多个主播信息评分项目,将该一个或多个主播信息评分项目对应的评分规则,对应确定为该每个标签对应的主播评分规则,其中,该主播信息评分项目为表示主播日志属性的项目;An anchor rule determination unit, configured to obtain one or more anchor information scoring items corresponding to each label, and determine the scoring rules corresponding to the one or more anchor information scoring items as the anchor scoring corresponding to each label A rule, wherein the anchor information scoring item is an item representing the attribute of the anchor log;

主播分数确定单元,用于通过该每个标签对应的主播评分规则,对该每个主播的目标信息打分,得到该每个主播对应于该每个标签的分数值。The host score determining unit is configured to score the target information of each host through the host scoring rule corresponding to each tag, and obtain the score value of each host corresponding to each tag.

可选地,该装置还包括:Optionally, the device also includes:

用户信息存储模块,用于将该预设时间内该每个用户以及该每个用户对应的标签内容,存储在缓存中;The user information storage module is used to store each user and the label content corresponding to each user in the cache within the preset time;

主播信息存储模块,用于将该预设时间内该每个主播以及该每个主播对应的标签内容,存储在缓存中。The anchor information storage module is used to store each anchor and the tag content corresponding to each anchor within the preset time in the cache.

可选地,该装置还包括:Optionally, the device also includes:

请求获取模块,用于获取该一个或多个视频直播应用程序的每个资源请求;A request acquisition module, configured to acquire each resource request of the one or more live video applications;

列表建立模块,用于按照每行对应为一条资源请求的排列方式,分别将该一个或多个视频直播应用程序中的用户资源请求或主播资源请求排列,形成该一个或多个视频直播应用程序的每个资源请求对应的一个或多个直播房间列表;The list building module is used to arrange the user resource requests or anchor resource requests in the one or more live video application programs respectively according to the arrangement mode in which each row corresponds to a resource request, to form the one or more live video application programs One or more live room lists corresponding to each resource request of ;

该分配模块,包括:The distribution module, including:

资源确定子模块,用于按照该预设资源配置规则以及该一个或多个视频直播应用程序的每个资源请求,确定该每个资源请求所请求的用户资源或主播资源;The resource determination submodule is used to determine the user resources or anchor resources requested by each resource request according to the preset resource configuration rules and each resource request of the one or more live video applications;

资源分配子模块,用于将该一个或多个视频直播应用程序的资源请求所请求的用户资源或主播资源,对应分配到该一个或多个视频直播应用程序的直播房间列表。The resource allocation sub-module is used for assigning the user resources or host resources requested by the resource request of the one or more live video application programs to the live room list of the one or more live video application programs.

可选地,该装置还包括:Optionally, the device also includes:

用户请求获取模块,用于获取该一个或多个视频直播应用程序中的每个用户资源请求;A user request obtaining module, configured to obtain each user resource request in the one or more live video applications;

用户列表建立模块,用于按照每行对应为一条用户资源请求的排列方式,分别将该一个或多个视频直播应用程序的用户资源请求排列,形成该一个或多个视频直播应用程序的每个用户资源请求对应的用户房间列表;The user list building module is used to arrange the user resource requests of the one or more live video application programs according to the arrangement mode in which each row corresponds to a user resource request, so as to form each of the one or more live video live application programs. The user room list corresponding to the user resource request;

主播请求获取模块,用于获取该一个或多个视频直播应用程序的每个主播资源请求;An anchor request acquisition module, configured to acquire each anchor resource request of the one or more live video applications;

主播列表建立模块,用于按照每行对应为一条主播资源请求的排列方式,分别将该一个或多个视频直播应用程序中的主播资源请求排列,形成该一个或多个视频直播应用程序的每个主播资源请求对应的主播房间列表;The anchor list building module is used to arrange the anchor resource requests in the one or more live video application programs according to the arrangement mode in which each row corresponds to a anchor resource request, so as to form each of the one or more live video application programs. A list of host rooms corresponding to each host resource request;

该分配模块,包括:The distribution module, including:

用户资源确定子模块,用于按照该预设资源配置规则以及该一个或多个视频直播应用程序的用户资源请求,确定该每个用户资源请求所请求的用户资源;A user resource determination submodule, configured to determine the user resources requested by each user resource request according to the preset resource configuration rules and the user resource requests of the one or more live video application programs;

用户资源分配子模块,用于将该一个或多个视频直播应用程序所请求的用户资源,对应分配给该一个或多个视频直播应用程序的用户房间列表;The user resource allocation sub-module is used to assign the user resources requested by the one or more live video application programs to the list of user rooms corresponding to the one or more live video application programs;

主播资源确定子模块,用于按照该预设资源配置规则以及该一个或多个视频直播应用程序的主播资源请求,确定该每个主播资源请求所请求的主播资源;An anchor resource determination submodule, configured to determine the anchor resources requested by each anchor resource request according to the preset resource configuration rules and the anchor resource requests of the one or more live video applications;

主播资源分配子模块,用于将该一个或多个视频直播应用程序所请求的主播资源,对应分配给该一个或多个视频直播应用程序的主播房间列表。The host resource allocation sub-module is used for correspondingly assigning the host resources requested by the one or more live video application programs to the list of host rooms for the one or more live video application programs.

可选地,该装置还包括:Optionally, the device also includes:

资源获取模块,用于在缓存中获取该一个或多个视频直播应用程序的用户资源请求所需的标签内容对应的用户资源,或该一个或多个视频直播应用程序的主播资源请求所需的标签内容对应的主播资源。The resource acquisition module is used to obtain in the cache the user resource corresponding to the tag content required by the user resource request of the one or more live video applications, or the resource request required by the anchor resource request of the one or more live video applications The host resource corresponding to the tag content.

为达到上述发明目的,本发明实施例还公开了一种电子设备,包括存储器和处理器;In order to achieve the purpose of the above invention, the embodiment of the invention also discloses an electronic device, including a memory and a processor;

该存储器,用于储存可执行程序代码;The memory is used to store executable program codes;

该处理器,用于读取该存储器中存储的可执行程序代码,以执行上述直播资源分配方法的任一方法步骤。The processor is configured to read the executable program code stored in the memory to execute any method step of the above live resource allocation method.

为达到上述发明目的,本发明实施例提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,该计算机程序被处理器执行时实现上述直播资源分配方法的任一方法步骤。In order to achieve the purpose of the above invention, an embodiment of the present invention provides a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, any method of the above live resource allocation method is implemented step.

本发明实施例提供的一种直播资源分配方法、装置、电子设备及存储介质,以实现不同直播平台的用户和主播的资源整合及用户和主播的资源按需分配。具体为,为一个或多个视频直播应用程序的后台服务器集群创建消息队列,获取该消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,确定预设时间内每个用户对应的标签内容,以及每个主播对应的标签内容。首先,通过创建消息队列,实现缓存用户日志以及主播日志,避免数据库存储压力过大。然后,通过获取消息队列中预设时间的所用用户日志以及所用主播日志,分析每个用户日志对应的行为或者每个主播日志对应的行为,进而实现为每个用户以及每个主播打上个性化的标签内容。最后,按照每个视频直播应用程序的每个资源请求,找到与每个资源请求含有的标签内容对应的主播资源或者用户资源,将这些主播资源或者用户资源匹配给每个视频直播应用程序。Embodiments of the present invention provide a live broadcast resource allocation method, device, electronic equipment, and storage medium to realize resource integration between users and anchors of different live broadcast platforms and resource allocation of users and anchors on demand. Specifically, create a message queue for the background server cluster of one or more live video applications, obtain all user logs and all anchor logs in the message queue within a preset time period, and pass the rules corresponding to each tag in the preset tag list, Determine the tag content corresponding to each user within the preset time, and the tag content corresponding to each anchor. First, create a message queue to cache user logs and anchor logs to avoid excessive pressure on database storage. Then, by obtaining the user log and the anchor log used at the preset time in the message queue, analyze the behavior corresponding to each user log or the behavior corresponding to each anchor log, and then realize the personalization of each user and each anchor label content. Finally, according to each resource request of each live video application, find anchor resources or user resources corresponding to the tag content contained in each resource request, and match these anchor resources or user resources to each live video application.

本发明实施例通过分析一个或多个视频直播应用程序的每个资源请求、每个用户日志对应的行为以及每个主播日志对应的行为,最终达到了打通一个或多个视频直播应用程序的数据,实现个性化的匹配一个或多个视频直播应用程序程序的用户资源以及主播资源。另外,本发明实施例根据一个或多个视频直播应用程序的资源请求按需导入资源,即为缺少用户的直播平台导入匹配的用户资源,为缺少主播的直播平台导入高质量的直播内容,这种资源导入方式更加精确,对于视频直播应用程序的运营也降低了成本。In the embodiment of the present invention, by analyzing each resource request of one or more live video application programs, the behavior corresponding to each user log, and the behavior corresponding to each anchor log, the data of one or more live video live application programs is finally achieved. , to achieve personalized matching of user resources and anchor resources of one or more live video application programs. In addition, the embodiment of the present invention imports resources on demand according to resource requests of one or more live video application programs, that is, imports matching user resources for live broadcast platforms that lack users, and imports high-quality live content for live broadcast platforms that lack anchors. This resource import method is more accurate, and the operation cost of the live video application is also reduced.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为现有技术中多个视频直播应用程序中每个视频直播应用程序后台的独立架构;Fig. 1 is the independent architecture of each live video application background in multiple live video application programs in the prior art;

图2为本发明实施例的一种直播资源分配方法第一流程图;FIG. 2 is a first flow chart of a live resource allocation method according to an embodiment of the present invention;

图3为本发明实施例的一种直播资源分配方法的标签内容确定方法流程图;FIG. 3 is a flow chart of a method for determining tag content in a live resource allocation method according to an embodiment of the present invention;

图4为本发明实施例的一种直播资源系统架构图;FIG. 4 is a system architecture diagram of a live broadcast resource according to an embodiment of the present invention;

图5为本发明实施例的视频直播A平台的后台服务框图;Fig. 5 is the background service block diagram of the live video A platform of the embodiment of the present invention;

图6为本发明实施例的一种直播资源分配方法第二流程图;FIG. 6 is a second flow chart of a live resource allocation method according to an embodiment of the present invention;

图7为本发明实施例的一种直播资源分配装置结构示意图;FIG. 7 is a schematic structural diagram of a device for allocating live broadcast resources according to an embodiment of the present invention;

图8为本发明实施例的一种电子设备结构示意图。FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

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

随着互联网产业的快速发展,视频直播已成为日益普及的流行文化,其应用场景也很多,比如在线教育、美女秀场、在线医疗、电商活动、游戏直播、体育直播、户外直播等。目前业界的做法是,不同的直播应用使用独立的后台服务器集群,数据之间相互独立。如图1所示的现有直播后台架构。从图1中可知,视频直播A后台集群有服务A、服务B、服务C等,视频直播B后台集群有服务M、服务N等,视频直播A后台集群与视频直播B后台集群是独立的集群系统,在视频直播A后台集群中有多个独立的服务,其数据和服务无法与视频直播B后台集群共享。因此,当视频直播A平台有优质的内容和主播资源,但缺少观众用户,视频直播B平台有庞大的观众用户,但是缺少优质的主播和内容,或者自己的主播和内容资源有限满足不了海量观众用户的需求时,视频直播A平台与视频直播B平台资源无法共享,导致视频直播A平台优质的直播内容无法更好的让更多人看到并推广出去,严重限制了视频直播平台收入,以及视频直播B平台观众用户流失。With the rapid development of the Internet industry, live video broadcasting has become an increasingly popular pop culture, and its application scenarios are also many, such as online education, beauty shows, online medical care, e-commerce activities, game live broadcasts, sports live broadcasts, outdoor live broadcasts, etc. The current practice in the industry is that different live broadcast applications use independent background server clusters, and the data is independent of each other. The existing live broadcast background architecture as shown in Figure 1. As can be seen from Figure 1, the background cluster of live video broadcast A includes service A, service B, service C, etc., and the background cluster of live video broadcast B includes service M, service N, etc. The background cluster of live video broadcast A and the background cluster of live video broadcast B are independent clusters System, there are multiple independent services in the background cluster of live video A, whose data and services cannot be shared with the background cluster of live video B. Therefore, when the live video platform A has high-quality content and anchor resources, but lacks viewers, the live video platform B has a large number of audience users, but lacks high-quality anchors and content, or its own anchor and content resources are limited and cannot satisfy a large number of viewers. In response to user needs, the resources of the live video platform A and the live video platform B cannot be shared, resulting in the high-quality live content of the live video platform A being unable to be seen and promoted by more people, which seriously limits the income of the live video platform, and The loss of viewers and users of the live video broadcasting platform B.

本发明为了解决上述视频直播A平台与视频直播B平台存在的问题,公开了一种直播资源分配方法、装置、电子设备及存储介质,通过将有优质的内容和主播资源的视频直播平台,以及有庞大的观众用户但是缺少优质的主播和内容的视频直播平台的资源整合,按照每个视频直播平台的需求为每个视频直播平台合理分配资源,进而达到打通一个或多个视频直播应用程序的数据,实现个性化的匹配一个或多个视频直播应用程序的资源。具体实现方式如下:In order to solve the above-mentioned problems existing in the live video platform A and the live video B platform, the present invention discloses a live resource allocation method, device, electronic equipment and storage medium, through the live video platform with high-quality content and anchor resources, and Resource integration of video live broadcast platforms with huge audience users but lack of high-quality anchors and content, reasonable allocation of resources for each video live broadcast platform according to the needs of each video live broadcast platform, and then to achieve the goal of opening up one or more video live broadcast applications Data to achieve personalized matching of one or more resources of live video applications. The specific implementation is as follows:

为达到上述发明目的,本发明实施例公开了一种直播资源分配方法,如图 2所示。图2为本发明实施例的一种直播资源分配方法第一流程图,包括:In order to achieve the purpose of the above invention, the embodiment of the present invention discloses a live broadcast resource allocation method, as shown in Figure 2. Fig. 2 is a first flow chart of a live resource allocation method according to an embodiment of the present invention, including:

S201,为一个或多个视频直播应用程序的后台服务器集群创建消息队列。S201. Create a message queue for one or more background server clusters of live video applications.

在本发明实施例中,通过混合服务器集群整合一个或多个视频直播应用程序对用户资源或者主播资源的需求,形成混合服务需求。混服服务器集群是一组单独实现混合服务的服务器集群。混服服务器集群独立于业务服务器之外,是一组通用服务,以后其他视频直播应用程序有类似混合服务需求的可以复用。该混合服务器集群中包含有混合逻辑服务、混合定时器、全文搜索引擎以及数据库等。后台服务器集群为对应处理该视频直播应用程序每个项业务的多个服务器形成的集群。In the embodiment of the present invention, the demand for user resources or host resources of one or more live video application programs is integrated through a mixed server cluster to form a mixed service demand. A mixed server cluster is a group of server clusters that independently implement mixed services. The mixed server cluster is independent of the business server and is a set of general services, which can be reused by other video live broadcast applications with similar mixed service requirements in the future. The hybrid server cluster includes a hybrid logic service, a hybrid timer, a full-text search engine, and a database. The background server cluster is a cluster formed by a plurality of servers corresponding to each service of the live video application program.

消息队列是建立的用于存储一个或多个视频直播应用程序的用户日志以及主播日志的队列。用户日志为表现用户行为的内容,可包括用户关注、评论、送礼、点赞、充值等行为内容。主播日志为表现主播行为的内容,可包括开播时长、直播类型、开播时间点、收礼钻数、被关注数、被点赞数等行为内容。The message queue is a queue established to store user logs and anchor logs of one or more live video applications. User logs are content that shows user behavior, and may include behavioral content such as user attention, comments, gifts, likes, and recharges. The host log is the content that shows the behavior of the host, which can include the duration of the broadcast, the type of live broadcast, the time of the broadcast, the number of diamonds received, the number of followers, the number of likes and other behavioral content.

在本步骤中,可在每个视频直播应用程序的后台服务器集群中,获取该视频直播应用程序中的用户日志以及主播日志,按照获取的时间先后顺序创建一个或多个视频直播应用程序的消息队列,保证按照该消息队列处理一个或多个视频直播应用程序的日志以及请求时的顺序性和正确性。In this step, the user logs and anchor logs in the live video application can be obtained from the background server cluster of each live video application, and the messages of one or more live video applications can be created according to the time sequence obtained Queue, to ensure the sequence and correctness when processing logs and requests of one or more live video applications according to the message queue.

S202,获取消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于所有用户日志以及所有主播日志,确定预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容。S202. Obtain all user logs and all anchor logs in the message queue within a preset time period, and determine the resource correspondence of each user within a preset time period based on all user logs and all anchor logs through the rules corresponding to each label in the preset label list. , and the tag content corresponding to each host resource.

在本发明实施例中,在上述建立消息队列后,预设时间可以根据用户需要进行设置,处理一段时间内日志,从而保证处理结果更加精确。可使用定时器设置预设时间,当到达预设时间时可获取消息队列中的一个或多个视频直播应用程序的所有用户日志以及所有主播日志,整理每个用户的日志以及整理每个主播的日志。In the embodiment of the present invention, after the message queue is established above, the preset time can be set according to the needs of the user to process logs within a period of time, thereby ensuring more accurate processing results. The timer can be used to set the preset time, and when the preset time is reached, all user logs and all anchor logs of one or more live video applications in the message queue can be obtained, and each user's log and each anchor's log can be sorted out. log.

在本发明实施例中,标签内容可为按照用户日志以及主播日志行为属性,总结提炼出的具有特征性的文字内容,或者可为当下最流行的词汇内容,例如:桌游、狼人杀、密室等。每种标签可包含用户日志中的多个行为内容对应的多个用户日志的信息评分项目,以及包含主播日志中的多个行为内容对应的多个主播日志的信息评分项目。进而将每个标签中的信息评分项目对应的评分规则定义为本发明实施例的每个标签对应的规则。将标签内容形成的列表定义为本发明实施例的预设标签列表。In the embodiment of the present invention, the tag content can be the characteristic text content summarized and extracted according to the behavior attributes of the user log and the host log, or it can be the most popular vocabulary content at present, such as: board games, werewolf killer, secret room Wait. Each tag may include information scoring items of multiple user logs corresponding to multiple behavioral contents in the user log, and information scoring items of multiple anchor logs corresponding to multiple behavioral contents in the anchor log. Furthermore, the scoring rules corresponding to the information scoring items in each tag are defined as the rules corresponding to each tag in the embodiment of the present invention. The list formed by tag content is defined as the preset tag list in this embodiment of the present invention.

在该混合服务器集群中,获取预设标签列表中每个标签以及每个标签对应的规则。将每个用户日志按照每个标签的用户规则评定,进而确定出每个用户在该预设标签列表下符合预设规则的标签内容。In the mixed server cluster, each tag in the preset tag list and a rule corresponding to each tag are obtained. Evaluate each user log according to the user rules of each label, and then determine the label content of each user that meets the preset rules under the preset label list.

在该混合服务器集群中,获取预设标签列表中每个标签以及每个标签对应的规则。将每个主播日志按照每个标签的主播规则评定,进而确定出每个主播在该预设标签列表下符合预设规则的标签内容。In the mixed server cluster, each tag in the preset tag list and a rule corresponding to each tag are obtained. Evaluate each anchor log according to the anchor rules of each tag, and then determine the tag content of each anchor that meets the preset rules under the preset tag list.

S203,按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序,其中,每个资源请求为每个用户资源请求或每个主播资源请求,每个用户资源请求包括所请求的用户资源对应的标签内容,每个主播资源请求包括所请求的主播资源对应的标签内容。S203. According to the preset resource configuration rules and each resource request of one or more live video applications, correspondingly allocate user resources or anchor resources corresponding to each resource request to one or more live video applications, wherein , each resource request is each user resource request or each anchor resource request, each user resource request includes the tag content corresponding to the requested user resource, and each anchor resource request includes the tag content corresponding to the requested anchor resource.

在本发明实施例中,可按照每个视频直播应用程序平台的付费设置预设资源配置规则。消息队列中还存在一个或多个视频直播应用程序资源请求,视频直播应用程序资源请求表示用户资源请求或主播资源请求,每个用户资源请求中包含所需的用户标签内容,每个主播资源请求中包含所需的主播标签内容。In the embodiment of the present invention, preset resource configuration rules can be set according to the payment of each live video application platform. There are also one or more live video application resource requests in the message queue. A live video application resource request represents a user resource request or an anchor resource request. Each user resource request contains the required user tag content, and each anchor resource request Include the required streamer tag content.

在本步骤中,在上述确定了预设时间内每个用户对应的标签内容,以及每个主播对应的标签内容后,按照预设资源配置规则以及一个或多个视频直播应用程序资源请求,将与一个或多个视频直播应用程序资源请求所需的标签内容对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序。In this step, after determining the tag content corresponding to each user within the preset time and the tag content corresponding to each anchor, according to the preset resource configuration rules and one or more live video application resource requests, the The user resources or host resources corresponding to the tag content required by one or more live video application resource requests are assigned to one or more live video application programs.

需要说明的是,本发明实施例可按照定时器设置的预设时间,周期性的将与一个或多个视频直播应用程序资源请求所需的标签内容对应的用户资源或主播资源,分配给一个或多个视频直播应用程序。It should be noted that, in the embodiment of the present invention, according to the preset time set by the timer, the user resource or anchor resource corresponding to the tag content required by one or more live video application resource requests can be allocated to a or multiple live video apps.

本发明实施例提供的一种直播资源分配方法,以实现不同直播平台的用户和主播的资源整合及用户和主播的资源按需分配。具体为,为一个或多个视频直播应用程序的后台服务器集群创建消息队列,获取该消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,确定预设时间内每个用户对应的标签内容,以及每个主播对应的标签内容。首先,通过创建消息队列,实现缓存用户日志以及主播日志,避免数据库存储压力过大。然后,通过获取消息队列中预设时间的所用用户日志以及所用主播日志,分析每个用户日志对应的行为或者每个主播日志对应的行为,进而实现为每个用户以及每个主播打上个性化的标签内容。最后,按照每个视频直播应用程序的每个资源请求,找到与每个资源请求含有的标签内容对应的主播资源或者用户资源,将这些主播资源或者用户资源匹配给每个视频直播应用程序。The embodiment of the present invention provides a method for allocating live broadcast resources, so as to realize resource integration of users and anchors on different live broadcast platforms and resource allocation of users and anchors on demand. Specifically, create a message queue for the background server cluster of one or more live video applications, obtain all user logs and all anchor logs in the message queue within a preset time period, and pass the rules corresponding to each tag in the preset tag list, Determine the tag content corresponding to each user within the preset time, and the tag content corresponding to each anchor. First, create a message queue to cache user logs and anchor logs to avoid excessive pressure on database storage. Then, by obtaining the user log and the anchor log used at the preset time in the message queue, analyze the behavior corresponding to each user log or the behavior corresponding to each anchor log, and then realize the personalization of each user and each anchor label content. Finally, according to each resource request of each live video application, find anchor resources or user resources corresponding to the tag content contained in each resource request, and match these anchor resources or user resources to each live video application.

本发明实施例通过分析一个或多个视频直播应用程序的每个资源请求、每个用户日志对应的行为以及每个主播日志对应的行为,最终达到了打通一个或多个视频直播应用程序的数据,实现个性化的匹配一个或多个视频直播应用程序程序的用户资源以及主播资源。另外,本发明实施例根据一个或多个视频直播应用程序的资源请求按需导入资源,即为缺少用户的直播平台导入匹配的用户资源,为缺少主播的直播平台导入高质量的直播内容,这种资源导入方式更加精确,对于视频直播应用程序的运营也降低了成本。In the embodiment of the present invention, by analyzing each resource request of one or more live video application programs, the behavior corresponding to each user log, and the behavior corresponding to each anchor log, the data of one or more live video live application programs is finally achieved. , to achieve personalized matching of user resources and anchor resources of one or more live video application programs. In addition, the embodiment of the present invention imports resources on demand according to resource requests of one or more live video application programs, that is, imports matching user resources for live broadcast platforms that lack users, and imports high-quality live content for live broadcast platforms that lack anchors. This resource import method is more accurate, and the operation cost of the live video application is also reduced.

可选地,在本发明直播资源分配方法的一种实施例中,为一个或多个视频直播应用程序的后台服务器集群创建消息队列,包括:Optionally, in one embodiment of the live broadcast resource allocation method of the present invention, creating a message queue for one or more background server clusters of live video application programs includes:

获取一个或多个视频直播应用程序对应的每个主题,为每个主题均创建队列,将队列对应确定为一个或多个视频直播应用程序的消息队列,其中,主题包括用户日志以及主播日志。Obtain each topic corresponding to one or more live video applications, create a queue for each topic, and determine the corresponding queue as a message queue of one or more live video applications, where the topics include user logs and anchor logs.

在本发明实施例中,获取一个或多个视频直播应用程序对应的主题Topic,每个视频直播应用程序对应配置有一个Topic,每个Topic类似于每个视频直播应用程序的日志存储库,在该Topic中存储该视频直播应用程序中每个用户日志以及每个主播日志。在本发明实例中,可通过API(Application Programming Interface,应用程序编程接口)访问一个或多个视频直播应用程序的后台服务器集群,进而获取一个或多个视频直播应用程序的日志信息以及一个或多个视频直播应用程序的资源请求。例如,获取视频直播A后台所请求的带有“户外”标签内容对应的用户资源请求,获取视频直播B后台所请求的带有“游戏”标签内容对应的主播资源请求。In the embodiment of the present invention, the topic Topic corresponding to one or more live video application programs is obtained, and each live video application program is correspondingly configured with a Topic, and each Topic is similar to the log repository of each live video application program. This Topic stores the logs of each user and each anchor in the live video application. In the example of the present invention, the background server cluster of one or more live video application programs can be accessed through API (Application Programming Interface, application programming interface), and then the log information of one or more live video application programs and one or more live video application programs can be obtained. A resource request for a live video application. For example, obtain the user resource request corresponding to the content with the label "outdoor" requested by the background of live video A, and obtain the resource request of the anchor corresponding to the content with the label "game" requested by the background of live video B.

通过获取的一个或多个视频直播应用程序对应的Topic,按照时间先后顺序为一个或多个视频直播应用程序对应的Topic建立队列,进而形成本发明实施例的视频直播应用程序的消息队列。By acquiring the topics corresponding to the one or more live video applications, a queue is established for the topics corresponding to the one or more live video applications in chronological order, thereby forming a message queue of the live video application in the embodiment of the present invention.

通过本发明实施例,可以直接获取Topic中实时的用户日志、主播日志以及一个或多个视频直播应用程序的资源请求,不需要进入一个或多个视频直播应用程序的数据库中,保证了每个视频直播应用程序的数据安全性。另外,通过建立队列存储一个或多个视频直播应用程序的用户日志以及主播日志,降低了后端服务器集群数据库的存储压力,避免了一个或多个视频直播应用程序请求量骤增时后端发生雪崩。Through the embodiment of the present invention, it is possible to directly obtain real-time user logs, anchor logs, and resource requests of one or more live video application programs in the Topic without entering the database of one or more live video application programs, ensuring that each Data Security for Live Video Apps. In addition, by establishing a queue to store user logs and anchor logs of one or more live video applications, the storage pressure on the back-end server cluster database is reduced, and the backend is prevented from occurring when the request volume of one or more live video applications surges. avalanche.

可选地,在本发明直播资源分配方法的一种实施例中,获取消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于所有用户日志以及所有主播日志,确定预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容,可如图3所示。图3为本发明实施例的一种直播资源分配方法的标签内容确定方法流程图,包括:Optionally, in one embodiment of the live broadcast resource allocation method of the present invention, all user logs and all anchor logs in the message queue within a preset time period are obtained, and the rules corresponding to each tag in the preset tag list are used based on all user logs The log and all anchor logs determine the tag content corresponding to each user resource and the tag content corresponding to each anchor resource within a preset time, as shown in Figure 3. Fig. 3 is a flow chart of a method for determining tag content of a live resource allocation method according to an embodiment of the present invention, including:

S301,获取消息队列中所有用户日志以及所有主播日志,存储到全文搜索引擎。S301. Obtain all user logs and all anchor logs in the message queue, and store them in the full-text search engine.

在本发明实施例中,混合服务器集群中包含全文搜索引擎、数据库等。当将一个或多个视频直播应用程序的用户日志、主播日志以及资源请求存储在消息队列后,需要处理这些用户日志、主播日志以及资源请求,按照一个或多个视频直播应用程序的资源请求分配用户资源或主播资源时,先将预设时间内消息队列中存储的所有用户日志以及所有主播日志,存储到全文搜索引擎,在本发明实例中全文搜索引擎可为Elasticsearch。In the embodiment of the present invention, the mixed server cluster includes a full-text search engine, a database, and the like. After storing the user logs, anchor logs, and resource requests of one or more live video applications in the message queue, these user logs, anchor logs, and resource requests need to be processed, and allocated according to the resource requests of one or more live video applications When using user resources or anchor resources, first store all user logs and all anchor logs stored in the message queue within a preset time to a full-text search engine. In the example of the present invention, the full-text search engine can be Elasticsearch.

S302,获取全文搜索引擎中预设时间内所有用户日志以及所有主播日志。S302. Obtain all user logs and all anchor logs within a preset time period in the full-text search engine.

在全文搜索引擎Elasticsearch中,通过中间件服务获取定时器设置的预设时间的所有用户日志以及所有主播日志。In the full-text search engine Elasticsearch, all user logs and all anchor logs at the preset time set by the timer are obtained through the middleware service.

S303,根据每个用户对应的所有用户日志,形成每个用户的目标信息;根据每个主播对应的所有主播日志,形成每个主播的目标信息。S303. Form the target information of each user according to all user logs corresponding to each user; form the target information of each anchor according to all anchor logs corresponding to each anchor.

在本步骤中,可按照用户名整理每个用户预设时间的所有用户日志,形成每个用户的目标信息。按照主播名整理每个主播预设时间的所有主播日志,形成每个主播的目标信息。In this step, all user logs at a preset time for each user may be organized according to the user name to form target information for each user. Organize all the anchor logs of each anchor preset time according to the anchor name to form the target information of each anchor.

S304,从数据库的预设标签列表中,获取每个标签以及每个标签对应的规则。S304. Obtain each tag and a rule corresponding to each tag from the preset tag list in the database.

在本发明实施例中,自定义的预设标签列表存储在数据库中。从数据库的预设标签列表中,获取每个标签以及每个标签对应的规则。例如下表1的预设标签列表。In the embodiment of the present invention, the user-defined preset label list is stored in the database. Obtain each tag and the rule corresponding to each tag from the preset tag list in the database. For example, the preset label list in Table 1 below.

表1预设标签列表Table 1 Preset label list

游戏game户外outdoor时尚Fashion音乐music校园campus设计师designer数码科技digital technology汽车car财经financial才艺talent桌游board game密室secret room科普popular science军事military二次元Two-dimensional美食Food怀旧nostalgia狼人杀Werewolf颜值Appearance文娱教育entertainment education

在表1的预设标签列表中设置有多个标签,每个标签对应设置有对应于用户的评分规则和对应于主播的评分规则。从数据库的预设标签列表中,获取每个标签以及每个标签对应的用户评分规则和对应的主播评分规则。Multiple tags are set in the preset tag list in Table 1, and each tag is correspondingly set with a scoring rule corresponding to a user and a scoring rule corresponding to an anchor. From the preset tag list in the database, each tag and the user scoring rules corresponding to each tag and the corresponding anchor scoring rules are obtained.

S305,在每个标签对应的用户评分规则下,对每个用户的目标信息打分,得到每个用户对应于每个标签的分数值。S305. Under the user scoring rule corresponding to each label, score the target information of each user, and obtain the score value of each user corresponding to each label.

上述获取了每个标签对应的用户评分规则和对应的主播评分规则后,按照每个标签对应的用户评分规则,对每个用户的目标信息打分,得到每个用户每个标签下的分数值。After obtaining the user scoring rules corresponding to each label and the corresponding anchor scoring rules, score the target information of each user according to the user scoring rules corresponding to each label, and obtain the score value of each user under each label.

具体地,获取每个标签所对应的一个或多个用户信息评分项目,将一个或多个用户信息评分项目对应的评分规则,对应确定为每个标签对应的用户评分规则,其中,用户信息评分项目为表示用户日志属性的项目。Specifically, one or more user information scoring items corresponding to each label are obtained, and the scoring rules corresponding to one or more user information scoring items are correspondingly determined as the user scoring rules corresponding to each label, wherein the user information scoring The item is an item indicating user log attributes.

通过每个标签对应的用户评分规则,对每个用户的目标信息打分,得到每个用户对应于每个标签的分数值。According to the user scoring rules corresponding to each label, the target information of each user is scored, and the score value corresponding to each label of each user is obtained.

例如,表1的预设标签列表中每个标签可含有表2信息评分项目表中的多个用户信息评分项目,以及多个用户信息评分项目对应的评分规则,对用户的目标信息打分,得到每个用户每个标签下的分数值。For example, each tag in the preset tag list in Table 1 can contain multiple user information rating items in the information rating item table in Table 2, and the scoring rules corresponding to the multiple user information rating items, and score the user's target information to obtain The score value under each label for each user.

表2信息评分项目表Table 2 Information Scoring Item Table

具体地,例如“游戏”标签所对应的多个用户信息评分项目为11、13、15、 16,该“游戏”标签所对应的多个用户信息评分项目的评分规则为:每个用户的目标信息对应的用户信息评分取值范围为0-1,计算11、13、15、16对应的用户信息评分项目,得到每个用户的目标信息的用户信息评分百分制的均值。具体为计算(11对应的用户信息评分×100+13对应的用户信息评分×100+15对应的用户信息评分×100+16对应的用户信息评分×100)÷4,其中4表示用户信息评分项目的个数。按照该“游戏”标签所对应的多个用户信息评分项目的评分规则,对每个用户的目标信息打分,得到每个用户该“游戏”标签下的分数值。例如,若用户日志中出现了关注者昵称和类型为用户昵称和类型时,则该用户11对应的用户信息评分为0.5,若用户日志中出现了具体的昵称文字或符号,则该用户11对应的用户信息评分为1。Specifically, for example, the multiple user information scoring items corresponding to the "game" label are 11, 13, 15, and 16, and the scoring rules for the multiple user information scoring items corresponding to the "game" label are: each user's goal The value range of the user information score corresponding to the information is 0-1, calculate the user information score items corresponding to 11, 13, 15, and 16, and obtain the average value of the user information score percentile system for each user's target information. Specifically, it is to calculate (the user information score corresponding to 11 × 100 + the user information score corresponding to 13 × 100 + the user information score corresponding to 15 × 100 + the user information score corresponding to 16 × 100) ÷ 4, where 4 represents the user information score item the number of . According to the scoring rules of the multiple user information scoring items corresponding to the "game" label, the target information of each user is scored, and the score value of each user under the "game" label is obtained. For example, if the follower nickname and type appear in the user log as the user nickname and type, the user information score corresponding to the user 11 is 0.5; if specific nickname characters or symbols appear in the user log, then the user 11 corresponds to User profile rating of 1.

例如“户外”标签所对应的多个用户信息评分项目为1、2、11、14、15、 16,该“户外”标签所对应的多个用户信息评分项目的评分规则为:每个用户日志对应的每个用户信息评分取值范围为0-1,计算1、2、11、14、15、16对应的用户信息评分项目,得到每个用户的目标信息的用户信息评分百分制的均值。具体为计算(1对应的用户信息评分×100+2对应的用户信息评分×100+11对应的用户信息评分×100+14对应的用户信息评分×100+15对应的用户信息评分×100+16对应的用户信息评分项目×100)÷6,其中6表示用户信息评分项目的个数。按照该“户外”标签所对应的多个用户信息评分项目的评分规则,对每个用户的目标信息打分,得到每个用户该“户外”标签下的分数值。例如,若用户日志中出现了“户外”,则该用户1对应的用户信息评分为0.5;若用户日志中出现了具体户外直播的名称,则该用户1对应的用户信息评分为1。For example, the multiple user information scoring items corresponding to the "outdoor" label are 1, 2, 11, 14, 15, and 16, and the scoring rules for the multiple user information scoring items corresponding to the "outdoor" label are: each user log The corresponding user information score ranges from 0 to 1, calculate the user information score items corresponding to 1, 2, 11, 14, 15, and 16, and obtain the average value of the user information score percentile system for each user's target information. Specifically, it is to calculate (the user information score corresponding to 1×100+2 the corresponding user information score×100+11 the corresponding user information score×100+14 the corresponding user information score×100+15 the corresponding user information score×100+16 Corresponding user information scoring items × 100) ÷ 6, where 6 represents the number of user information scoring items. According to the scoring rules of multiple user information scoring items corresponding to the "outdoor" label, the target information of each user is scored, and the score value of each user under the "outdoor" label is obtained. For example, if "outdoor" appears in the user log, the user information score corresponding to user 1 is 0.5; if the name of a specific outdoor live broadcast appears in the user log, the user information score corresponding to user 1 is 1.

同理,与上面举例的“游戏”标签和“户外”标签类似,按照表1的预设标签列表中剩余标签对应于表2中多个用户信息评分项目,以及剩余标签所对应的多个用户信息评分项目的评分规则,对每个用户的目标信息打分,得到每个用户表1的预设标签列表中剩余标签下的分数值。Similarly, similar to the "game" tag and "outdoor" tag in the examples above, the remaining tags in the preset tag list in Table 1 correspond to multiple user information scoring items in Table 2, and the multiple users corresponding to the remaining tags The scoring rule of the information scoring item is to score the target information of each user, and obtain the score value under the remaining labels in the preset label list in table 1 of each user.

S306,获取每个用户的大于阈值的分数值,将大于阈值的分数值对应的N 个标签确定为每个用户对应的标签内容,其中,N为1≤N≤3的自然数。S306. Obtain a score value greater than the threshold for each user, and determine N tags corresponding to the score value greater than the threshold as the tag content corresponding to each user, where N is a natural number of 1≤N≤3.

按照上述预设标签列表中每个标签以及每个标签对应的用户评分规则,对每个用户的目标信息打分,得到每个用户每个标签下的分数值后,将大于阈值的分数值对应的标签内容确定为本发明实施例中每个用户对应的标签内容。According to each label in the above preset label list and the user scoring rules corresponding to each label, score the target information of each user. After obtaining the score value under each label of each user, the score value corresponding to the score greater than the threshold The label content is determined as the label content corresponding to each user in the embodiment of the present invention.

例如,按照上述表1以及表2对每个用户的目标信息打分,得到用户A表1 以及表2的预设标签列表中每个标签下的分数值。设置该表1以及表2的用户阈值为70,得到该用户A的每个标签下的分数值,如下表3所示。For example, score the target information of each user according to the above Table 1 and Table 2, and obtain the score value under each label in the preset label list of User A in Table 1 and Table 2. Set the user threshold of Table 1 and Table 2 to 70, and obtain the score value under each label of the user A, as shown in Table 3 below.

表3用户A的预设标签分数值表Table 3 User A's preset label score value table

游戏30game 30桌游75Board games 75户外61outdoor 61密室45Chamber of Secrets 45时尚80Fashion 80科普62Science 62音乐90music 90军事64Military 64校园60Campus 60二次元85Two-dimensional 85设计师69Designer 69美食72Gourmet 72数码科技50Digital Technology 50怀旧20Nostalgia 20汽车39car 39狼人杀76Werewolf 76财经65Finance 65颜值55Yan value 55才艺66Talent 66文娱教育45Entertainment Education 45

通过表3可知该用户A在预设标签列表下每个标签对应的分数中,大于该阈值的从大到小排序的分数值分别为90、85、80、75、72。又因为将大于阈值的分数值对应的N个标签确定为每个用户对应的标签内容,在本例中可将N设为3,则获取前3个分数值对应的标签,即获取90对应的音乐、85对应的二次元、80 对应的时尚,将该3个标签内容确定为该用户A对应的标签内容。It can be seen from Table 3 that among the scores corresponding to each label in the preset label list of user A, the score values that are greater than the threshold and sorted from large to small are 90, 85, 80, 75, and 72 respectively. And because the N tags corresponding to the score values greater than the threshold are determined as the tag content corresponding to each user, in this example, N can be set to 3, and then the tags corresponding to the first 3 score values are obtained, that is, the tags corresponding to 90 are obtained. Music, 2D corresponding to 85, and fashion corresponding to 80, these three tag contents are determined as the tag contents corresponding to the user A.

按照该方式确定该预设时间内每个用户对应的标签内容。In this manner, the tag content corresponding to each user within the preset time period is determined.

S307,在每个标签对应的主播评分规则下,对每个主播的目标信息打分,得到每个主播对应于每个标签的分数值。S307. Under the anchor scoring rules corresponding to each tag, score the target information of each anchor, and obtain the score value of each anchor corresponding to each tag.

上述获取了每个标签对应的用户标签规则或对应的主播标签规则后,按照每个标签对应的主播评分规则,对每个主播的目标信息打分,得到每个主播每个标签下的分数值。After obtaining the user label rules corresponding to each label or the corresponding anchor label rules, score the target information of each anchor according to the anchor scoring rules corresponding to each label, and obtain the score value of each anchor under each label.

具体地,获取每个标签所对应的一个或多个主播信息评分项目,将一个或多个主播信息评分项目对应的评分规则,对应确定为每个标签对应的主播评分规则,其中,主播信息评分项目为表示主播日志属性的项目。Specifically, one or more anchor information scoring items corresponding to each tag are obtained, and the scoring rules corresponding to one or more anchor information scoring items are correspondingly determined as the anchor scoring rules corresponding to each tag, wherein the anchor information scoring The item is an item representing the attribute of the anchor log.

通过每个标签对应的主播评分规则,对每个主播的目标信息打分,得到每个主播对应于每个标签的分数值。According to the anchor scoring rules corresponding to each tag, the target information of each anchor is scored, and the score value corresponding to each tag of each anchor is obtained.

例如,表1的预设标签列表中每个标签可含有表2信息评分项目表中的多个主播信息评分项目,以及多个主播信息评分项目对应的评分规则,对主播的目标信息打分,得到每个主播每个标签下的分数值。For example, each tag in the preset tag list in Table 1 can contain multiple anchor information scoring items in the information scoring item table in Table 2, and the scoring rules corresponding to the multiple anchor information scoring items, and score the target information of the anchor. The score value under each tag for each streamer.

具体地,例如“游戏”标签所对应的多个主播信息评分项目为1、2、3、4、 5、6、7、8,该“游戏”标签所对应的多个主播信息评分项目的评分规则为:每个主播日志对应的主播信息评分取值范围为0-1,计算1、2、3、4、5、6、7、 8对应的主播信息评分项目,得到每个主播的目标信息的主播信息评分百分制的均值。具体为计算(1对应的用户信息评分×100+2对应的用户信息评分× 100+…+7对应的用户信息评分×100+8对应的用户信息评分项目×100)÷8,其中8表示主播信息评分项目的个数。按照该“游戏”标签所对应的多个主播信息评分项目的评分规则,对每个主播的目标信息打分,得到每个主播该“游戏”标签下的分数值。若主播日志中出现“游戏”字样,则该主播的1对应的主播信息评分为0.5,若该主播日志中出现了游戏名称的字样,则该主播的1对应的主播信息评分为1。Specifically, for example, the multiple anchor information scoring items corresponding to the "game" label are 1, 2, 3, 4, 5, 6, 7, and 8, and the scores of the multiple anchor information scoring items corresponding to the "game" label The rules are: the value range of the anchor information score corresponding to each anchor log is 0-1, calculate the anchor information scoring items corresponding to 1, 2, 3, 4, 5, 6, 7, and 8, and obtain the target information of each anchor The average value of the anchor information score percentile system. The specific calculation is (the user information score corresponding to 1 × 100 + the user information score corresponding to 2 × 100 + ... + the user information score corresponding to 7 × 100 + the user information score item corresponding to 8 × 100) ÷ 8, where 8 means the anchor The number of information scoring items. According to the scoring rules of the multiple anchor information scoring items corresponding to the "game" label, the target information of each anchor is scored, and the score value under the "game" label of each anchor is obtained. If the word "game" appears in the anchor log, the anchor information score corresponding to the anchor's 1 is 0.5, and if the word "game name" appears in the anchor log, the anchor information score corresponding to the anchor's 1 is 1.

例如“户外”标签所对应的多个主播信息评分项目为1、2、3、4、7、9、 14,该“户外”标签所对应的多个主播信息评分项目的评分规则为:每个主播日志对应的每个主播信息评分取值范围为0-1,计算1、2、3、4、7、9、14对应的主播信息评分项目,得到每个主播的目标信息的主播信息评分百分制的均值。具体为计算(1对应的用户信息评分×100+2对应的用户信息评分×100+11 对应的用户信息评分×100+14对应的用户信息评分×100+15对应的用户信息评分×100+16对应的用户信息评分项目×100)÷7,其中7表示主播信息评分项目的个数。按照该“户外”标签所对应的多个主播信息评分项目的评分规则,对每个主播的目标信息打分,得到每个主播该“户外”标签下的分数值。例如,若主播日志中出现了“户外”,则该主播1对应的主播信息评分为0.5;若主播日志中出现了具体户外直播的名称,则该主播1对应的主播信息评分为1。For example, the multiple anchor information scoring items corresponding to the "outdoor" label are 1, 2, 3, 4, 7, 9, and 14, and the scoring rules for the multiple anchor information scoring items corresponding to the "outdoor" label are: each The value range of each anchor information score corresponding to the anchor log is 0-1, calculate the anchor information scoring items corresponding to 1, 2, 3, 4, 7, 9, and 14, and obtain the anchor information scoring percentage system of the target information of each anchor mean value. Specifically, it is to calculate (the user information score corresponding to 1×100+2 the corresponding user information score×100+11 the corresponding user information score×100+14 the corresponding user information score×100+15 the corresponding user information score×100+16 Corresponding user information scoring items × 100) ÷ 7, where 7 represents the number of anchor information scoring items. According to the scoring rules of multiple anchor information scoring items corresponding to the "outdoor" label, the target information of each anchor is scored, and the score value under the "outdoor" label of each anchor is obtained. For example, if "outdoor" appears in the anchor log, the anchor information score corresponding to anchor 1 is 0.5; if the name of a specific outdoor live broadcast appears in the anchor log, the anchor information score corresponding to anchor 1 is 1.

同理,与上面举例的“游戏”标签和“户外”标签类似,按照表1的预设标签列表中剩余标签对应于表2中多个主播信息评分项目,以及剩余标签所对应的多个主播信息评分项目的评分规则,对每个主播的目标信息打分,得到每个主播表1的预设标签列表中剩余标签下的分数值。Similarly, similar to the "game" tag and "outdoor" tag in the examples above, the remaining tags in the preset tag list in Table 1 correspond to multiple anchor information scoring items in Table 2, and the multiple anchors corresponding to the remaining tags The scoring rule of the information scoring item is to score the target information of each anchor, and obtain the score value under the remaining tags in the preset tag list of table 1 of each anchor.

S308,获取每个主播的大于阈值的分数值,将大于阈值的分数值对应的N 个标签确定为每个主播对应的标签内容。S308. Acquire the score value of each anchor greater than the threshold, and determine N tags corresponding to the score greater than the threshold as the tag content corresponding to each anchor.

按照上述预设标签列表中每个标签以及每个标签对应的主播评分规则,对每个主播的目标信息打分,得到每个主播每个标签下的分数值后,将大于阈值的分数值对应的标签内容确定为本发明实施例中每个主播对应的标签内容。According to each label in the above preset label list and the anchor scoring rules corresponding to each label, score the target information of each anchor. After obtaining the score value of each anchor under each label, the corresponding The tag content is determined as the tag content corresponding to each anchor in the embodiment of the present invention.

例如,按照上述表1以及表2对每个主播的目标信息打分,得到主播B表1 以及表2的预设标签列表中每个标签下的分数值。设置该表1以及表2的主播阈值为80,得到该主播B的每个标签下的分数值,如下表4所示。For example, score the target information of each anchor according to the above Table 1 and Table 2, and obtain the score value under each label in the preset label list in Table 1 and Table 2 of anchor B. Set the anchor threshold of Table 1 and Table 2 to 80, and obtain the score value under each label of the anchor B, as shown in Table 4 below.

表4主播B的预设标签分数值表Table 4 Preset label score value list of anchor B

游戏90game 90桌游60Board games 60户外93outdoor 93密室45Chamber of Secrets 45时尚70Fashion 70科普72Science 72音乐55music 55军事64Military 64校园45Campus 45二次元40Second dimension 40设计师30designer 30美食76Gourmet 76数码科技85Digital Technology 85怀旧20Nostalgia 20汽车74car 74狼人杀61Werewolf 61财经78Finance 78颜值75Yan value 75才艺53Talent 53文娱教育54Entertainment Education 54

通过表4可知该主播B在预设标签列表下每个标签对应的分数中,大于该阈值80的从大到小排序的分数值分别为93、90、85。在本例中可设N设为3,则获取3个分数值对应的标签,即获取93对应的户外、90对应的游戏、85对应的数码科技,将该3个标签内容确定为该主播B对应的标签内容。It can be seen from Table 4 that among the scores corresponding to each label of the anchor B in the preset label list, the score values that are greater than the threshold 80 and sorted from large to small are 93, 90, and 85 respectively. In this example, N can be set to 3, and the tags corresponding to the three score values are obtained, that is, the outdoor corresponding to 93, the game corresponding to 90, and the digital technology corresponding to 85 are obtained, and the contents of the three tags are determined as the anchor B corresponding label content.

按照该方式确定该预设时间内每个主播对应的标签内容。In this manner, the tag content corresponding to each anchor within the preset time period is determined.

可见,通过本发明实施例可实现打通多个视频直播应用程序的用户和主播数据,通过大数据分析收集的用户日志以及主播日志,为用户和主播打上个性化的标签内容,进而实现后期按照一个或多个视频直播应用程序的需求分配个性化的用户或者主播资源。It can be seen that through the embodiment of the present invention, the user and anchor data of multiple video live broadcast applications can be opened up, and the user logs and anchor logs collected through big data analysis can be marked with personalized label content for the user and the anchor, and then realized in the later stage according to a Allocate personalized user or host resources according to the requirements of multiple or multiple video live broadcast applications.

可选地,在本发明直播资源分配方法的一种实施例中,获取每个用户的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为每个用户对应的标签内容之后,方法还包括:Optionally, in one embodiment of the method for allocating live broadcast resources of the present invention, after obtaining the score value of each user greater than the threshold value, the N tags corresponding to the score value greater than the threshold value are determined as the tag content corresponding to each user , the method also includes:

将预设时间内每个用户以及每个用户对应的标签内容,存储在缓存中。Store each user and the label content corresponding to each user in the cache within a preset time.

当上述对预设时间内的每个用户打上标签后,可将用户以及用户对应的标签内容存储在缓存redis中。After tagging each user within the preset time, the user and the tag content corresponding to the user can be stored in the cache redis.

获取每个主播的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为每个主播对应的标签内容之后,方法还包括:After obtaining the score value greater than the threshold value of each anchor, and determining the N labels corresponding to the score value greater than the threshold value as the label content corresponding to each anchor, the method also includes:

将预设时间内每个主播以及每个主播对应的标签内容,存储在缓存中Store each anchor and the label content corresponding to each anchor in the cache within the preset time

当上述对预设时间内的每个主播打上标签后,可将主播以及主播对应的标签内容存储在缓存redis中。After tagging each anchor within the preset time, the anchor and the tag content corresponding to the anchor can be stored in the cache redis.

可见,通过本发明实施例可实现将每个用户、每个用户对应的标签内容以及每个主播、每个主播对应的标签内容存储在缓存中,避免数据丢失。另外,将这些信息存储在缓存中,可降低数据库的存储压力,以及方便再次获取这些信息。It can be seen that, through the embodiments of the present invention, each user, the tag content corresponding to each user, and each anchor, and the tag content corresponding to each anchor can be stored in the cache to avoid data loss. In addition, storing the information in the cache can reduce the storage pressure of the database and facilitate re-acquisition of the information.

可选地,在本发明直播资源分配方法的一种实施例中,按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序之前,方法还包括:Optionally, in an embodiment of the live broadcast resource allocation method of the present invention, according to the preset resource configuration rules and each resource request of one or more live video application programs, the user resources or Before the anchor resources are assigned to one or more live video applications, the method also includes:

步骤一,获取一个或多个视频直播应用程序的每个资源请求。Step 1, obtain each resource request of one or more live video applications.

具体为,在消息队列中获取每个视频直播应用程序的每个资源请求。Specifically, each resource request of each live video application is acquired in the message queue.

步骤二,按照每行对应为一条资源请求的排列方式,分别将一个或多个视频直播应用程序中的用户资源请求或主播资源请求排列,形成一个或多个视频直播应用程序的每个资源请求对应的一个或多个直播房间列表。Step 2: Arrange user resource requests or host resource requests in one or more live video application programs according to the arrangement in which each row corresponds to a resource request to form each resource request for one or more live video live application programs One or more corresponding live room lists.

具体地,可为每个视频直播应用程序建立一个直播房间列表,存储一个或多个视频直播应用程序的资源请求。该直播房间列表可为每行对应为一条资源请求的二维数据表。每个直播房间列表可设为三个项目,第一个项目为标注当前视频直播应用程序资源请求的类型,即为用户或者主播;第二个项目为当前视频直播应用程序的具体资源请求,即为带有标签内容的用户资源请求或者主播资源请求;第三个项目为按照第二个项目的具体资源请求获取的用户资源或者主播资源。该三项在当前视频直播应用程序的直播房间列表中分别以列的方式存储具体信息,即每一列为具体地项目信息,每一行为一条资源请求的三个项目信息。Specifically, a live room list may be established for each live video application, and store resource requests of one or more live video applications. The live room list may be a two-dimensional data table in which each row corresponds to a resource request. Each live room list can be set to three items, the first item is to mark the type of resource request of the current live video application, that is, user or anchor; the second item is the specific resource request of the current live video application, namely It is the user resource request or host resource request with tagged content; the third item is the user resource or host resource obtained according to the specific resource request of the second item. The three items store specific information in the form of columns in the live room list of the current live video application program, that is, each column is specific item information, and each row is three item information of a resource request.

在上述获取到一个或多个视频直播应用程序的资源请求后,按照每个视频直播应用程序对应的直播房间列表,在每个视频直播应用程序对应的直播房间列表的第二项存储具体获得到的用户资源请求或主播资源请求。After obtaining the resource requests of one or more live video applications, according to the live room list corresponding to each live video application, store the specific obtained in the second item of the live room list corresponding to each live video application User resource requests or host resource requests.

按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序,包括:According to the preset resource configuration rules and each resource request of one or more live video applications, assign the user resources or anchor resources corresponding to each resource request to one or more live video applications, including:

步骤三,按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,确定每个资源请求所请求的用户资源或主播资源。Step 3, according to the preset resource configuration rules and each resource request of one or more live video application programs, determine the user resources or host resources requested by each resource request.

步骤四,将一个或多个视频直播应用程序的资源请求所请求的用户资源或主播资源,对应分配到一个或多个视频直播应用程序的直播房间列表。Step 4: Assign the user resources or host resources requested by the resource requests of one or more live video applications to the live room list of one or more live video applications.

另外,一个或多个视频直播应用程序可拉取各自的直播房间列表,查询以及获取该直播房间列表中与请求对应的用户或主播资源。In addition, one or more live video application programs can pull their respective live room lists, query and obtain the user or host resource corresponding to the request in the live room list.

可见,通过本发明实施例可实现按照每个视频直播应用程序的需求导入对应的直播内容或者观众。采用直播房间列表的方式管理每个视频直播应用程序的需求以及分配的资源,便于服务器集群对请求以及资源的管理,另外也便于一个或多个视频直播应用程序通过直播房间列表查看以及获取所需的用户资源或主播资源。It can be seen that through the embodiments of the present invention, corresponding live content or viewers can be imported according to the requirements of each live video application. Use the live room list to manage the requirements and allocated resources of each live video application, which is convenient for the server cluster to manage requests and resources, and also facilitates one or more live video applications to view and obtain the required resources through the live room list user resources or host resources.

可选地,在本发明直播资源分配方法的一种实施例中,按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序之前,方法还包括:Optionally, in an embodiment of the live broadcast resource allocation method of the present invention, according to the preset resource configuration rules and each resource request of one or more live video application programs, the user resources or Before the anchor resources are assigned to one or more live video applications, the method also includes:

步骤一,获取一个或多个视频直播应用程序中的每个用户资源请求。Step 1, obtain each user resource request in one or more live video applications.

具体地,在本步骤中可在消息队列中获取一个或多个视频直播应用程序资源请求中的每个用户资源请求,如果有视频直播应用程序没有用户资源请求,则获取的用户资源请求的数量为0。Specifically, in this step, each user resource request in one or more live video application resource requests can be obtained in the message queue. If there is no user resource request for a live video application, the number of obtained user resource requests is 0.

步骤二,按照每行对应为一条用户资源请求的排列方式,分别将一个或多个视频直播应用程序的用户资源请求排列,形成一个或多个视频直播应用程序的每个用户资源请求对应的用户房间列表。Step 2: Arrange the user resource requests of one or more live video application programs according to the arrangement in which each row corresponds to a user resource request to form a user resource request corresponding to each user resource request of one or more live video live application programs List of rooms.

具体地,给每个视频直播应用程序获取到的用户资源请求建立用户房间列表,该用户房间列表中至少有两项,一项为当前视频直播应用程序的具体资源请求,即为带有标签内容的用户资源请求,另一项为按照带有标签内容的用户资源请求获取的用户资源。该两项在当前视频直播应用程序的直播房间列表中分别以列的方式存储具体信息,即每一列为具体的项目信息,每一行为一条资源请求的两项信息。Specifically, a user room list is established for each user resource request obtained by the live video application, and there are at least two items in the user room list, one of which is the specific resource request of the current live video application, which is the tagged content The user resource request for , and the other is the user resource obtained according to the user resource request with tagged content. The two items are stored as columns in the live room list of the current video live broadcast application, that is, each column is specific item information, and each row is two items of information requested by a resource.

在上述获取到每个视频直播应用程序资源请求中的每个用户资源请求后,按照每个视频直播应用程序对应的用户房间列表,将每个视频直播应用程序资源请求中的每个用户资源请求对应在该用户房间列表中。如果有视频直播应用程序获取的用户资源请求数量为0,则该视频直播应用程序对应的用户房间列表中没有数据,当下一预设时间内查看有用户资源请求时,将获取的用户资源请求填入该视频直播应用程序对应的用户房间列表中。After each user resource request in each live video application resource request is obtained above, according to the user room list corresponding to each live video application, each user resource request in each live video application resource request Corresponding to the user's room list. If the number of user resource requests obtained by a live video application is 0, there is no data in the user room list corresponding to the live video application. Enter the user room list corresponding to the live video application.

步骤三,获取一个或多个视频直播应用程序的每个主播资源请求。Step 3: Obtain each anchor resource request of one or more live video applications.

具体地,在本步骤中可在消息队列中获取每个视频直播应用程序资源请求中的每个主播资源请求,如果有视频直播应用程序没有主播资源请求,则获取的主播资源请求的数量为0。Specifically, in this step, each anchor resource request in each live video application resource request can be obtained in the message queue. If there is a live video application without an anchor resource request, the number of acquired anchor resource requests is 0 .

步骤四,按照每行对应为一条主播资源请求的排列方式,分别将一个或多个视频直播应用程序中的主播资源请求排列,形成一个或多个视频直播应用程序的每个主播资源请求对应的主播房间列表。Step 4: Arrange the host resource requests in one or more live video applications according to the arrangement in which each row corresponds to a host resource request, forming a list corresponding to each host resource request of one or more live video applications. A list of host rooms.

具体地,给每个视频直播应用程序获取到的主播资源请求建立主播房间列表,该主播房间列表中至少有两项,一项为当前视频直播应用程序的具体资源请求,即为带有标签内容的主播资源请求,另一项为按照带有标签内容的主播资源请求获取的主播资源。该两项在当前视频直播应用程序的直播房间列表中分别以列的方式存储具体信息,即每一列为具体的项目信息,每一行为一条资源请求的两项信息。Specifically, a host room list is established for each host resource request obtained by the live video application, and there are at least two items in the list of host rooms, one of which is the specific resource request of the current live video application, that is, the tagged content The host resource request, and the other is the host resource obtained according to the host resource request with tagged content. The two items are stored as columns in the live room list of the current video live broadcast application, that is, each column is specific item information, and each row is two items of information requested by a resource.

在上述获取到一个或多个视频直播应用程序资源请求中的每个主播资源请求后,按照每个视频直播应用程序对应的主播房间列表,将每个视频直播应用程序资源请求中的每个主播资源请求对应在该主播房间列表中。如果有视频直播应用程序获取的主播资源请求数量为0,则该视频直播应用程序对应的主播房间列表中没有数据,当下一预设时间内查看有主播资源请求时,将获取的主播资源请求填入该视频直播应用程序对应的主播房间列表中。After obtaining each anchor resource request in one or more live video application resource requests, according to the anchor room list corresponding to each live video application, each anchor in each live video application resource request The resource request corresponds to the anchor room list. If the number of host resource requests obtained by a live video application is 0, there is no data in the host room list corresponding to the live video application. Enter the host room list corresponding to the live video application.

按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序,包括:According to the preset resource configuration rules and each resource request of one or more live video applications, assign the user resources or anchor resources corresponding to each resource request to one or more live video applications, including:

步骤五,按照预设资源配置规则以及一个或多个视频直播应用程序的用户资源请求,确定每个用户资源请求所请求的用户资源。Step 5: Determine the user resources requested by each user resource request according to the preset resource configuration rules and the user resource requests of one or more live video application programs.

步骤六,将一个或多个视频直播应用程序所请求的用户资源,对应分配给一个或多个视频直播应用程序的用户房间列表。Step 6: Correspondingly allocate user resources requested by one or more live video application programs to user room lists of one or more live video application programs.

混服集群提供API接口服务,可供一个或多个视频直播应用程序在需要时对应拉取各自的用户房间列表,查看一个或多个视频直播应用程序的用户房间列表中与每个用户资源请求对应的用户资源。The mixed-server cluster provides API interface services, which can be used by one or more live video applications to pull their respective user room lists when needed, and view the user room lists of one or more live video applications and each user resource request Corresponding user resources.

每个视频直播应用程序获取用户资源的方式可为:当前视频直播应用程序已打上标签内容的一个用户再次登录当前视频直播应用程序时,系统自动搜索与该用户的标签内容对应的所需用户资源请求在哪些视频直播应用程序的用户房间列表中,将与该用户标签内容对应的多个视频直播应用程序推荐给该用户,该用户可点击进入其中一个视频直播应用程序的用户房间中,进而被点击进入的视频直播应用程序便可获得该用户的访问流量资源。更多用户资源的获取方式同上述用户资源的获取方式,此处不再赘述。The method for each live video application to obtain user resources can be: when a user who has tagged content in the current live video application logs in to the current live video application again, the system will automatically search for the required user resources corresponding to the user's tagged content Request to recommend multiple live video applications corresponding to the user's label content to the user in the user room list of which live video applications, and the user can click to enter the user room of one of the live video applications, and then be selected Click to enter the live video application to obtain the user's access traffic resources. The acquisition method of more user resources is the same as the above-mentioned user resource acquisition method, and will not be repeated here.

步骤七,按照预设资源配置规则以及一个或多个视频直播应用程序的主播资源请求,确定每个主播资源请求所请求的主播资源。Step 7: Determine the anchor resources requested by each anchor resource request according to the preset resource configuration rules and the anchor resource requests of one or more live video application programs.

步骤八,将一个或多个视频直播应用程序所请求的主播资源,对应分配给一个或多个视频直播应用程序的主播房间列表。Step 8: Correspondingly assign the anchor resources requested by one or more live video application programs to the list of anchor rooms of the one or more live video application programs.

混服集群提供API接口服务,可供一个或多个视频直播应用程序在需要时拉取各自请求的主播房间列表,查看各自视频直播应用程序的主播房间列表中与请求对应的主播资源。The mixed-server cluster provides API interface services, which can be used by one or more live video applications to pull the list of anchor rooms requested by them when needed, and view the anchor resources corresponding to the request in the list of anchor rooms of their respective live video applications.

每个视频直播应用程序获取主播资源的方式可为:获取当前已带有标签内容的主播,系统自动搜索与该主播的标签内容对应的所需主播资源请求在哪些视频直播应用程序的主播房间列表中,当该主播在开播时,与该主播的标签内容对应的多个视频直播应用程序同时直播该主播的直播内容,进而与该主播的标签内容对应的多个视频直播应用程序便可获得该主播的直播资源。更多主播资源的获取方式同上述主播资源的获取方式,此处不再赘述。The method for each live video application to obtain anchor resources can be: obtain the current anchor with tagged content, and the system will automatically search for the anchor room list of the live video application in which the required anchor resources corresponding to the tagged content of the anchor are requested. Among them, when the anchor is broadcasting, multiple video live broadcast applications corresponding to the anchor's tag content live broadcast the anchor's live broadcast content at the same time, and then multiple video live broadcast applications corresponding to the anchor's tag content can obtain the The host's live broadcast resources. The acquisition method of more anchor resources is the same as the above-mentioned anchor resource acquisition method, and will not be repeated here.

可见,通过本发明实施例可实现按照每个视频直播应用程序的需求导入对应的直播内容或者观众。另外,采用用户房间列表以及主播房间列表的方式管理每个视频直播应用程序的需求以及分配的资源,便于服务器集群对请求以及资源的分类管理,也便于一个或多个视频直播应用程序通过用户房间列表查看以及获取所需的用户资源,通过主播房间列表查看以及获取所需的主播资源,实现分类查看以及获取用户资源或主播资源。It can be seen that through the embodiments of the present invention, corresponding live content or viewers can be imported according to the requirements of each live video application. In addition, the user room list and anchor room list are used to manage the needs of each live video application and the allocated resources, which facilitates the classification and management of requests and resources by server clusters, and facilitates one or more live video applications through user rooms. Check the list and obtain the required user resources, view and obtain the required anchor resources through the anchor room list, and realize classification viewing and obtain user resources or anchor resources.

可选地,在将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序之前,方法还包括:Optionally, before assigning the user resources or anchor resources corresponding to each resource request to one or more live video application programs, the method further includes:

在缓存中获取一个或多个视频直播应用程序的用户资源请求所需的标签内容对应的用户资源,或一个或多个视频直播应用程序的主播资源请求所需的标签内容对应的主播资源。Obtain in the cache the user resource corresponding to the tag content required by the user resource request of one or more live video applications, or the anchor resource corresponding to the tag content required by the anchor resource request of one or more live video applications.

上述已将用户以及用户对应的标签内容、主播以及主播对应的标签内容存储在缓存redis中。在本发明实施例中,当上述确定了一个或多个视频直播应用程序的用户资源请求后,在缓存redis中查找与一个或多个视频直播应用程序的用户资源请求所需的标签内容对应的标签内容,进而确定每个用户资源请求所需的标签内容对应的用户资源。将获取得到的用户资源按照预设资源配置规则分配给一个或多个视频直播应用程序。The user and the label content corresponding to the user, the anchor and the label content corresponding to the anchor have been stored in the cache redis. In the embodiment of the present invention, after the above-mentioned user resource requests of one or more live video applications are determined, the cache redis is searched for the tag content corresponding to the user resource requests of one or more live video applications. Tag content, and then determine the user resource corresponding to the tag content required by each user resource request. Allocate the obtained user resources to one or more live video applications according to preset resource configuration rules.

当上述确定了一个或多个视频直播应用程序的主播资源请求后,在缓存 redis中查找与一个或多个视频直播应用程序的主播资源请求所需的标签内容对应的标签内容,进而确定每个主播资源请求所需的标签内容对应的主播。将获取得到的主播资源按照预设资源配置规则分配给一个或多个视频直播应用程序。After the anchor resource requests of one or more live video applications are determined above, the tag content corresponding to the tag content required by the anchor resource requests of one or more live video applications is searched in the cache redis, and then each The anchor corresponding to the tag content required by the anchor resource request. Allocate the obtained anchor resources to one or more live video applications according to preset resource configuration rules.

可见,通过本发明实施例在缓存中获取每个视频直播应用程序的用户资源请求所需的标签内容对应的用户资源,或每个视频直播应用程序的主播资源请求所需的标签内容对应的主播资源,相比于从内存中读取速率更高,获取资源的速率更加高效。It can be seen that, through the embodiments of the present invention, the user resource corresponding to the tag content required by the user resource request of each live video application program is acquired in the cache, or the anchor corresponding to the tag content required by the anchor resource request of each live video application program Resources, compared to the higher rate of reading from memory, the rate of obtaining resources is more efficient.

为达到上述发明目的,本发明实施例公开了一种系统架构图,如图4所示。图4为本发明实施例的一种直播资源系统架构图。In order to achieve the purpose of the above invention, the embodiment of the present invention discloses a system architecture diagram, as shown in FIG. 4 . FIG. 4 is an architecture diagram of a live broadcast resource system according to an embodiment of the present invention.

在本发明实施例中,因一个或多个视频直播应用程序数据独立,如果有视频直播应用程序想要导用户流量只能依赖传统模式,购买流量,成本较高;或者有视频直播应用程序需要优质主播资源只能依赖传统模式,寻找公会或者签约主播自行培养,成本较高,因此本发明实施例公开了一种直播资源分配方法,通过打通一个或多个视频直播应用程序数据,为缺少用户的视频直播应用程序平台导入匹配的用户资源,为缺少主播的视频直播应用程序平台导入高质量的直播内容,进而降低一个或多个视频直播应用程序成本更低,以及运营门槛。In the embodiment of the present invention, because one or more live video application data are independent, if there is a live video application that wants to guide user traffic, it can only rely on the traditional mode, and the cost of purchasing traffic is relatively high; or there is a live video application that requires High-quality anchor resources can only rely on the traditional model. Finding guilds or contracting anchors to cultivate themselves is costly. Therefore, the embodiment of the present invention discloses a live broadcast resource allocation method. The live video application platform imports matching user resources, and imports high-quality live content for the live video application platform that lacks anchors, thereby reducing the cost and operating threshold of one or more live video applications.

在图4的直播资源系统架构图中,以视频直播A平台与视频直播B平台为例,说明本发明实施例的直播资源分配方法。In the structure diagram of the live broadcast resource system in FIG. 4 , the live video broadcast platform A and the video live broadcast B platform are taken as examples to illustrate the method for allocating live broadcast resources in the embodiment of the present invention.

在视频直播A平台有如图5所示的后台服务。在视频直播A平台有独立服务模块,例如基础服务、直播服务、第三方服务、系统监控、数据库以及网关等。每个独立服务模块间相互协作,完成视频直播A平台的每个种服务功能。在每个独立服务模块中有多个子功能服务模块,例如基础服务中有账号中心、房间中心、金融中心、视频中心以及消息中心;直播服务中有宝箱服务、背包服务、红包服务、礼物服务、任务服务、勋章服务等,其它具体功能如图5所示。视频直播B平台的后台服务与视频直播A平台类似,在此不再赘述。There are background services shown in Figure 5 on the live video platform A. There are independent service modules on the live video A platform, such as basic services, live broadcast services, third-party services, system monitoring, databases, and gateways. Each independent service module cooperates with each other to complete each service function of the live video A platform. There are multiple sub-function service modules in each independent service module. For example, the basic service includes account center, room center, financial center, video center, and message center; the live broadcast service includes treasure box service, backpack service, red envelope service, gift service, Task service, medal service, etc., and other specific functions are shown in Figure 5. The background service of the live video platform B is similar to that of the live video platform A, and will not be repeated here.

混服服务器集群是一组单独实现混合服务的服务器集群。混服服务器集群独立于业务服务器之外,是一组通用服务器。在图4的直播资源系统架构图中,可知该混合服务器集群中有混合逻辑层的混合逻辑服务、混合定时器;数据层的数据库mysql、全文搜索引擎Elasticsearch、缓存数据库redis。A mixed server cluster is a group of server clusters that independently implement mixed services. The mixed server cluster is independent of business servers and is a group of general servers. In the live broadcast resource system architecture diagram in Figure 4, it can be seen that the hybrid server cluster includes hybrid logic services and hybrid timers in the hybrid logic layer; database mysql, full-text search engine Elasticsearch, and cache database redis in the data layer.

该混合逻辑层用于分析获取的一个或多个视频直播应用程序的用户日志、主播日志,为每个用户以及每个主播打上标签。具体的混合逻辑服务为分析一个或多个视频直播应用程序的用户日志、主播日志进而为用户以及主播打上标签,混合定时器用于设置预设时间周期,并获取周期内的信息,进而为后期得到的标签内容更加精准。数据层主要用于获取以及存储获取到的用户日志、主播日志以及一个或多个视频直播应用程序的资源请求信息。具体地,数据库 mysql用于存储预设资源配置规则以及预设标签列表中每个标签对应的规则;全文搜索引擎Elasticsearch用于存储从消息队列中获取的用户日志、用户日志以及资源请求信息;缓存数据库redis用于存储打上标签的用户以及打上标签的主播。The hybrid logic layer is used to analyze the obtained user logs and host logs of one or more live video applications, and to label each user and each host. The specific hybrid logic service is to analyze the user logs and anchor logs of one or more live video applications, and then label the users and anchors. The hybrid timer is used to set the preset time period and obtain the information within the period, and then obtain The label content is more precise. The data layer is mainly used to obtain and store the obtained user logs, anchor logs, and resource request information of one or more live video applications. Specifically, the database mysql is used to store preset resource configuration rules and the rules corresponding to each tag in the preset tag list; the full-text search engine Elasticsearch is used to store user logs, user logs, and resource request information obtained from the message queue; cache The database redis is used to store tagged users and tagged anchors.

首先,混服服务器集群获取视频直播A平台与视频直播B平台的用户日志和/或主播日志,以及视频直播A平台的资源请求、直播B平台的资源请求;将上述获取到的日志以及一个或多个视频直播平台的资源请求存放在混服服务器集群建立的消息队列kafka中。First, the mixed server cluster obtains the user logs and/or host logs of the live video platform A and the live video platform B, as well as the resource requests of the live video platform A and the resource requests of the live video platform B; The resource requests of multiple live video platforms are stored in the message queue kafka established by the mixed server cluster.

其次,从消息队列kafka中获取视频直播A平台的资源请求以及用户日志和 /或主播日志,获取视频直播B平台的资源请求以及用户日志和/或主播日志,将获取的所有用户日志以及所有主播日志,存储到全文搜索引擎。Secondly, obtain the resource request and user logs and/or anchor logs of the video live broadcast A platform from the message queue kafka, obtain the resource requests and user logs and/or anchor logs of the live video broadcast B platform, and obtain all user logs and all anchors Log, stored to the full-text search engine.

再次,获取该全文搜索引擎中预设时间内所有用户日志以及所有主播日志。混合逻辑服务根据Elasticsearch上的每个用户日志以及每个主播日志,通过数据库mysql中的预设标签列表中每个标签对应的规则,分析每个用户和每个主播的行为及爱好,为每个主播和每个用户打上对应的标签。Again, obtain all user logs and all anchor logs in the full-text search engine within a preset period of time. According to the logs of each user and each anchor on Elasticsearch, the hybrid logic service analyzes the behavior and hobbies of each user and each anchor through the rules corresponding to each label in the preset label list in the database mysql, and provides each The anchor and each user are marked with a corresponding label.

最后,按照预设资源配置规则以及一个或多个视频直播应用程序资源请求,将与一个或多个视频直播应用程序资源请求所需的标签内容对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序,其中,视频直播应用程序资源请求包括每个用户资源请求和/或每个主播资源请求,每个请求中包含所需的标签内容。Finally, according to the preset resource configuration rules and one or more live video application resource requests, the user resources or anchor resources corresponding to the label content required by one or more live video application resource requests are allocated to one or more A plurality of live video applications, wherein the resource request of the live video application includes each user resource request and/or each anchor resource request, and each request includes required label content.

具体为,按照预设资源配置规则以及视频直播A平台的资源请求,将与视频直播A平台资源请求所需的标签内容对应的用户资源或主播资源,分配给视频直播A平台的直播房间列表。按照预设资源配置规则以及视频直播B平台的资源请求,将与视频直播B平台资源请求所需的标签内容对应的用户资源或主播资源,分配到视频直播B平台的直播房间列表。Specifically, according to the preset resource configuration rules and the resource request of the live video platform A, allocate the user resources or anchor resources corresponding to the tag content required by the resource request of the live video platform A to the live room list of the live video platform A. According to the preset resource configuration rules and the resource request of the live video platform B, the user resources or host resources corresponding to the tag content required by the resource request of the live video platform B are allocated to the live room list of the live video platform B.

可见,本发明通过构建混服集群,进而获取多个视频直播应用程序的用户日志和主播日志,通过预设标签列表中每个标签对应的规则以及大数据分析,为每个主播和每个用户打上标签,用于个性化推荐给对应的多个视频直播应用程序,实现不同视频直播应用程序可以按需导入对应的直播内容或者观众。It can be seen that the present invention acquires user logs and anchor logs of multiple video live broadcast applications by constructing a mixed server cluster, and provides each anchor and each user with the rules corresponding to each tag in the preset tag list and big data analysis. Tags are used for personalized recommendation to corresponding multiple live video applications, so that different live video applications can import corresponding live content or viewers as needed.

另外,本发明实施例还可通过混服服务集群打通多个视频直播应用程序的后台服务器数据,将不同视频直播应用程序的数据库的主播和用户信息按照预设规则进行合并,不进行打标签步骤,直接混合所有的主播以及用户。In addition, the embodiment of the present invention can also open up the background server data of multiple live video application programs through the mixed server service cluster, and merge the host and user information of the databases of different live video application programs according to the preset rules without performing the labeling step , directly mix all anchors and users.

为了更好的说明图4中的直播资源系统架构中每个部分的执行过程,可有图6所示的本发明实施例的一种直播资源分配方法第二流程图,具体为:In order to better illustrate the execution process of each part of the live resource system architecture in FIG. 4, there may be a second flow chart of a live resource allocation method according to an embodiment of the present invention shown in FIG. 6, specifically:

S601、在一个或多个视频直播应用程序中获取用户日志以及主播日志;S601. Obtain user logs and anchor logs in one or more live video applications;

S602、混服服务集群为一个或多个视频直播应用程序创建kafka消息队列,将一个或多个视频直播应用程序中的用户日志以及主播日志放入该kafka消息队列;S602. The mixed server service cluster creates a kafka message queue for one or more live video applications, and puts user logs and anchor logs in one or more live video applications into the kafka message queue;

S603、全文搜索引擎Elasticsearch获取该kafka消息队列中的用户日志以及主播日志;S603, the full-text search engine Elasticsearch obtains the user log and anchor log in the kafka message queue;

S604、定时器启动,要求获取预设时间内的用户日志以及主播日志,每个标签、每个标签对应的规则以及预设资源配置规则;S604, the timer is started, and it is required to obtain user logs and anchor logs within a preset time, each label, the rules corresponding to each label, and the preset resource configuration rules;

S605、在全文搜索引擎Elasticsearch中搜索预设时间的用户日志以及主播日志;S605. Search user logs and anchor logs at a preset time in the full-text search engine Elasticsearch;

S606、获取数据库的预设标签列表中每个标签、每个标签对应的规则,以及预设资源配置规则;S606. Obtain each tag in the preset tag list of the database, the rule corresponding to each tag, and the preset resource configuration rule;

S607、混合逻辑服务给获取预设时间的所有用户日志以及所有主播日志,通过每个标签对应的规则,为每个用户以及每个主播打标签;S607. The hybrid logic service tags each user and each anchor through the rules corresponding to each tag for all user logs and all anchor logs obtained at a preset time;

S608、在缓存中建立直播房间列表,按照一个或多个视频直播应用程序开始发送的资源请求以及预设资源配置规则确定一个或多个视频直播应用程序对应的用户资源和/或主播资源。在一个或多个视频直播应用程序的直播房间列表中缓存每个用户以及每个用户对应的标签内容、缓存每个主播以及每个主播对应的标签内容;S608. Establish a live room list in the cache, and determine user resources and/or host resources corresponding to one or more live video applications according to resource requests initially sent by one or more live video applications and preset resource configuration rules. Caching each user and the tag content corresponding to each user, caching each anchor and the tag content corresponding to each anchor in the live room list of one or more live video applications;

S609、一个或多个视频直播应用程序可通过API发送查看请求,查看各自的直播房间列表;S609. One or more video live broadcast applications can send viewing requests through the API to view their respective live broadcast room lists;

S610、混合逻辑服务获取一个或多个视频直播应用程序的查看请求后,确定一个或多个视频直播应用程序缓存对应的直播房间表;S610. After obtaining the viewing request of one or more live video applications, the hybrid logic service determines the live room table corresponding to one or more live video application caches;

S611、缓存返回一个或多个视频直播应用程序对应的直播房间列表。S611. The cache returns a live room list corresponding to one or more live video application programs.

可见,通过本发明可以打通不同视频直播应用程序的用户和主播的数据,为缺少用户的视频直播应用程序平台导入匹配的用户资源,为缺少主播的视频直播应用程序平台导入高质量的直播内容,相较于传统方式成本更低,导入方式更加精确,降低直播平台运营门槛。It can be seen that through the present invention, the data of users and hosts of different live video application programs can be connected, matching user resources can be imported for live video application platforms lacking users, and high-quality live content can be imported for live video application platforms lacking anchors. Compared with the traditional method, the cost is lower, the import method is more accurate, and the operating threshold of the live broadcast platform is lowered.

为达到上述发明目的,本发明实施例还公开了一种直播资源分配装置,如图7所示。图7为本发明实施例的一种直播资源分配装置结构示意图,包括:In order to achieve the purpose of the above invention, the embodiment of the present invention also discloses a device for allocating live broadcast resources, as shown in FIG. 7 . FIG. 7 is a schematic structural diagram of a live broadcast resource allocation device according to an embodiment of the present invention, including:

创建队列模块701,用于为一个或多个视频直播应用程序的后台服务器集群创建消息队列;Create a queue module 701, which is used to create a message queue for the background server cluster of one or more live video application programs;

标签确定模块702,用于获取消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于所有用户日志以及所有主播日志,确定预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容;The tag determination module 702 is configured to obtain all user logs and all anchor logs in the message queue within a preset time, and determine the preset time based on the rules corresponding to each tag in the preset tag list based on all user logs and all anchor logs. The label content corresponding to each user resource, and the label content corresponding to each anchor resource;

分配模块703,用于按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序,其中,每个资源请求为每个用户资源请求或每个主播资源请求,每个用户资源请求包括所请求的用户资源对应的标签内容,每个主播资源请求包括所请求的主播资源对应的标签内容。The allocation module 703 is configured to allocate the user resources or anchor resources corresponding to each resource request to one or more live video broadcasts according to the preset resource configuration rules and each resource request of one or more live video broadcast applications application, wherein each resource request is a request for each user resource or each anchor resource request, each user resource request includes the tag content corresponding to the requested user resource, and each anchor resource request includes the requested anchor resource corresponding content of the label.

本发明实施例提供的一种直播资源分配装置,以实现不同直播平台的用户和主播的资源整合及用户和主播的资源按需分配。具体为,为一个或多个视频直播应用程序的后台服务器集群创建消息队列,获取该消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,确定预设时间内每个用户对应的标签内容,以及每个主播对应的标签内容。首先,通过创建消息队列,实现缓存用户日志以及主播日志,避免数据库存储压力过大。然后,通过获取消息队列中预设时间的所用用户日志以及所用主播日志,分析每个用户日志对应的行为或者每个主播日志对应的行为,进而实现为每个用户以及每个主播打上个性化的标签内容。最后,按照每个视频直播应用程序的每个资源请求,找到与每个资源请求含有的标签内容对应的主播资源或者用户资源,将这些主播资源或者用户资源匹配给每个视频直播应用程序。An embodiment of the present invention provides a device for allocating live broadcast resources to realize resource integration between users and anchors on different live broadcast platforms and resource allocation between users and anchors on demand. Specifically, create a message queue for the background server cluster of one or more live video applications, obtain all user logs and all anchor logs in the message queue within a preset time period, and pass the rules corresponding to each tag in the preset tag list, Determine the tag content corresponding to each user within the preset time, and the tag content corresponding to each anchor. First, create a message queue to cache user logs and anchor logs to avoid excessive pressure on database storage. Then, by obtaining the user log and the anchor log used at the preset time in the message queue, analyze the behavior corresponding to each user log or the behavior corresponding to each anchor log, and then realize the personalization of each user and each anchor label content. Finally, according to each resource request of each live video application, find anchor resources or user resources corresponding to the tag content contained in each resource request, and match these anchor resources or user resources to each live video application.

本发明实施例通过分析一个或多个视频直播应用程序的每个资源请求、每个用户日志对应的行为以及每个主播日志对应的行为,最终达到了打通一个或多个视频直播应用程序的数据,实现个性化的匹配一个或多个视频直播应用程序程序的用户资源以及主播资源。另外,本发明实施例根据一个或多个视频直播应用程序的资源请求按需导入资源,即为缺少用户的直播平台导入匹配的用户资源,为缺少主播的直播平台导入高质量的直播内容,这种资源导入方式更加精确,对于视频直播应用程序的运营也降低了成本。In the embodiment of the present invention, by analyzing each resource request of one or more live video application programs, the behavior corresponding to each user log, and the behavior corresponding to each anchor log, the data of one or more live video live application programs is finally achieved. , to achieve personalized matching of user resources and anchor resources of one or more live video application programs. In addition, the embodiment of the present invention imports resources on demand according to resource requests of one or more live video application programs, that is, imports matching user resources for live broadcast platforms that lack users, and imports high-quality live content for live broadcast platforms that lack anchors. This resource import method is more accurate, and the operation cost of the live video application is also reduced.

可选地,在本发明直播资源分配装置的一种实施例中,创建队列模块701,具体用于获取一个或多个视频直播应用程序对应的每个主题,为每个主题均创建队列,将队列对应确定为一个或多个视频直播应用程序的消息队列,其中,主题包括用户日志以及主播日志。Optionally, in one embodiment of the apparatus for allocating live broadcast resources of the present invention, the creation queue module 701 is specifically configured to obtain each topic corresponding to one or more live video application programs, create a queue for each topic, and The queue corresponds to one or more message queues of live video applications, where the topics include user logs and anchor logs.

可选地,在本发明直播资源分配装置的一种实施例中,标签确定模块702,包括:Optionally, in an embodiment of the device for allocating live broadcast resources of the present invention, the label determination module 702 includes:

存储子模块,用于获取消息队列中所有用户日志以及所有主播日志,存储到全文搜索引擎;The storage sub-module is used to obtain all user logs and all anchor logs in the message queue and store them in the full-text search engine;

第一获取子模块,用于获取全文搜索引擎中预设时间内所有用户日志以及所有主播日志;The first obtaining sub-module is used to obtain all user logs and all anchor logs in the full-text search engine within a preset time;

目标信息确定子模块,用于根据每个用户对应的所有用户日志,形成每个用户的目标信息;根据每个主播对应的所有主播日志,形成每个主播的目标信息;The target information determination sub-module is used to form the target information of each user according to all user logs corresponding to each user; to form the target information of each anchor according to all the anchor logs corresponding to each anchor;

第二获取子模块,用于从数据库的预设标签列表中,获取每个标签以及每个标签对应的规则;The second obtaining submodule is used to obtain each tag and the rules corresponding to each tag from the preset tag list in the database;

用户分数确定子模块,用于在每个标签对应的用户评分规则下,对每个用户的目标信息打分,得到每个用户对应于每个标签的分数值;The user score determination sub-module is used to score the target information of each user under the user scoring rules corresponding to each label, and obtain the score value corresponding to each label of each user;

用户标签确定子模块,用于获取每个用户的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为每个用户对应的标签内容,其中,N为1≤N ≤3的自然数;The user label determination sub-module is used to obtain the score value greater than the threshold value of each user, and determine the N labels corresponding to the score value greater than the threshold value as the label content corresponding to each user, where N is 1≤N≤3 Natural number;

主播分数确定子模块,用于在每个标签对应的主播评分规则下,对每个主播的目标信息打分,得到每个主播对应于每个标签的分数值;The anchor score determination sub-module is used to score the target information of each anchor under the anchor scoring rules corresponding to each label, and obtain the score value of each anchor corresponding to each label;

主播标签确定子模块,用于获取每个主播的大于阈值的分数值,将大于阈值的分数值对应的N个标签确定为每个主播对应的标签内容。The host label determination sub-module is used to obtain the score value greater than the threshold value of each anchor, and determine the N tags corresponding to the score value greater than the threshold value as the label content corresponding to each anchor.

可选地,在本发明直播资源分配装置的一种实施例中,用户分数确定子模块,包括:Optionally, in an embodiment of the apparatus for allocating live broadcast resources of the present invention, the user score determination submodule includes:

用户规则确定单元,用于获取每个标签所对应的一个或多个用户信息评分项目,将一个或多个用户信息评分项目对应的评分规则,对应确定为每个标签对应的用户评分规则,其中,用户信息评分项目为表示用户日志属性的项目;The user rule determination unit is configured to obtain one or more user information scoring items corresponding to each label, and determine the scoring rules corresponding to one or more user information scoring items as corresponding user scoring rules for each label, wherein , the user information scoring item is an item representing the user log attribute;

用户分数确定单元,用于通过每个标签对应的用户评分规则,对每个用户的目标信息打分,得到每个用户对应于每个标签的分数值;The user score determination unit is used to score the target information of each user through the user scoring rules corresponding to each label, and obtain the score value of each user corresponding to each label;

主播分数确定子模块,包括:Anchor score determination sub-module, including:

主播规则确定单元,用于获取每个标签所对应的一个或多个主播信息评分项目,将一个或多个主播信息评分项目对应的评分规则,对应确定为每个标签对应的主播评分规则,其中,主播信息评分项目为表示主播日志属性的项目;The anchor rule determination unit is used to obtain one or more anchor information scoring items corresponding to each label, and determine the scoring rules corresponding to one or more anchor information scoring items as the anchor scoring rules corresponding to each label, wherein , the anchor information scoring item is an item representing the attribute of the anchor log;

主播分数确定单元,用于通过每个标签对应的主播评分规则,对每个主播的目标信息打分,得到每个主播对应于每个标签的分数值。The anchor score determination unit is configured to score the target information of each anchor through the anchor scoring rules corresponding to each tag, and obtain the score value of each anchor corresponding to each tag.

可选地,在本发明直播资源分配装置的一种实施例中,装置还包括:Optionally, in an embodiment of the live broadcast resource allocation device of the present invention, the device further includes:

用户信息存储模块,用于将预设时间内每个用户以及每个用户对应的标签内容,存储在缓存中;The user information storage module is used to store each user and the tag content corresponding to each user in the cache within a preset time;

主播信息存储模块,用于将预设时间内每个主播以及每个主播对应的标签内容,存储在缓存中。The anchor information storage module is used to store each anchor and the tag content corresponding to each anchor in the cache within a preset time.

可选地,在本发明直播资源分配装置的一种实施例中,装置还包括:Optionally, in an embodiment of the live broadcast resource allocation device of the present invention, the device further includes:

请求获取模块,用于获取一个或多个视频直播应用程序的每个资源请求;The request acquisition module is used to acquire each resource request of one or more live video applications;

列表建立模块,用于按照每行对应为一条资源请求的排列方式,分别将一个或多个视频直播应用程序中的用户资源请求或主播资源请求排列,形成一个或多个视频直播应用程序的每个资源请求对应的一个或多个直播房间列表;The list building module is used to arrange the user resource requests or anchor resource requests in one or more live video application programs according to the arrangement mode in which each row corresponds to a resource request, so as to form each resource request of one or more live video application programs. One or more live room lists corresponding to resource requests;

分配模块703,包括:Assignment module 703, comprising:

资源确定子模块,用于按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,确定每个资源请求所请求的用户资源或主播资源;The resource determination submodule is used to determine the user resources or anchor resources requested by each resource request according to the preset resource configuration rules and each resource request of one or more live video application programs;

资源分配子模块,用于将一个或多个视频直播应用程序的资源请求所请求的用户资源或主播资源,对应分配到一个或多个视频直播应用程序的直播房间列表。The resource allocation sub-module is configured to correspondingly assign the user resources or host resources requested by the resource requests of one or more live video applications to the live room list of one or more live video applications.

可选地,在本发明直播资源分配装置的一种实施例中,装置还包括:Optionally, in an embodiment of the live broadcast resource allocation device of the present invention, the device further includes:

用户请求获取模块,用于获取一个或多个视频直播应用程序中的每个用户资源请求;A user request acquisition module, configured to acquire each user resource request in one or more live video applications;

用户列表建立模块,用于按照每行对应为一条用户资源请求的排列方式,分别将一个或多个视频直播应用程序的用户资源请求排列,形成一个或多个视频直播应用程序的每个用户资源请求对应的用户房间列表;The user list building module is used to arrange the user resource requests of one or more live video application programs respectively according to the arrangement mode in which each row corresponds to a user resource request, to form each user resource of one or more live video application programs Request the corresponding user room list;

主播请求获取模块,用于获取一个或多个视频直播应用程序的每个主播资源请求;An anchor request acquisition module, configured to acquire each anchor resource request of one or more live video applications;

主播列表建立模块,用于按照每行对应为一条主播资源请求的排列方式,分别将一个或多个视频直播应用程序中的主播资源请求排列,形成一个或多个视频直播应用程序的每个主播资源请求对应的主播房间列表;The anchor list building module is used to arrange the anchor resource requests in one or more live video application programs according to the arrangement mode corresponding to one anchor resource request in each row to form each anchor of one or more live video application programs The host room list corresponding to the resource request;

分配模块703,包括:Assignment module 703, comprising:

用户资源确定子模块,用于按照预设资源配置规则以及一个或多个视频直播应用程序的用户资源请求,确定每个用户资源请求所请求的用户资源;The user resource determination submodule is used to determine the user resources requested by each user resource request according to the preset resource configuration rules and the user resource requests of one or more live video application programs;

用户资源分配子模块,用于将一个或多个视频直播应用程序所请求的用户资源,对应分配给一个或多个视频直播应用程序的用户房间列表;The user resource allocation sub-module is used to allocate user resources requested by one or more live video applications to user room lists of one or more live video applications;

主播资源确定子模块,用于按照预设资源配置规则以及一个或多个视频直播应用程序的主播资源请求,确定每个主播资源请求所请求的主播资源;The host resource determination sub-module is used to determine the host resources requested by each host resource request according to the preset resource configuration rules and the host resource requests of one or more live video application programs;

主播资源分配子模块,用于将一个或多个视频直播应用程序所请求的主播资源,对应分配给一个或多个视频直播应用程序的主播房间列表。The anchor resource allocation sub-module is used to allocate the anchor resources requested by one or more live video applications to the list of anchor rooms of one or more live video applications.

可选地,在本发明直播资源分配装置的一种实施例中,装置还包括:Optionally, in an embodiment of the live broadcast resource allocation device of the present invention, the device further includes:

资源获取模块,用于在缓存中获取一个或多个视频直播应用程序的用户资源请求所需的标签内容对应的用户资源,或一个或多个视频直播应用程序的主播资源请求所需的标签内容对应的主播资源。The resource acquisition module is used to obtain in the cache the user resource corresponding to the tag content required by the user resource request of one or more live video applications, or the tag content required by the anchor resource request of one or more live video applications Corresponding host resources.

为达到上述发明目的,本发明实施例还公开了一种电子设备,如图8所示。图8为本发明实施例的一种电子设备结构示意图,包括存储器801和处理器802;In order to achieve the purpose of the above invention, the embodiment of the present invention also discloses an electronic device, as shown in FIG. 8 . FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, including a memory 801 and a processor 802;

存储器801,用于储存可执行程序代码;Memory 801, for storing executable program codes;

处理器802,用于读取存储器801中存储的可执行程序代码,以执行以下方法步骤:The processor 802 is configured to read the executable program code stored in the memory 801 to perform the following method steps:

为一个或多个视频直播应用程序的后台服务器集群创建消息队列;Create a message queue for one or more background server clusters of live video applications;

获取消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于所有用户日志以及所有主播日志,确定预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容;Obtain all user logs and all anchor logs in the message queue within the preset time, and determine the tag corresponding to each user resource within the preset time based on all user logs and all anchor logs through the rules corresponding to each tag in the preset tag list content, and the label content corresponding to each anchor resource;

按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序,其中,每个资源请求为每个用户资源请求或每个主播资源请求,每个用户资源请求包括所请求的用户资源对应的标签内容,每个主播资源请求包括所请求的主播资源对应的标签内容。According to the preset resource configuration rules and each resource request of one or more live video applications, the user resources or anchor resources corresponding to each resource request are assigned to one or more live video applications, wherein each The resource requests are each user resource request or each anchor resource request, each user resource request includes the tag content corresponding to the requested user resource, and each anchor resource request includes the tag content corresponding to the requested anchor resource.

上述存储器801可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如一个或多个磁盘存储器。可选的,存储器801还可以是一个或多个位于远离处理器502 的存储装置。The foregoing memory 801 may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as one or more disk memories. Optionally, the memory 801 may also be one or more storage devices located far away from the processor 502 .

上述的处理器802可以是通用处理器,包括中央处理器(Central ProcessingUnit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(DigitalSignal Processing,DSP)、专用集成电路(应用程序lication Specific IntegratedCircuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array, FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor 802 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it may also be a digital signal processor (Digital Signal Processing, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

本发明实施例提供的一种电子设备,以实现不同直播平台的用户和主播的资源整合及用户和主播的资源按需分配。具体为,为一个或多个视频直播应用程序的后台服务器集群创建消息队列,获取该消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,确定预设时间内每个用户对应的标签内容,以及每个主播对应的标签内容。首先,通过创建消息队列,实现缓存用户日志以及主播日志,避免数据库存储压力过大。然后,通过获取消息队列中预设时间的所用用户日志以及所用主播日志,分析每个用户日志对应的行为或者每个主播日志对应的行为,进而实现为每个用户以及每个主播打上个性化的标签内容。最后,按照每个视频直播应用程序的每个资源请求,找到与每个资源请求含有的标签内容对应的主播资源或者用户资源,将这些主播资源或者用户资源匹配给每个视频直播应用程序。An electronic device provided by an embodiment of the present invention is used to realize resource integration of users and anchors of different live broadcast platforms and resource allocation of users and anchors on demand. Specifically, create a message queue for the background server cluster of one or more live video applications, obtain all user logs and all anchor logs in the message queue within a preset time period, and pass the rules corresponding to each tag in the preset tag list, Determine the tag content corresponding to each user within the preset time, and the tag content corresponding to each anchor. First, create a message queue to cache user logs and anchor logs to avoid excessive pressure on database storage. Then, by obtaining the user log and the anchor log used at the preset time in the message queue, analyze the behavior corresponding to each user log or the behavior corresponding to each anchor log, and then realize the personalization of each user and each anchor label content. Finally, according to each resource request of each live video application, find anchor resources or user resources corresponding to the tag content contained in each resource request, and match these anchor resources or user resources to each live video application.

本发明实施例通过分析一个或多个视频直播应用程序的每个资源请求、每个用户日志对应的行为以及每个主播日志对应的行为,最终达到了打通一个或多个视频直播应用程序的数据,实现个性化的匹配一个或多个视频直播应用程序程序的用户资源以及主播资源。另外,本发明实施例根据一个或多个视频直播应用程序的资源请求按需导入资源,即为缺少用户的直播平台导入匹配的用户资源,为缺少主播的直播平台导入高质量的直播内容,这种资源导入方式更加精确,对于视频直播应用程序的运营也降低了成本。In the embodiment of the present invention, by analyzing each resource request of one or more live video application programs, the behavior corresponding to each user log, and the behavior corresponding to each anchor log, the data of one or more live video live application programs is finally achieved. , to achieve personalized matching of user resources and anchor resources of one or more live video application programs. In addition, the embodiment of the present invention imports resources on demand according to resource requests of one or more live video application programs, that is, imports matching user resources for live broadcast platforms that lack users, and imports high-quality live content for live broadcast platforms that lack anchors. This resource import method is more accurate, and the operation cost of the live video application is also reduced.

为达到上述发明目的,本发明实施例还公开了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现以下方法步骤:In order to achieve the purpose of the above invention, the embodiment of the present invention also discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the following method steps are implemented:

为一个或多个视频直播应用程序的后台服务器集群创建消息队列;Create a message queue for one or more background server clusters of live video applications;

获取消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,基于所有用户日志以及所有主播日志,确定预设时间内每个用户资源对应的标签内容,以及每个主播资源对应的标签内容;Obtain all user logs and all anchor logs in the message queue within the preset time, and determine the tag corresponding to each user resource within the preset time based on all user logs and all anchor logs through the rules corresponding to each tag in the preset tag list content, and the label content corresponding to each anchor resource;

按照预设资源配置规则以及一个或多个视频直播应用程序的每个资源请求,将与每个资源请求对应的用户资源或主播资源,对应分配给一个或多个视频直播应用程序,其中,每个资源请求为每个用户资源请求或每个主播资源请求,每个用户资源请求包括所请求的用户资源对应的标签内容,每个主播资源请求包括所请求的主播资源对应的标签内容。According to the preset resource configuration rules and each resource request of one or more live video applications, the user resources or anchor resources corresponding to each resource request are assigned to one or more live video applications, wherein each A resource request is each user resource request or each anchor resource request, each user resource request includes the tag content corresponding to the requested user resource, and each anchor resource request includes the tag content corresponding to the requested anchor resource.

本发明实施例提供的一种计算机可读存储介质,以实现不同直播平台的用户和主播的资源整合及用户和主播的资源按需分配。具体为,为一个或多个视频直播应用程序的后台服务器集群创建消息队列,获取该消息队列中预设时间内所有用户日志以及所有主播日志,通过预设标签列表中每个标签对应的规则,确定预设时间内每个用户对应的标签内容,以及每个主播对应的标签内容。首先,通过创建消息队列,实现缓存用户日志以及主播日志,避免数据库存储压力过大。然后,通过获取消息队列中预设时间的所用用户日志以及所用主播日志,分析每个用户日志对应的行为或者每个主播日志对应的行为,进而实现为每个用户以及每个主播打上个性化的标签内容。最后,按照每个视频直播应用程序的每个资源请求,找到与每个资源请求含有的标签内容对应的主播资源或者用户资源,将这些主播资源或者用户资源匹配给每个视频直播应用程序。The embodiment of the present invention provides a computer-readable storage medium to realize resource integration of users and anchors of different live broadcast platforms and resource allocation of users and anchors on demand. Specifically, create a message queue for the background server cluster of one or more live video applications, obtain all user logs and all anchor logs in the message queue within a preset time period, and pass the rules corresponding to each tag in the preset tag list, Determine the tag content corresponding to each user within the preset time, and the tag content corresponding to each anchor. First, create a message queue to cache user logs and anchor logs to avoid excessive pressure on database storage. Then, by obtaining the user log and the anchor log used at the preset time in the message queue, analyze the behavior corresponding to each user log or the behavior corresponding to each anchor log, and then realize the personalization of each user and each anchor label content. Finally, according to each resource request of each live video application, find anchor resources or user resources corresponding to the tag content contained in each resource request, and match these anchor resources or user resources to each live video application.

本发明实施例通过分析一个或多个视频直播应用程序的每个资源请求、每个用户日志对应的行为以及每个主播日志对应的行为,最终达到了打通一个或多个视频直播应用程序的数据,实现个性化的匹配一个或多个视频直播应用程序程序的用户资源以及主播资源。另外,本发明实施例根据一个或多个视频直播应用程序的资源请求按需导入资源,即为缺少用户的直播平台导入匹配的用户资源,为缺少主播的直播平台导入高质量的直播内容,这种资源导入方式更加精确,对于视频直播应用程序的运营也降低了成本。In the embodiment of the present invention, by analyzing each resource request of one or more live video application programs, the behavior corresponding to each user log, and the behavior corresponding to each anchor log, the data of one or more live video live application programs is finally achieved. , to achieve personalized matching of user resources and anchor resources of one or more live video application programs. In addition, the embodiment of the present invention imports resources on demand according to resource requests of one or more live video application programs, that is, imports matching user resources for live broadcast platforms that lack users, and imports high-quality live content for live broadcast platforms that lack anchors. This resource import method is more accurate, and the operation cost of the live video application is also reduced.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

本说明书中的每个实施例均采用相关的方式描述,每个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备及存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the device, electronic equipment and storage medium, because it is basically similar to the embodiment of the method, the description is relatively simple, and for relevant parts, please refer to the description of the embodiment of the method.

以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (18)

CN201710779700.9A2017-09-012017-09-01 A method, device, electronic device and storage medium for allocating live broadcast resourcesActiveCN108574850B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710779700.9ACN108574850B (en)2017-09-012017-09-01 A method, device, electronic device and storage medium for allocating live broadcast resources

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710779700.9ACN108574850B (en)2017-09-012017-09-01 A method, device, electronic device and storage medium for allocating live broadcast resources

Publications (2)

Publication NumberPublication Date
CN108574850Atrue CN108574850A (en)2018-09-25
CN108574850B CN108574850B (en)2020-08-28

Family

ID=63576420

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710779700.9AActiveCN108574850B (en)2017-09-012017-09-01 A method, device, electronic device and storage medium for allocating live broadcast resources

Country Status (1)

CountryLink
CN (1)CN108574850B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109348239A (en)*2018-10-182019-02-15北京达佳互联信息技术有限公司Piece stage treatment method, device, electronic equipment and storage medium is broadcast live
CN109862376A (en)*2019-02-282019-06-07广州华多网络科技有限公司Live content jettison system, method, apparatus, listserv and storage medium
CN111343469A (en)*2020-02-192020-06-26腾讯科技(深圳)有限公司Data processing method and device, electronic equipment and storage medium
CN111954021A (en)*2020-08-182020-11-17上海七牛信息技术有限公司Live broadcast resource configuration system and method
CN112004107A (en)*2020-08-242020-11-27广州华多网络科技有限公司Multi-live broadcast room cooperative control method, device, equipment and storage medium
CN113609332A (en)*2021-08-112021-11-05上海众源网络有限公司Method, system and device for recommending video live broadcast resources
CN114570027A (en)*2022-02-242022-06-03广州博冠信息科技有限公司Game resource allocation method, device, terminal and storage medium
CN114666613A (en)*2020-12-222022-06-24华为终端有限公司Network live broadcast method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20040107250A1 (en)*2002-10-212004-06-03Guillermo MarcianoMethods and systems for integrating communication resources using the internet
CN102132577A (en)*2008-07-102011-07-20丛林网络公司 Model-Based Resource Allocation
CN106487781A (en)*2016-09-132017-03-08腾讯科技(深圳)有限公司Based on live resource data processing method, device and system
CN106658040A (en)*2016-12-192017-05-10天脉聚源(北京)传媒科技有限公司Resource distribution method and device
CN106851425A (en)*2016-12-162017-06-13广州华多网络科技有限公司The method and device that the virtual objects of live platform are shared

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20040107250A1 (en)*2002-10-212004-06-03Guillermo MarcianoMethods and systems for integrating communication resources using the internet
CN102132577A (en)*2008-07-102011-07-20丛林网络公司 Model-Based Resource Allocation
CN106487781A (en)*2016-09-132017-03-08腾讯科技(深圳)有限公司Based on live resource data processing method, device and system
CN106851425A (en)*2016-12-162017-06-13广州华多网络科技有限公司The method and device that the virtual objects of live platform are shared
CN106658040A (en)*2016-12-192017-05-10天脉聚源(北京)传媒科技有限公司Resource distribution method and device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109348239B (en)*2018-10-182020-05-19北京达佳互联信息技术有限公司Live broadcast fragment processing method and device, electronic equipment and storage medium
CN109348239A (en)*2018-10-182019-02-15北京达佳互联信息技术有限公司Piece stage treatment method, device, electronic equipment and storage medium is broadcast live
CN109862376B (en)*2019-02-282021-06-01广州方硅信息技术有限公司Live content delivery system, method and device, list server and storage medium
CN109862376A (en)*2019-02-282019-06-07广州华多网络科技有限公司Live content jettison system, method, apparatus, listserv and storage medium
CN111343469A (en)*2020-02-192020-06-26腾讯科技(深圳)有限公司Data processing method and device, electronic equipment and storage medium
CN111954021A (en)*2020-08-182020-11-17上海七牛信息技术有限公司Live broadcast resource configuration system and method
CN112004107A (en)*2020-08-242020-11-27广州华多网络科技有限公司Multi-live broadcast room cooperative control method, device, equipment and storage medium
CN112004107B (en)*2020-08-242022-04-26广州华多网络科技有限公司Multi-live broadcast room cooperative control method, device, equipment and storage medium
CN114666613A (en)*2020-12-222022-06-24华为终端有限公司Network live broadcast method and electronic equipment
CN114666613B (en)*2020-12-222024-01-05华为终端有限公司Network live broadcast method and electronic equipment
CN113609332A (en)*2021-08-112021-11-05上海众源网络有限公司Method, system and device for recommending video live broadcast resources
CN113609332B (en)*2021-08-112024-03-08上海众源网络有限公司Video live broadcast resource recommendation method, system and device
CN114570027A (en)*2022-02-242022-06-03广州博冠信息科技有限公司Game resource allocation method, device, terminal and storage medium
CN114570027B (en)*2022-02-242025-02-18广州博冠信息科技有限公司 A game resource allocation method, device, terminal and storage medium

Also Published As

Publication numberPublication date
CN108574850B (en)2020-08-28

Similar Documents

PublicationPublication DateTitle
CN108574850B (en) A method, device, electronic device and storage medium for allocating live broadcast resources
LeeFilm as cultural diplomacy: South Korea’s nation branding through Parasite (2019)
BaymData not seen: The uses and shortcomings of social media metrics
DartNew media, professional sport and political economy
CN104008139B (en)The creation method and device of video index table, the recommendation method and apparatus of video
CN108573393B (en)Comment information processing method and device, server and storage medium
CN108596694A (en)Method, system and respective media for providing a user content
CN106326391A (en)Method and device for recommending multimedia resources
CN107770574A (en)The method and apparatus of video transmission
Van CouveringThe political economy of new media revisited
US20180330278A1 (en)Processes and techniques for more effectively training machine learning models for topically-relevant two-way engagement with content consumers
TWI808949B (en) Data object information processing method, device and system
Song et al.Managing impressions online: Microblogs and the state media’s adaptation of online logics in China
KR101778660B1 (en)System for providing contents and online community platform based on Social Networking Service fusion type
Antonopoulos et al.Media websites services and users subscription models for online journalism
LehmannSocial Media Theory and Communications Practice
Zabel et al.Coming to town. Importance of agglomeration factors for media cluster development in the German online video industry
García-Orosa et al.Emerging practices in the age of automated digital journalism
CN115481344A (en)Layout configuration method and device of live broadcast page, electronic equipment and storage medium
CN107124467B (en)Multimedia information interaction method and system
Bettiga et al.Exploring media convergence: evidence from Italy
KR20140100595A (en)Method for recommanding media contents using social network service
Wang et al.The impact of the audience's continuance intention towards the vlog: focusing on intimacy, media synchronicity and authenticity
CN112818213B (en)Multimedia service data pushing method, device, equipment and storage medium
CN103902380B (en)A kind of method, apparatus and equipment determining resource allocation using sandbox

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp