Media data distribution method and apparatus, storage medium, and electronic device

CN116805974BActive Publication Date: 2026-10-30HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310999075.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2026-10-30
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明实施例提供了一种媒资数据分发方法,以解决基于现有的媒资数据分发方法,需频繁进行接口开发工作,工作量大,过程繁琐,效率低下的问题

Benefits of technology

[0046]基于上述本发明实施例提供的一种媒资数据分发方法,包括:当接收到渠道方发送的媒资请求时,判断渠道方是否符合预设的分发条件;若渠道方符合分发条件,则对媒资请求进行解析,获得该媒资请求对应的视频资源标识;在已创建的媒资数据列表中进行数据筛选,得到视频资源标识对应的媒资数据集合,其中包括至少一组媒资数据;媒资数据列表中包括已存储的所有媒资数据;确定渠道方对应的目标模板;目标模板为基于渠道方对应的接口规范标准预先配置的模板;将媒资数据集合中的各组媒资数据填充至目标模板中,将完成数据填充处理的目标模板作为接口响应内容;对接口响应内容进行文件导出处理,得到所述接口响应内容对应的接口响应文件;将接口响应文件发送给渠道方,完成媒资数据分发过程。应用本发明实施例提供的方法,在需要向渠道方分发媒资数据时,将待分发的媒资数据填充至基于渠道方的接口规范标准配置的模板,即可得到接口响应内容,进行文件导出后,将相应的文件发送给渠道方便可实现数据分发,完成关于媒资数据分发的接口响应。数据填充的模板是基于渠道方的接口规范标准配置的,故渠道方获得文件后可识别其中的媒资数据,继而可获取资源。当业务上新增渠道时,仅需基于新增的渠道的接口规范标准配置模板即可实现渠道接入。当渠道方的接口规范标准发生变动时,仅需对其对应的模板进行修改即可。在实现媒资数据分发的过程中,无需反复进行接口开发工作,工作量较小,实施过程较为简便,可提高实现渠道接入的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116805974B_ABST
    Figure CN116805974B_ABST
Patent Text Reader

Abstract

The application provides a media data distribution method and device, a storage medium and an electronic equipment. The method comprises the following steps: when a media request sent by a channel party is received, it is judged whether the channel party meets a distribution condition; if the condition is met, the media request is analyzed to obtain a video resource identifier; a media data set corresponding to the video resource identifier is determined; a target template is determined; the target template is a template configured based on an interface specification standard of the channel party; the media data set is filled into the target template, and the target template after the filling processing is taken as interface response content; the interface response content is exported as an interface response file and sent to the channel party. By applying the method of the application, the interface response content is obtained by filling data into the template, and then the media data distribution is realized. When a newly added cooperative channel party or an interface specification changes, the corresponding template can be configured, and repeated interface development work is not needed, so that the workload can be reduced and the efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for distributing media data, a storage medium, and an electronic device. Background Technology

[0002] In the operation of video websites, in order to obtain more promotional exposure and user views, video website platforms usually need to cooperate with external channels such as various search engines and video aggregation websites to promote their own video content and distribute it to the platforms of these channels for playback. Therefore, the platform needs to distribute media asset data such as video playback links, posters, and titles to the channels according to their needs.

[0003] Currently, media asset data distribution is typically achieved through interface development. This involves developing an interface program for resource distribution based on the interface specifications provided by the channel provider, launching the developed interface, and sending the required media asset data to the channel provider through this interface.

[0004] Video website platforms typically need to connect with numerous channel partners, each with its own interface specifications, which vary significantly. Based on existing media asset distribution methods, a separate interface needs to be developed for each channel. Adding a new channel or changes to a channel's interface specifications necessitates a complete redevelopment process, resulting in a large workload, cumbersome procedures, and low efficiency in channel integration. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a media asset data distribution method to solve the problems of frequent interface development work, large workload, cumbersome process and low efficiency based on existing media asset data distribution methods.

[0006] This invention also provides a media asset data distribution device to ensure the practical implementation and application of the above method.

[0007] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0008] A media asset data distribution method, comprising:

[0009] When a media asset request is received from a channel provider, it is determined whether the channel provider meets the preset distribution conditions.

[0010] If the channel provider meets the distribution conditions, the media asset request is parsed to obtain the video resource identifier corresponding to the media asset request;

[0011] Data is filtered in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier; the media asset data set includes at least one set of media asset data; the media asset data list includes all stored media asset data;

[0012] Determine the target template corresponding to the channel provider; the target template is a template pre-configured based on the interface specification standard corresponding to the channel provider;

[0013] Fill the target template with each group of media asset data in the media asset data set, and use the target template with the completed data filling process as the interface response content;

[0014] The interface response content is exported to obtain the interface response file corresponding to the interface response content.

[0015] The interface response file is sent to the channel provider to complete the media asset data distribution process.

[0016] Optionally, in the above method, determining whether the channel provider meets the preset distribution conditions includes:

[0017] Determine the channel identifier corresponding to the channel provider;

[0018] Determine whether a template matching the channel identifier exists in the preset template library; the template library contains multiple preset templates;

[0019] If a template matching the channel identifier exists in the template library, then the template matching the channel identifier in the template library is used as a candidate template.

[0020] Determine whether the candidate template is in an active state;

[0021] If the candidate template is active, then the channel provider is determined to meet the distribution conditions.

[0022] The above methods may also include:

[0023] If the candidate template is not in an active state, then the channel provider is determined to be ineligible for the distribution conditions.

[0024] Optionally, in the above method, determining the target template corresponding to the channel provider includes:

[0025] The candidate template is used as the target template.

[0026] Optionally, in the above method, the step of filtering data in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier includes:

[0027] Determine the resource identifier type corresponding to the video resource identifier;

[0028] If the resource identifier type indicates that the video resource identifier is an identifier for a single video, then the media asset data corresponding to the video resource identifier is obtained from the media asset data list, and the media asset data set is composed of the media asset data corresponding to the video resource identifier.

[0029] If the resource identifier type indicates that the video resource identifier is an identifier for a video collection, then the respective target video identifiers corresponding to the video resource identifier are determined;

[0030] From the media asset data list, obtain the media asset data corresponding to each target video identifier, and form the media asset data set by the media asset data corresponding to each target video identifier.

[0031] Optionally, in the above method, the step of exporting the interface response content to obtain the interface response file corresponding to the interface response content includes:

[0032] Determine the interface file type corresponding to the channel provider;

[0033] Based on the interface response content, a file corresponding to the interface file type is generated, and this file is used as the interface response file.

[0034] The above methods may also include:

[0035] If the channel provider does not meet the distribution conditions, the media asset request will be rejected.

[0036] A media asset data distribution device, comprising:

[0037] The judgment unit is used to determine whether the channel party meets the preset distribution conditions when a media asset request is received from the channel party.

[0038] The parsing unit is used to parse the media asset request if the channel meets the distribution conditions, and obtain the video resource identifier corresponding to the media asset request;

[0039] The filtering unit is used to filter data in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier; the media asset data set includes at least one set of media asset data; the media asset data list includes all stored media asset data;

[0040] A determining unit is used to determine the target template corresponding to the channel party; the target template is a template pre-configured based on the interface specification standard corresponding to the channel party;

[0041] A filling unit is used to fill each group of media asset data in the media asset data set into the target template, and use the target template with the completed data filling process as the interface response content.

[0042] The export unit is used to perform file export processing on the interface response content to obtain the interface response file corresponding to the interface response content.

[0043] The sending unit is used to send the interface response file to the channel party to complete the media asset data distribution process.

[0044] A storage medium comprising stored instructions, wherein, when the instructions are executed, the device in which the storage medium resides executes the media asset data distribution method as described above.

[0045] An electronic device includes a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described above in the media asset data distribution method.

[0046] A media asset data distribution method based on the above embodiments of the present invention includes: when a media asset request is received from a channel, determining whether the channel meets preset distribution conditions; if the channel meets the distribution conditions, parsing the media asset request to obtain the video resource identifier corresponding to the media asset request; filtering data in an existing media asset data list to obtain a media asset data set corresponding to the video resource identifier, including at least one set of media asset data; the media asset data list includes all stored media asset data; determining a target template corresponding to the channel; the target template is a template pre-configured based on the interface specification standard corresponding to the channel; filling each set of media asset data in the media asset data set into the target template, and using the target template with completed data filling as the interface response content; exporting the interface response content to obtain the interface response file corresponding to the interface response content; and sending the interface response file to the channel to complete the media asset data distribution process. By applying the method provided in this embodiment of the invention, when media asset data needs to be distributed to channel partners, the media asset data to be distributed is filled into a template configured based on the channel partner's interface specification standard. This yields the interface response content, which is then exported and sent to the channel partner to achieve data distribution and complete the interface response for media asset data distribution. Since the data filling template is based on the channel partner's interface specification standard configuration, the channel partner can identify the media asset data within the file and subsequently acquire the resources. When a new channel is added to the business, channel access can be achieved simply by configuring the template based on the new channel's interface specification standard. When the channel partner's interface specification standard changes, only the corresponding template needs to be modified. In the process of distributing media asset data, there is no need for repeated interface development work, the workload is small, the implementation process is simple, and the efficiency of channel access can be improved. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0048] Figure 1 A flowchart illustrating a media asset data distribution method provided in an embodiment of the present invention;

[0049] Figure 2 Another flowchart of a media asset data distribution method provided in an embodiment of the present invention;

[0050] Figure 3 An example diagram of a template configuration interface provided in an embodiment of the present invention;

[0051] Figure 4 An example diagram illustrating a media asset data distribution process provided in an embodiment of the present invention;

[0052] Figure 5 This is a schematic diagram of the structure of a media asset data distribution device provided in an embodiment of the present invention;

[0053] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0055] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0056] As the background technology indicates, the existing media asset data distribution process is implemented through interface programs. Specifically, after reaching a business agreement with a channel partner, the interface standard document from that channel is obtained. The development department then schedules the development and develops an interface specifically for that channel, which the channel partner then calls to retrieve media asset data. Different channels typically use different interface standards, so adding a new channel requires redeveloping the interface, and modifying the interface program is also necessary when the interface standard of an existing channel changes. The development and modification of interface programs require the development department to schedule development, complete development testing, and handle the workload, resulting in a large workload, a cumbersome process, and a long time consumption. This leads to low efficiency in channel integration and causes numerous inconveniences for media asset data distribution.

[0057] Therefore, this invention provides a media asset data distribution method that fills media asset data into a preset template to obtain interface response content, thereby realizing the distribution of media asset data. When a new channel is added or the channel interface standard changes, only the template needs to be configured, without the need for interface development work. The workload is small, the implementation is simple, and it helps to improve the efficiency of channel access.

[0058] This invention provides a media asset data distribution method, which can be applied to a video website media asset data distribution system. The executing entity can be the system's processor. The method flowchart is shown below. Figure 1 As shown, it includes:

[0059] S101: When a media asset request is received from a channel provider, determine whether the channel provider meets the preset distribution conditions;

[0060] In the method provided by this embodiment of the invention, distribution conditions are pre-set in the system, that is, the conditions that need to be met to distribute media asset data to a channel party in response to its request. The specific conditions can be set according to actual needs, such as the channel party's request must be compliant, the channel party must be a channel partner with whom there is a current cooperative relationship, and the system must currently have available templates corresponding to that channel party, etc.

[0061] When the system's processor receives a media asset request from a channel provider, it determines whether the channel provider meets the preset distribution conditions based on the relevant information.

[0062] S102: If the channel provider meets the distribution conditions, the media asset request is parsed to obtain the video resource identifier corresponding to the media asset request;

[0063] In the method provided by this embodiment of the invention, if it is determined that the current channel meets the preset distribution conditions, the request parameters of the media asset request are parsed to obtain the video resource identifier carried in the request. The video resource identifier is an identifier that represents the video resource, that is, the media asset data of the video resource requested by the current channel.

[0064] In specific application scenarios, a video resource identifier can be an identifier representing a single video or an identifier representing a collection of videos. A media asset request can carry only one or multiple video resource identifiers. If a media asset request carries multiple video resource identifiers, then subsequent steps S103 and S105 are performed for each video resource identifier to populate the target template with the media asset data sets corresponding to all video resource identifiers. It should be noted that the type of video resource represented by the video resource identifier in the media asset request, the number of video resource identifiers, etc., do not affect the functionality of the method provided in this embodiment of the invention.

[0065] S103: Filter the data in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier; the media asset data set includes at least one set of media asset data; the media asset data list includes all stored media asset data;

[0066] In the method provided by this invention, a media asset data list is pre-created in the system, which records all media asset data already stored in the system. The stored media asset data consists of media asset data from all available video resources in the video database of the video website. The media asset data list can be stored in a cache, and the media asset data in the list can be updated in real time based on the data in the video database through a message queue (MQ).

[0067] During the media asset data distribution process, data can be filtered in the media asset data list according to the video resource identifier corresponding to the media asset request. Media asset data matching the video resource identifier can be obtained from the media asset data recorded in the media asset data list, and the obtained media asset data can be combined into a media asset data set.

[0068] S104: Determine the target template corresponding to the channel provider; the target template is a template pre-configured based on the interface specification standard corresponding to the channel provider;

[0069] In the method provided by this invention, a template corresponding to each cooperative channel is pre-configured according to the interface specification standards of each cooperative channel. The content of the template defines field tags that conform to the corresponding interface specification standards. In the system, each cooperative channel can be represented by a channel identifier, and the template corresponding to each cooperative channel can be associated with the channel identifier of the corresponding cooperative channel.

[0070] During the distribution of media asset data, a template based on the interface specification standard configuration corresponding to the channel can be found according to the channel identifier of the current channel and used as the target template.

[0071] S105: Fill each group of media asset data in the media asset data set into the target template, and use the target template with the completed data filling process as the interface response content;

[0072] In the method provided by this invention, each group of media asset data in the media asset data set is filled into the corresponding position in the target template according to the correspondence between data attributes in the media asset data and field tags in the template. After the data filling operation is completed, the target template that has undergone data filling processing is used as the interface response content.

[0073] S106: Perform file export processing on the interface response content to obtain the interface response file corresponding to the interface response content;

[0074] In the method provided by this embodiment of the invention, the interface response content is used as file content, a file of a specified format is exported, and this file is used as the interface response file.

[0075] S107: Send the interface response file to the channel party to complete the media asset data distribution process.

[0076] In the method provided by this embodiment of the invention, the interface response file is sent to a designated address to deliver the interface response file to the channel party, thereby completing the media asset data distribution process corresponding to the current media asset request. After receiving the interface response file, the channel party can obtain the media asset data from it.

[0077] Based on the method provided in this embodiment of the invention, when a media asset request is received, it is determined whether the corresponding channel meets the preset distribution conditions. If the conditions are met, the media asset request is parsed to obtain the video resource identifier. Data is filtered in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier, which includes at least one set of media asset data. The media asset data list includes all stored media asset data. A target template corresponding to the channel is determined. The target template is a template pre-configured based on the interface specification standard corresponding to the channel. Each set of media asset data in the media asset data set is filled into the target template, and the target template with completed data filling processing is used as the interface response content. The interface response content is exported to obtain an interface response file. The interface response file is sent to the channel. By applying the method provided in this embodiment of the invention, when it is necessary to distribute media asset data to a channel, the media asset data to be distributed is filled into the template configured based on the interface specification standard of the channel to obtain the interface response content. After exporting the file, the corresponding file is sent to the channel to realize data distribution and complete the interface response for media asset data distribution. The data population template is configured based on the channel provider's interface specification standard. Therefore, after obtaining the file, the channel provider can identify the media asset data and then acquire the resources. When a new channel is added to the business, channel access can be achieved simply by configuring the template according to the new channel's interface specification standard. When the channel provider's interface specification standard changes, only the corresponding template needs to be modified. In the process of distributing media asset data, there is no need for repeated interface development work, the workload is small, the implementation process is relatively simple, and the efficiency of channel access can be improved.

[0078] exist Figure 1 Based on the method shown, refer to Figure 2 The flowchart shown illustrates the method provided in this embodiment of the invention. Step S101, which involves determining whether the channel provider meets preset distribution conditions, includes:

[0079] S201: Determine the channel identifier corresponding to the channel provider;

[0080] In the method provided by the embodiments of the present invention, the media asset request can be parsed to obtain the channel identifier carried therein, and the channel identifier can be used as the channel identifier corresponding to the current channel party.

[0081] S202: Determine whether there is a template in the preset template library that matches the channel identifier; the template library contains multiple preset templates;

[0082] The method provided in this embodiment of the invention includes a front-end interface for template configuration. Staff can pre-set templates for each cooperation channel through the front-end interface, and the preset templates can be stored in a template library. Simultaneously, staff can also configure information such as the template's activation status and associated channel identifiers through the front-end interface, and the configuration information for each template can also be stored accordingly.

[0083] In determining whether a current channel partner meets the distribution criteria, the channel partner's channel identifier is compared with the channel identifier associated with each template in the template library to identify whether a template in the library matches the channel partner's channel identifier. If the channel partner's channel identifier is the same as the channel identifier associated with a template in the template library, then a template matching the channel partner's channel identifier is considered to exist in the template library. If the channel partner's channel identifier is different from the channel identifier associated with each template, then a template matching the channel partner's channel identifier is considered not to exist in the template library.

[0084] S203: If there is a template in the template library that matches the channel identifier, then the template in the template library that matches the channel identifier is used as a candidate template;

[0085] In the method provided by this embodiment of the invention, if it is determined that there is a template in the template library that matches the channel identifier of the channel party, then the matching template is used as a candidate template.

[0086] If, after assessment, no template matching the channel identifier is found in the template library, then the channel is determined not to meet the preset distribution conditions.

[0087] S204: Determine whether the candidate template is in an active state;

[0088] In the method provided by this invention, staff can configure the effectiveness status of templates, that is, set whether the template is effective. They can also query the configuration information to see if a candidate template is currently effective.

[0089] S205: If the candidate template is in an active state, then it is determined that the channel party meets the distribution conditions.

[0090] In the method provided by this embodiment of the invention, if the candidate template is currently in an effective state, it is determined that the channel party meets the preset distribution conditions.

[0091] Based on the method provided in this embodiment of the invention, the existence of a preset template and whether the template is effective are used as the criteria for distribution. This allows for flexible control over the data acquisition permissions of channels. When the cooperation with a channel ends, the template is set to an invalid state, which stops the distribution of media asset data to the corresponding channel. The operation is convenient and quick.

[0092] Based on the methods provided in the above embodiments, the methods provided in the embodiments of the present invention further include:

[0093] If the candidate template is not in an active state, then the channel provider is determined to be ineligible for the distribution conditions.

[0094] In the method provided by this embodiment of the invention, if it is determined during the judgment process in step S204 that the candidate template is not in an effective state, then it is determined that the channel party does not meet the preset distribution conditions.

[0095] Based on the method provided in the above embodiments, the process of determining the target template corresponding to the channel provider mentioned in step S104 of the method provided in this embodiment includes:

[0096] The candidate template is used as the target template.

[0097] In the method provided in this embodiment of the invention, the template that matches the channel identifier of the channel party in the template library is used as the target template.

[0098] exist Figure 1 Based on the method shown, the method provided in this embodiment of the invention, specifically the process mentioned in step S103 of filtering data in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier, includes:

[0099] Determine the resource identifier type corresponding to the video resource identifier;

[0100] In the method provided by this invention, video resource identifiers can be type-identified to obtain the resource identifier type corresponding to the video resource identifier. The resource identifier type can also be understood as an identifier attribute, that is, it represents which type of video resource the identifier belongs to. For example, a video resource identifier can be a video ID or a video collection ID. Correspondingly, the resource identifier type represents whether the video resource identifier is an identifier for a single video or an identifier for a video collection.

[0101] If the resource identifier type indicates that the video resource identifier is an identifier for a single video, then the media asset data corresponding to the video resource identifier is obtained from the media asset data list, and the media asset data set is composed of the media asset data corresponding to the video resource identifier.

[0102] In the method provided by the embodiments of the present invention, if the video resource identifier is the identifier of a single video, the video identifier corresponding to each media asset data in the media asset data list is compared with the video resource identifier, and the media asset data corresponding to the video identifier that is the same as the video resource identifier is taken as the media asset data corresponding to the video resource identifier, and the media asset data is obtained and formed into a media asset data set.

[0103] If the resource identifier type indicates that the video resource identifier is an identifier for a video collection, then the respective target video identifiers corresponding to the video resource identifier are determined;

[0104] In the method provided by this embodiment of the invention, if the video resource identifier is an identifier for a video collection, that is, the video resource identifier represents a video collection, then the target video identifiers corresponding to the video resource identifier are determined, and each target video identifier is the video identifier of each video in the video collection represented by the video resource identifier. For example, if the video resource identifier is program A, season 1, then the video identifier of each episode of program A, season 1, is the target video identifier.

[0105] From the media asset data list, obtain the media asset data corresponding to each target video identifier, and form the media asset data set by the media asset data corresponding to each target video identifier.

[0106] In the method provided by the embodiments of the present invention, media asset data corresponding to each target video identifier is obtained from the media asset data list based on the matching of video identifiers, and the obtained media asset data sets are composed of each media asset data set.

[0107] Based on the method provided in the embodiments of the present invention, media asset data distribution of a single video or media asset data distribution of a video collection can be realized, which is beneficial to meeting diverse data distribution needs.

[0108] exist Figure 1 Based on the method shown, the method provided in this embodiment of the invention, in step S106, involves exporting the interface response content to obtain the interface response file corresponding to the interface response content, and includes:

[0109] Determine the interface file type corresponding to the channel provider;

[0110] In the method provided by this invention, staff can pre-configure the interface file type corresponding to each cooperation channel. The interface file type corresponding to each cooperation channel can also be set based on the interface specification standard of that cooperation channel. The interface file type corresponding to each cooperation channel is associated with the template corresponding to that cooperation channel and stored together.

[0111] During the media asset data distribution process, the interface file type associated with the target template can be queried in the configuration information. This interface file type corresponds to the interface file type of the channel provider. Specifically, the interface file type corresponding to the channel provider refers to the file format specified by the channel provider for receiving interface response data, such as XML files, JSON files, etc.

[0112] Based on the interface response content, a file corresponding to the interface file type is generated, and this file is used as the interface response file.

[0113] In the method provided by this embodiment of the invention, the interface response content is generated into a file corresponding to the interface file type, thus obtaining the interface response file. For example, if the interface file type is an XML file, then an XML format file with the same content as the interface response content is exported.

[0114] exist Figure 1 Based on the method shown, the method provided in this embodiment of the invention further includes:

[0115] If the channel provider does not meet the distribution conditions, the media asset request will be rejected.

[0116] In the method provided by the embodiments of the present invention, if it is determined in step S101 that the current channel does not meet the preset distribution conditions, the current media asset request is rejected, that is, there is no need to respond to it and the media asset data distribution process is not executed.

[0117] To better illustrate the method provided in the embodiments of the present invention, based on the method provided in the above embodiments and combined with actual application scenarios, the embodiments of the present invention provide yet another media asset data distribution method. The method provided in the embodiments of the present invention is applied to a media asset data distribution system of a video website. The backend of this system is developed using the Spring Boot framework and FreeMarker, and the frontend is developed using Layui.

[0118] In the method provided by this invention, the system can implement channel management. Specifically, through a front-end interface, staff can configure the templates and related information for each cooperative channel. When a new cooperative channel is added—that is, a new channel provider that needs to distribute media asset data—staff simply add the channel provider's channel information in the system. Specifically, staff can use the channel management function to input information such as the channel provider name, channel provider code (equivalent to the channel identifier in the previous embodiment), channel validity, and channel provider type to add data distribution channels or modify channel provider information. The channel provider code can be provided to the channel provider for interface calls. When cooperation with a channel provider ends, the "validity" attribute value in its corresponding channel information can be directly modified to "no" to disable the channel and prevent the corresponding channel provider from continuing to pull media asset data.

[0119] In the method provided by this invention, the system can implement channel template management. Specifically, for channels already created in the system, staff can configure and manage information such as template content for each channel through a front-end interface. This includes attribute parameters such as template validity and file type. The template configuration interface is as follows: Figure 3 As shown, the attributes include channel provider, validity status, template type, version number, full file name, incremental file name, generated data type, file type, template content, and sub-template content. In the method provided by this embodiment of the invention, the file type can be selected from file formats such as xml or json. Figure 3 The interface shown is for modifying the template information for the channel provider named "XX Channel". This channel provider's template is active, its template type is the default template, version number is 9, and the generated data types include full and incremental. The generated full file is named "all", and the generated incremental file is named "add". The corresponding interface file for this channel provider is a JSON file. Furthermore, the interface also includes template content and sub-template content. It should be noted that... Figure 3 The interface and data shown are merely specific embodiments provided to better illustrate the method of this invention. In actual implementation, the interface and information configuration can be designed and performed according to actual needs, and are not limited to... Figure 3 The structure and content are shown.

[0120] The template content for channel partners is set based on fields and data structures that match their API interfaces. Specifically, it involves setting declarative tags according to the channel partner's API standards and specifications, as well as setting field tags for media asset data. This associates media asset data attributes with corresponding field tags, indicating that a specific attribute value in the media asset data should be the tag data of a certain field tag. For example, if channel partner A's file type is JSON, the template content set based on channel partner A's API standards could be as follows:

[0121] {"code":"${status!1}",

[0122] "msg":"",

[0123] "dataTime":"${date!0}",

[0124] "data":[

[0125] <#list videos as video>{

[0126] "title":"${video.partName?json_string}",

[0127] "createtime":"${video.createTime?string("yyyy-MM-dd HH:mm:ss")}",

[0128] "cover":"${video.imgurl2!video.imgurl3!}",

[0129] "video_format":"${video.fileEx!}",

[0130] "tag":"${(video.keyWord!)?json_string}",

[0131] "id":"${video.partId}",

[0132] "description":"${(video.story!)?json_string}",

[0133] "duration":${video.duration},

[0134] "linkurl":"${video.linkUrl!}",

[0135] "category":"${video.fstlvlName!}"

[0136] }<#if video_has_next>,< / #if>< / #list> ]}.

[0137] For example, if the file type corresponding to channel partner B is XML, the template content set based on the interface specification standard of channel partner B can be as follows:

[0138] <? xml version="1.0" encoding="utf-8"? >

[0139] <document>

[0140] <code> ${status! 1}< / code>

[0141] <pageno> ${pageNo}< / pageno>

[0142] <pagesize> ${pageSize}< / pagesize>

[0143] <total> ${total}< / total>

[0144] <rows>

[0145] <#list videos as video>

[0146] <video>

[0147] <#if(video.op)??> <op> ${video.op}< / op> < / #if>

[0148] <weburl> https: / / m.mgtv.com / # / b / ${video.clipId} / ${video.partId}?cxid=99y8v3k335w< / weburl>

[0149] <appurl> <! [CDATA[imgotv: / / player? clipId=${video.clipId}&plId=0&videoI d=${video.partId}&from=migs]]>< / appurl>

[0150] <id> ${video.partId}< / id>

[0151] <order> ${video.serialno}< / order>

[0152] <title> ${video.partName!}< / title>

[0153] <play_length>${video.duration}< / play_length>

[0154] <publish_time>${video.releaseTime?string("yyyy-MM-ddHH:mm:ss")}< / publish_time>

[0155] < / video>

[0156] < / #list>

[0157] < / rows>

[0158] <msg>< / msg>

[0159] <servertime> ${date!}< / servertime>

[0160] < / document> .

[0161] The template content and corresponding configuration information for each channel can be stored in the system database.

[0162] In the method provided by this invention, the system is configured with a scheduled task that can periodically load video media asset data from the media asset database into the Redis cache. The MQ is used to implement the addition, deletion and modification of media asset data in Redis, so that the content in Redis is consistent with the content in the media asset database.

[0163] When a channel provider needs to retrieve media asset data, it can generate a media asset request according to agreed-upon parameters, such as the required video resource identifier and channel identifier, and send this request to the media asset data distribution system via an API. When the system receives the media asset request from the channel provider, it parses the request to obtain the channel identifier (channel identifier, i.e., the channel code). It then queries the system database to check if the channel corresponding to this identifier is valid; in other words, it checks if the template corresponding to this identifier is valid. If valid, it retrieves the template corresponding to that channel identifier. Parsing the media asset request yields the video resource identifier. Based on the video resource identifier, it retrieves the corresponding media asset data from Redis and then renders the corresponding template using this data. Specifically, through the template engine configuration, the corresponding attribute values ​​from the media asset data are filled into the corresponding positions in the template to achieve template rendering. When there is a large amount of data, pagination parameters can be supported to retrieve data in batches. After completing the template rendering process, the file is exported according to the file type corresponding to the channel identifier to obtain the API response file, which is then sent to the channel provider.

[0164] For example, taking the template content corresponding to channel provider A provided earlier as an example, the main content of the rendered template can be as follows:

[0165]

[0166] By exporting a JSON file based on the above template content, you can output the interface response to the channel.

[0167] Taking the template content corresponding to Channel Partner B provided above as an example, the main content of the rendered template can be seen as follows:

[0168] <document>

[0169] <code>0< / code>

[0170] <pageno> 1< / pageno>

[0171] <pagesize> 100< / pagesize>

[0172] <total> 28< / total>

[0173] <rows>

[0174] <video>

[0175] <weburl> https: / / m.mgtv.com / # / ……< / weburl>

[0176] <appurl>

[0177] <![CDATA[imgotv: / / player?clipId……09&from=migs]]>

[0178] < / appurl>

[0179] <id> 18740609< / id>

[0180] <order> 1< / order>

[0181] <title> Video Title 3< / title>

[0182] <play_length>6954< / play_length>

[0183] <publish_time>2023-04-27 00:00:00< / publish_time>

[0184] < / video> .......

[0186] <video>

[0187] <weburl> https: / / m.mgtv.com / # / ……< / weburl>

[0188] <appurl>

[0189] <![CDATA[imgotv: / / player?clipId……8&from=migs]]>

[0190] < / appurl>

[0191] <id> 19100438< / id>

[0192] <order> 28< / order>

[0193] <title> Video Title 4< / title>

[0194] <play_length>3071< / play_length>

[0195] <publish_time>2023-06-09 00:00:00< / publish_time>

[0196] < / video>

[0197] < / rows>

[0198] <msg / >

[0199] <servertime> 20230613121114< / servertime>

[0200] < / document> .

[0201] Based on the above template content, an XML file can be exported to output the interface response to the channel.

[0202] Because the template content is configured according to the channel's format requirements, the channel can directly integrate it.

[0203] To better illustrate the method provided in the embodiments of the present invention, the following will be combined with... Figure 4 The flowchart shown briefly illustrates the overall process of distributing media asset data for a channel. This embodiment of the invention provides an implementation process for media asset data distribution, which mainly includes:

[0204] Add new channels: When adding a new channel partner, configure the channel information corresponding to that channel partner, including whether the channel is active, so as to add the new channel in the system;

[0205] Configuration template: Configure the template corresponding to the channel based on the interface standard specifications of the channel provider;

[0206] Set the format to json / xml: Set the interface file type for the channel provider, which can be either json or xml file;

[0207] Access Interface: When a channel needs to retrieve media asset data, it initiates a request through the interface.

[0208] Determine if a channel is valid: When a request is received from a channel provider, query the database to check if the corresponding channel is valid. If the channel is invalid, return a response indicating data retrieval failure.

[0209] Query Template: If the channel is valid, query the template corresponding to that channel.

[0210] Data loading: Based on the video resource identifier carried in the request, obtain the corresponding media asset data, load the media asset data into the template corresponding to the channel, and export the template after loading the media asset data.

[0211] Interface return: The exported files are returned to the channel partners through the interface to realize the distribution of media asset data.

[0212] It should be noted that, Figure 4The illustrated process is merely a simplified diagram to better illustrate the method provided by this invention and is not intended to limit the actual business process. That is, the configuration of channel information and the channel provider's interface access operations are not performed in a fixed sequence. Staff can configure the relevant information for a newly added channel only once, while the channel provider can repeatedly access the interface as needed.

[0213] Based on the method provided in this invention, when adding new cooperative channels, after obtaining the channel's interface standard specifications, corresponding configurations can be performed in the backend, such as adding channel information and configuring templates. After configuration, the interface can be output immediately, allowing the relevant channel to obtain media asset data based on relevant parameters. For different channel requests, the interface can respond according to the data format and fields required by the channel. This enables rapid and seamless integration with channels such as search engines and video aggregation websites. This process significantly saves communication and development time, reduces labor costs, achieves rapid integration, and improves interface integration efficiency. Furthermore, when channel cooperation expires, the channel can be made unavailable, and the interface immediately becomes invalid; the entire process can be completed without upgrading the interface service.

[0214] and Figure 1 Corresponding to the media asset data distribution method shown, this embodiment of the invention also provides a media asset data distribution device for distributing media asset data. Figure 1 The specific implementation of the method shown is illustrated in the following diagram. Figure 5 As shown, it includes:

[0215] The judgment unit 301 is used to determine whether the channel party meets the preset distribution conditions when it receives a media asset request sent by the channel party.

[0216] The parsing unit 302 is used to parse the media asset request and obtain the video resource identifier corresponding to the media asset request if the channel party meets the distribution conditions.

[0217] The filtering unit 303 is used to filter data in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier; the media asset data set includes at least one set of media asset data; the media asset data list includes all stored media asset data;

[0218] The determining unit 304 is used to determine the target template corresponding to the channel party; the target template is a template pre-configured based on the interface specification standard corresponding to the channel party;

[0219] The filling unit 305 is used to fill each group of media asset data in the media asset data set into the target template, and use the target template with the completed data filling process as the interface response content.

[0220] The export unit 306 is used to perform file export processing on the interface response content to obtain the interface response file corresponding to the interface response content.

[0221] Sending unit 307 is used to send the interface response file to the channel party to complete the media asset data distribution process.

[0222] Using the apparatus provided in this embodiment of the invention, when media asset data needs to be distributed to a channel, the media asset data to be distributed is filled into a template configured based on the channel's interface specification standard. This yields the interface response content, which is then exported and sent to the channel to achieve data distribution and complete the interface response for media asset data distribution. Since the data filling template is based on the channel's interface specification standard configuration, the channel can identify the media asset data within the file and subsequently acquire the resources. When a new channel is added to the business, channel access can be achieved simply by configuring the template based on the new channel's interface specification standard. When the channel's interface specification standard changes, only the corresponding template needs to be modified. In the process of distributing media asset data, there is no need for repeated interface development work, the workload is small, the implementation process is simple, and the efficiency of channel access can be improved.

[0223] exist Figure 5 Based on the device shown, the device provided in this embodiment of the invention can be further extended to include multiple units. The functions of each unit can be found in the descriptions of the various embodiments of the media asset data distribution method provided above, and will not be further illustrated here.

[0224] This invention also provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to perform the media asset data distribution method as described above.

[0225] This invention also provides an electronic device, the structural schematic of which is shown below. Figure 6 As shown, it specifically includes a memory 401 and one or more instructions 402, wherein one or more instructions 402 are stored in the memory 401 and configured to be executed by one or more processors 403 to perform the following operations:

[0226] When a media asset request is received from a channel provider, it is determined whether the channel provider meets the preset distribution conditions.

[0227] If the channel provider meets the distribution conditions, the media asset request is parsed to obtain the video resource identifier corresponding to the media asset request;

[0228] Data is filtered in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier; the media asset data set includes at least one set of media asset data; the media asset data list includes all stored media asset data;

[0229] Determine the target template corresponding to the channel provider; the target template is a template pre-configured based on the interface specification standard corresponding to the channel provider;

[0230] Fill the target template with each group of media asset data in the media asset data set, and use the target template with the completed data filling process as the interface response content;

[0231] The interface response content is exported to obtain the interface response file corresponding to the interface response content.

[0232] The interface response file is sent to the channel provider to complete the media asset data distribution process.

[0233] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0234] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0235] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for distributing media asset data, characterized in that, include: When a media asset request is received from a channel provider, it is determined whether the channel provider meets the preset distribution conditions. If the channel provider meets the distribution conditions, the media asset request is parsed to obtain the video resource identifier corresponding to the media asset request; Data is filtered in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier; the media asset data set includes at least one set of media asset data; the media asset data list includes all stored media asset data; Determine the target template corresponding to the channel provider; The target template is a pre-configured template based on the interface specification standard corresponding to the channel provider; the content of the target template defines field tags that conform to the interface specification standard corresponding to the channel provider; According to the correspondence between the data attributes in the media asset data and the field tags in the target template, each group of media asset data in the media asset data set is filled into the corresponding position in the target template, and the target template with completed data filling is used as the interface response content. The interface response content is exported to obtain the interface response file corresponding to the interface response content. The interface response file is sent to the channel provider to complete the media asset data distribution process.

2. The method according to claim 1, characterized in that, The determination of whether the channel provider meets the preset distribution conditions includes: Determine the channel identifier corresponding to the channel provider; Determine whether a template matching the channel identifier exists in the preset template library; the template library contains multiple preset templates; If a template matching the channel identifier exists in the template library, then the template matching the channel identifier in the template library is used as a candidate template. Determine whether the candidate template is in an active state; If the candidate template is active, then the channel provider is determined to meet the distribution conditions.

3. The method according to claim 2, characterized in that, Also includes: If the candidate template is not in an active state, then the channel provider is determined to be ineligible for the distribution conditions.

4. The method according to claim 2, characterized in that, The step of determining the target template corresponding to the channel provider includes: The candidate template is used as the target template.

5. The method according to claim 1, characterized in that, The step of filtering data in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier includes: Determine the resource identifier type corresponding to the video resource identifier; If the resource identifier type indicates that the video resource identifier is an identifier for a single video, then the media asset data corresponding to the video resource identifier is obtained from the media asset data list, and the media asset data set is composed of the media asset data corresponding to the video resource identifier. If the resource identifier type indicates that the video resource identifier is an identifier for a video collection, then the respective target video identifiers corresponding to the video resource identifier are determined; From the media asset data list, obtain the media asset data corresponding to each target video identifier, and form the media asset data set by the media asset data corresponding to each target video identifier.

6. The method according to claim 1, characterized in that, The step of exporting the interface response content to obtain the interface response file corresponding to the interface response content includes: Determine the interface file type corresponding to the channel provider; Based on the interface response content, a file corresponding to the interface file type is generated, and this file is used as the interface response file.

7. The method according to claim 1, characterized in that, Also includes: If the channel provider does not meet the distribution conditions, the media asset request will be rejected.

8. A media asset data distribution device, characterized in that, include: The judgment unit is used to determine whether the channel party meets the preset distribution conditions when a media asset request is received from the channel party. The parsing unit is used to parse the media asset request if the channel meets the distribution conditions, and obtain the video resource identifier corresponding to the media asset request; The filtering unit is used to filter data in the created media asset data list to obtain the media asset data set corresponding to the video resource identifier; the media asset data set includes at least one set of media asset data; the media asset data list includes all stored media asset data; A determining unit is used to determine the target template corresponding to the channel party; The target template is a pre-configured template based on the interface specification standard corresponding to the channel provider; the content of the target template defines field tags that conform to the interface specification standard corresponding to the channel provider; The filling unit is used to fill each group of media asset data in the media asset data set into the corresponding position in the target template according to the correspondence between the data attributes in the media asset data and the field tags in the target template, and use the target template with completed data filling processing as the interface response content. The export unit is used to perform file export processing on the interface response content to obtain the interface response file corresponding to the interface response content. The sending unit is used to send the interface response file to the channel party to complete the media asset data distribution process.

9. A storage medium, characterized in that, The storage medium includes stored instructions, wherein, when the instructions are executed, the device containing the storage medium is controlled to perform the media asset data distribution method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, It includes a memory and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video resource distribution method and device

    CN105872635A

  • Media asset resource processing method and system, storage medium and electronic equipment

    CN114979786A