Multimedia resource processing method, device, electronic device and storage medium
By using multiple parsing scripts to analyze the meta description information of the audio and video copyright owner, the problem of complex and inconsistent analysis process in the existing technology is solved, and the simplified analysis and flexible adaptation of multimedia resources are achieved, and the analysis efficiency and unity of analysis are improved. sex.
Patent Information
- Application Number
- CN202111287385.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-11-02
AI Technical Summary
Existing audio and video playback platforms need to develop specific meta description file parsing programs for each audio and video copyright holder, resulting in complex and inconsistent parsing process.
By using multiple parsing scripts to parse the target meta description information, multiple resource attributes are obtained. Each parsing script is used to parse different resource attributes, and the parsing script can be dynamically obtained and configured to adapt to the description method of different meta description information.
The meta-descriptive file parsing process of multimedia resources is simplified, the unity and flexibility of analysis is improved, and the development of special parsing programs is avoided for each audio and video copyright holder, saving development resources.
Smart Images

Figure CN114116044B_ABST
Abstract
Description
Background Art
[0002] At present, the audio and video files in the audio and video playback platform can come from different audio and video copyright holders, and the audio and video copyright holders can authorize the audio and video playback platform to play their audio and video files. The following takes the audio and video playback platform as a music playback platform as an example for introduction.
[0003] The music playback platform can receive music files and song meta description files transmitted by multiple music copyright holders. The song meta description file contains song meta description information, which is used to describe relevant information of the song, such as song name, singer name, song album information, etc. The music playback platform needs to parse the song meta description file transmitted by each music copyright holder to obtain various song information.
[0004] Since the description methods of various song information in the song meta description files transmitted by different music copyright holders may be different, the music playback platform needs to develop a specific meta description file parsing program for each music copyright holder to parse the corresponding song meta description file.
[0005] In this way, after obtaining the song meta description files transmitted by multiple music copyright holders, the music playback platform needs to parse the multiple song meta description files respectively through their own specific meta description file parsing programs, which makes the parsing process more complicated. Summary of the invention
[0006] The embodiments of the present disclosure provide a multimedia resource processing method, device, electronic device and storage medium, which are used to simplify the parsing process of a meta description file of multimedia resources.
[0007] In a first aspect, an embodiment of the present disclosure provides a multimedia resource processing method, including:
[0008] Obtain target meta description information of target multimedia resources;
[0009] By using a plurality of parsing scripts in a parsing tool, the target meta description information is parsed respectively to obtain at least one resource attribute of the target multimedia resource;
[0010] Each parsing script is used to parse a resource attribute in the target meta description information, and different parsing scripts are used to parse different resource attributes.
[0011] In a possible implementation manner, before the target meta description information is parsed respectively by using a plurality of parsing scripts in a parsing tool, the method further includes:
[0012] Obtaining the multiple parsing scripts;
[0013] The multiple parsing scripts are written into corresponding parsing methods in the parsing tool respectively.
[0014] In a possible implementation, the step of respectively parsing the target meta description information through a plurality of parsing scripts in a parsing tool to obtain at least one resource attribute of the target multimedia resource includes:
[0015] By using the multiple parsing methods in the parsing tool, the respective parsing scripts are respectively executed to parse the target meta description information respectively, and the parsing results of each parsing method are obtained;
[0016] At least one resource attribute of the target multimedia resource is determined according to the obtained multiple parsing results.
[0017] In a possible implementation, each parsing script is used to parse the same resource attribute in the meta description information of the multimedia resources of the multiple multimedia platforms;
[0018] The step of obtaining target meta description information of a target multimedia resource includes:
[0019] Target meta description information of a target multimedia resource sent by a target multimedia platform among the multiple multimedia platforms is obtained.
[0020] In a possible implementation, the multiple parsing scripts are obtained in the following manner:
[0021] According to the description mode of at least one resource attribute in the meta description information of the multimedia resource corresponding to each of the multiple multimedia platforms, parsing scripts corresponding to the multiple resource attributes of the multimedia resource are configured, and the configured multiple parsing scripts are saved.
[0022] In a possible implementation manner, after respectively parsing the target meta description information through a plurality of parsing scripts in a parsing tool to obtain at least one resource attribute of the target multimedia resource, the method further includes:
[0023] At least one resource attribute of the obtained target multimedia resource is combined to obtain combined resource attribute information.
[0024] In a possible implementation, the method further includes:
[0025] The data format of the combined resource attribute information is converted into a preset data format.
[0026] In a possible implementation manner, the multimedia resource is a music file, and the at least one resource attribute of the music file includes at least one of the following:
[0027] Album name, album code, album language, song file address, song language, song name, song's International Standard Audiovisual Product Code (ISRC), music video MV name, singer's name, resource release time, resource online availability time, and resource authorized region.
[0028] In a possible implementation, the parsing script adopts the Groovy scripting language, the parsing tool is a target java file class, and the parsing method corresponding to each parsing script is a corresponding parsing method in the target java file class.
[0029] In a second aspect, the present disclosure also provides a multimedia resource processing device, including:
[0030] A resource acquisition module, used to acquire target meta description information of target multimedia resources;
[0031] A parsing module, used to parse the target meta description information respectively through a plurality of parsing scripts in a parsing tool to obtain at least one resource attribute of the target multimedia resource;
[0032] Each parsing script is used to parse a resource attribute in the target meta description information, and different parsing scripts are used to parse different resource attributes.
[0033] In a possible implementation, a script acquisition module is further included, which is used to:
[0034] Obtaining the multiple parsing scripts;
[0035] The multiple parsing scripts are written into corresponding parsing methods in the parsing tool respectively.
[0036] In a possible implementation, the parsing module is further used for:
[0037] By using the multiple parsing methods in the parsing tool, the respective parsing scripts are respectively executed to parse the target meta description information respectively, and the parsing results of each parsing method are obtained;
[0038] At least one resource attribute of the target multimedia resource is determined according to the obtained multiple parsing results.
[0039] In a possible implementation, each parsing script is used to parse the same resource attribute in the meta description information of the multimedia resources of the multiple multimedia platforms;
[0040] The resource acquisition module is also used for:
[0041] Target meta description information of a target multimedia resource sent by a target multimedia platform among the multiple multimedia platforms is obtained.
[0042] In a possible implementation, the multiple parsing scripts are obtained in the following manner:
[0043] According to the description mode of at least one resource attribute in the meta description information of the multimedia resource corresponding to each of the multiple multimedia platforms, parsing scripts corresponding to the multiple resource attributes of the multimedia resource are configured, and the configured multiple parsing scripts are saved.
[0044] In a possible implementation, a combination module is further included, for:
[0045] At least one resource attribute of the obtained target multimedia resource is combined to obtain combined resource attribute information.
[0046] In a possible implementation, a conversion module is further included, which is used to:
[0047] The data format of the combined resource attribute information is converted into a preset data format.
[0048] In a possible implementation manner, the multimedia resource is a music file, and the at least one resource attribute of the music file includes at least one of the following:
[0049] Album name, album code, album language, song file address, song language, song name, song's International Standard Audiovisual Product Code (ISRC), music video MV name, singer's name, resource release time, resource online availability time, and resource authorized region.
[0050] In a possible implementation, the parsing script adopts the Groovy scripting language, the parsing tool is a target java file class, and the parsing method corresponding to each parsing script is a corresponding parsing method in the target java file class.
[0051] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the processor implements the steps of any one of the multimedia resource processing methods of the first aspect.
[0052] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any multimedia resource processing method of the first aspect are implemented.
[0053] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; when a processor of an electronic device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the electronic device performs the steps of any one of the above-mentioned multimedia resource processing methods.
[0054] The multimedia resource processing method provided by the embodiment of the present disclosure has at least the following beneficial effects:
[0055] According to the solution provided by the embodiment of the present disclosure, after the target meta description information of the target multimedia resource is obtained, the target meta description information is parsed separately by multiple parsing scripts in the parsing tool. Since each parsing script can parse a resource attribute in the target meta description information, and different parsing scripts parse different resource attributes, multiple resource attributes of the target multimedia resource can be obtained.
[0056] In this way, the meta description information of each multimedia resource can be parsed through multiple parsing scripts in the above-mentioned parsing tool to obtain corresponding multiple resource attributes. Each multimedia resource can come from the same multimedia platform or from multiple multimedia platforms. There is no need to parse them separately through different meta description information parsing programs, which simplifies the parsing process of the meta description information of multimedia resources.
[0057] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0059] Figure 1 A schematic diagram of an application scenario of a multimedia resource processing method provided by an embodiment of the present disclosure;
[0060] Figure 2 A flowchart of a multimedia resource processing method provided by an embodiment of the present disclosure;
[0061] Figure 3 A flowchart of another multimedia resource processing method provided by an embodiment of the present disclosure;
[0062] Figure 4 A flowchart of another multimedia resource processing method provided by an embodiment of the present disclosure;
[0063] Figure 5 A timing flow chart of a multimedia resource processing method provided by an embodiment of the present disclosure;
[0064] Figure 6 A data conversion schematic diagram provided for an embodiment of the present disclosure;
[0065] Figure 7 A schematic diagram of a multimedia resource processing device provided by an embodiment of the present disclosure;
[0066] Figure 8 A schematic diagram of another multimedia resource processing device provided by an embodiment of the present disclosure;
[0067] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0069] Some terms involved in the embodiments of the present disclosure are explained below.
[0070] Multimedia resources: refers to digitally transmitted resources, including but not limited to one or more of audio, video, pictures, text, and animation. For example, multimedia resources are music files, which may include audio, video, pictures, etc.
[0071] ISRC: International Standard Recording Code, defined by ISO3901, is an internationally accepted code for publications of audio and video recordings.
[0072] Meta description information: information used to describe multimedia resources, which may include multiple resource attributes of multimedia resources, and may be described in a preset language, such as XML (Extensible Markup Language). Assuming that the multimedia resource is a music file, its resource attributes include but are not limited to: song name, singer name, song language, ISRC, etc.
[0073] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein.
[0074] In addition, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.
[0075] The design concept of the embodiment of the present disclosure is introduced below.
[0076] As mentioned above, the music playback platform can receive music files and song meta description files transmitted by multiple music copyright holders. In the song meta description files transmitted by different music copyright holders, the description methods of various song information may be different. The following takes the singer name, song file address, song ISRC and other song information in the song meta description file as an example to exemplify the different description methods in the song meta description files transmitted by different music copyright holders.
[0077] 1. The description method of the singer's name. The song meta description file transmitted by the music copyright holder contains a tag pointing to the singer's name, which is used to describe the singer's name information related to the song. For example, in the song meta description file of music copyright holder A, its tag "Resource List-》Song-》Display Singer-》Singer Tag Link" contains a link to obtain the singer's name; while in the song meta description file of music copyright holder B, the singer's name is directly specified in the tag "Resource List-》Song-》Song Details-》Display Singer-》Singer Name".
[0078] 2. The description method of the song file address. For example, music copyright holder A specifies the relative address of the song file in the label "Resource List-》Song-》Resource Details-》File-》File Relative Address", and directly obtains the song file from the relative path of the local resource after reading the value of the file relative address; while music copyright holder C specifies the HTTP link of the song file in the label "Resource List-》Song-》Song Details-》Resource Details-》File-》File HTTP Address". When parsing the song file of music copyright holder C, it is necessary to first obtain the file HTTP address of the song file according to the label, and then use the HTTP protocol to download the song file from the Internet. Compared with the song file of music copyright holder A, there is an additional step of downloading the song file.
[0079] 3. Description of song ISRC. For example, in the song meta description file of music copyright holder A, the song ISRC is specified in the tag "Resource List-》Song-》Resource Content-》ISRC"; while in the song meta description files of music copyright holders B and C, the song ISRC is specified in the tag "Resource List-》Song-》Recording Name-》ISRC".
[0080] In addition, with the continuous development of the music playback platform's business, more dimensional song information support is needed. For each music copyright holder, the music playback platform needs to appropriately adjust the meta description file parsing program to make the parsed song information more in line with business needs.
[0081] The following uses a song meta description file transmitted by a music copyright holder as an example to illustrate some song information that requires adjustment of the parsing method.
[0082] 1. How to parse the language of a song. Generally, the language of a song can be parsed in the "Resource List-》Song-》Language Information" tag, but pure music has no language. However, the language and country can still be determined based on the first two digits of ISRC, because the first two digits of the song ISRC are the country code, such as CN for China, TH for Thailand, and JP for Japan. It can be seen that in order to parse the language of a song, it is not only necessary to obtain it based on the language tag, but also to judge it based on the characteristics of ISRC when there is no language tag.
[0083] 2. The parsing method for the album language. An album is an entity consisting of one or more songs. The languages of multiple songs in an album may not be the same. For example, the parsing method for the album language can be determined by the language that accounts for the largest proportion of the songs in the album.
[0084] 3. The parsing method of related names. Album names, song names and singer names all involve language issues, so the parsing methods of these song information are somewhat related.
[0085] Combining the above two aspects, it can be seen that based on the differences in song meta description files transmitted by different music copyright holders and the particularity of the parsing methods of some song information, the music playback platform needs to develop a specific meta description file parsing program for each music copyright holder to parse the corresponding song meta description file.
[0086] Thus, after obtaining song meta description files transmitted by multiple music copyright holders, the music playback platform needs to parse the multiple song meta description files respectively through their own specific meta description file parsing programs (such as JAVA file classes), making the parsing process more complicated.
[0087] The following is an exemplary introduction to the meta description file parsing procedures of multiple music copyright holders.
[0088] Exemplarily, for each music copyright holder, a special parsing tool is developed to parse the song meta description file. The specific form of the parsing tool can be a JAVA file class, which contains multiple parsing methods, and the parsing of each resource attribute can correspond to a parsing method. For example, for the song meta description file transmitted by music copyright holder A, write the UXmlParserUtil.java file class, which contains parsing methods such as parseAlbumName, parseSongISRC, and parseSongFile. For the song meta description file transmitted by music copyright holder B and the song meta description file transmitted by copyright holder C, write the WXmlParserUtil.java file class and the SXmlParserUtil.java file class respectively. For the various JAVA file classes written, they need to be compiled, debugged, and deployed online before they can be used to parse the song meta description file.
[0089] In view of this, the embodiments of the present disclosure provide a multimedia resource processing method, device, electronic device and storage medium. The meta description information of each multimedia resource can be parsed through multiple parsing scripts in a specified parsing tool to obtain corresponding multiple resource attributes. Each multimedia resource can come from the same multimedia platform (such as the above-mentioned music copyright holder) or from multiple multimedia platforms. There is no need to parse them separately through different meta description information parsing programs, which simplifies the parsing process of the meta description information of the multimedia resources.
[0090] The application scenarios of the embodiments of the present disclosure are exemplarily introduced below with reference to the accompanying drawings.
[0091] refer to Figure 1 , which is a schematic diagram of an application scenario of the multimedia resource processing method provided by the embodiment of the present disclosure. The application scenario includes multiple terminal devices 100 and a server 200, and the multiple terminal devices 100 and the server 200 can be connected through a wired or wireless communication network.
[0092] The terminal device 100 is an electronic device used by the user, including but not limited to desktop computers, mobile phones, computers, smart home appliances, smart voice interaction devices, vehicle-mounted terminals, etc. The server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0093] Different multimedia resource providers can transmit multimedia resources and meta description information of multimedia resources to the server 200 through their respective terminal devices 100. For example, the multimedia resource can be a music file, and its meta description information can be understood as the above-mentioned song meta description file. At this time, the multimedia resource provider can be the music copyright holder, and the server 200 can be a music playback platform.
[0094] In a specific implementation, after receiving the target meta description information of a target multimedia resource sent by a multimedia resource provider through the terminal device 100, the server 200 can parse the target meta description information separately through multiple parsing scripts in the parsing tool to obtain at least one resource attribute of the target multimedia resource. Each parsing script can parse one resource attribute in the target meta description information, and different parsing scripts parse different resource attributes; wherein, when the target multimedia resource is a music file, each resource attribute in its target meta description information can be understood as corresponding song information.
[0095] The above application scenarios are only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0096] The multimedia resource processing method of the embodiment of the present application is introduced below in conjunction with the accompanying drawings and specific implementation methods.
[0097] refer to Figure 2 ,The embodiment of the present disclosure provides a multimedia resource processing method that can be applied to a server, for example Figure 1 The server 200 shown, the multimedia resource processing method may include the following steps:
[0098] Step S201: obtaining target meta description information of a target multimedia resource.
[0099] The target multimedia resource may include but is not limited to one or more of the following: audio, video, picture, text, animation, and the target meta description information may be information describing the target multimedia resource and may include various resource attributes of the multimedia resource.
[0100] In some possible embodiments, the target multimedia resource may be a music file, which may specifically include pictures, audio, video, etc. The specific form of the picture may be a song cover, the specific form of the audio may be a song, and the specific form of the video may be a music video (Music Video, MV); at this time, the target meta description information may be song meta description information, which may be saved in a song meta description file, which includes various song information, and each type of song information can be understood as a resource attribute.
[0101] Optionally, the multiple resource attributes of the music file may include but are not limited to at least one of the following:
[0102] Album name, album code, album language, song file address, song language, song name, song's International Standard Audiovisual Product Code (ISRC), music video MV name, singer's name, resource release time, resource online availability time, and resource authorized region.
[0103] In the disclosed embodiment, the server may receive multimedia resources and meta description files transmitted by multiple multimedia platforms. Each multimedia platform may include a terminal device of a corresponding multimedia resource provider. For example, when the multimedia resource is the above-mentioned music file, the multimedia provider may be the music copyright holder.
[0104] In the above step S201, the target meta description information of the target multimedia resource may be transmitted from a target multimedia platform among the multiple multimedia platforms to the server, thereby obtaining the target meta description information of the target multimedia resource.
[0105] Step S202, using multiple parsing scripts in the parsing tool to parse the target meta description information respectively, to obtain at least one resource attribute of the target multimedia resource; wherein each parsing script is used to parse a resource attribute in the target meta description information, and different parsing scripts are used to parse different resource attributes.
[0106] In the disclosed embodiment, each parsing script is a parsing program for a resource attribute. Assuming that the target multimedia resource is a music file and the target meta description information is song meta description information, when configuring multiple parsing scripts, corresponding parsing scripts can be configured according to different description methods of a corresponding resource attribute based on known different song meta description information, thereby obtaining parsing scripts corresponding to various resource attributes of the music file.
[0107] It should be noted that multiple parsing scripts can be configured in the server, and the configured multiple parsing scripts can be pre-saved in the server's database; in addition, multiple parsing scripts can also be configured on other platforms, and then the server can obtain the configured multiple parsing scripts from other platforms and pre-save them in the database.
[0108] The above-mentioned parsing tool can be a tool class in a preset programming language, and the tool class can contain multiple methods. Each method can be understood as a function for realizing corresponding functions, and each resource attribute can be parsed using a parsing method. For example, if the preset programming language is java, the tool class in java can be embodied as a java file class. Taking the UXmlParserUtil.java file class as an example, the file class contains methods such as parseAlbumName, parseSongISRC, and parseSongFile.
[0109] In the disclosed embodiments, an interface-oriented programming model can be used to define the above-mentioned parsing tool, that is, a parsing method for parsing each resource attribute is defined in the parsing tool. For example, the parsing tool is a JAVA file class, and the parsing method is the method in the JAVA file class. The parameter of each parsing method is the corresponding parsing script. Therefore, multiple parsing scripts can be configured separately.
[0110] Optionally, the parsing script may use a preset scripting language, such as the Groovy scripting language, the above-mentioned parsing tool may be a target java file class, and the parsing method corresponding to each parsing script is a corresponding parsing method in the target java file class. Groovy is an agile development language based on the Java virtual machine, which combines many powerful features of Python, Ruby and Smalltalk. Groovy code can be well combined with Java code and can also be used to expand existing code.
[0111] Furthermore, when the parsing tool is needed, multiple parsing scripts can be written into the corresponding parsing methods in the parsing tool. In addition, multiple parsing scripts can be written into the corresponding parsing methods in the parsing tool in advance before the parsing tool is used. In other words, the parsing script is not fixedly written in the parsing method, but can be dynamically obtained and then written into the parsing method, and then the parsing process is executed, which can ensure that the parsing script can be flexibly modified and upgraded.
[0112] In a possible implementation, Figure 3 As shown, before the above step S202 uses multiple parsing scripts in the parsing tool to parse the target meta description information respectively, the following steps may also be performed:
[0113] Step S2011, obtaining multiple parsing scripts.
[0114] In this step, multiple pre-saved parsing scripts may be obtained from the database.
[0115] Step S2012, writing the multiple parsing scripts into the corresponding parsing methods in the parsing tool respectively.
[0116] For example, the multiple parsing scripts are parsing script 1, parsing script 2, parsing script 3, and parsing script 4, which correspond to parsing method 1, parsing method 2, parsing method 3, and parsing method 4 respectively. Then, parsing script 1 is written into parsing method 1, parsing script 2 is written into parsing method 2, parsing script 3 is written into parsing method 3, and parsing script 4 is written into parsing method 4.
[0117] exist Figure 3 In the embodiment, step S2011 and step S2012 are executed after the above step S201. It should be noted that step S2011 and step S2012 may also be executed before step S201, which is not limited here.
[0118] Furthermore, if Figure 4 As shown, in the above step S202, the target meta description information is parsed respectively by using multiple parsing scripts in the parsing tool to obtain at least one resource attribute of the target multimedia resource, which may include the following steps:
[0119] Step S2021, respectively executing respective parsing scripts through multiple parsing methods in the parsing tool to parse the target meta description information respectively, and obtaining the parsing results of each parsing method.
[0120] In this step, each parsing method can execute the corresponding parsing script through the script executor to complete the parsing of the corresponding resource attributes. Since each parsing script is used to parse a specific resource attribute, for example, parsing script 1 is used to parse resource attribute 1, parsing script 2 is used to parse resource attribute 2, parsing script 3 is used to parse resource attribute 3, and parsing script 4 is used to parse resource attribute 4, if the target meta description information includes resource attribute 1, resource attribute 3, and resource attribute 4, but does not include resource attribute 2, then after parsing script 1, parsing script 3, and parsing script 4 parse the target meta description information respectively, resource attribute 1, resource attribute 3, and resource attribute 4 can be obtained respectively, and the parsing result of parsing script 2 is empty.
[0121] Step S2022: determining at least one resource attribute of the target multimedia resource according to the obtained multiple parsing results.
[0122] For example, the multiple parsing results obtained are resource attribute 1, resource attribute 3, resource attribute 4 and null, then at least one resource attribute of the target multimedia resource includes resource attribute 1, resource attribute 3 and resource attribute 4.
[0123] The meta description information of each multimedia resource in the disclosed embodiment can be parsed through multiple parsing scripts in the above-mentioned parsing tool to obtain corresponding multiple resource attributes. There is no need to parse them separately through different meta description information parsing programs, which simplifies the parsing process of the meta description information of multimedia resources.
[0124] The meta description information of each multimedia resource may come from the same multimedia platform or from multiple multimedia platforms. When each meta description information comes from multiple multimedia platforms, multiple parsing scripts in the above parsing tool may be used to parse each meta description information. It is understandable that each parsing script may parse the same resource attribute in the meta description information of multimedia resources of multiple multimedia platforms.
[0125] Assume that the server can connect to three multimedia platforms, namely multimedia platform 1, multimedia platform 2 and multimedia platform 3. The above-mentioned parsing tool includes parsing script 1, parsing script 2 and parsing script 3, which are used to parse resource attribute 1, resource attribute 2 and resource attribute 3 respectively. Parsing script 1 can parse resource attribute 1 in the song meta description information transmitted by multimedia platform 1, and can also parse resource attribute 1 in the song meta description information transmitted by multimedia platform 2, and can also parse resource attribute 1 in the song meta description information transmitted by multimedia platform 3. Parsing script 2 and parsing script 3 are similar.
[0126] This is because, in the meta description information transmitted by multiple multimedia platforms, the description method of each resource attribute can be determined. Therefore, multiple parsing scripts can be configured in the following way: for the description method of each resource attribute in the meta description information corresponding to each of the multiple multimedia platforms, configure the parsing script corresponding to each resource attribute, and save the configured multiple parsing scripts.
[0127] For example, when configuring parsing script 1, the description method of resource attribute 1 in the meta description information of multimedia platform 1, multimedia platform 2 and multimedia platform 3 can be determined, and then based on these description methods, parsing script 1 for parsing resource attribute 1 can be configured.
[0128] Based on the above embodiments of the present disclosure, in the above step S202, after the target meta description information is parsed respectively by multiple parsing scripts in the parsing tool to obtain at least one resource attribute of the target multimedia resource, the at least one resource attribute of the target multimedia resource can be saved.
[0129] In a possible implementation manner, after the above step S202, the following steps may also be performed:
[0130] At least one resource attribute of the obtained target multimedia resource is combined to obtain combined resource attribute information.
[0131] Exemplarily, the target multimedia resource is a music file, and at least one resource attribute obtained includes: album name, singer name, song ISRC, song name, and song file address. After combining these resource attributes, album attribute information can be obtained, including album name, album singer name, a list of songs in the album, etc.; song attribute information can also be obtained, including song name, song ISRC, song file, etc.
[0132] Furthermore, the data format of the combined resource attribute information may be converted into a preset data format and then saved.
[0133] The preset data format can be set as required, for example Figure 5 As shown, the above combined album attribute information and song attribute information are converted into Java language, the album attribute information is converted into Album.java, the album name contained in it is converted into private String albunmName, the album singer name is converted into private String albumArtists, and the song list in the album is converted into private List <song>songs, etc. The song attribute information is represented as Song.java, which contains the song name converted to private String SongName, song ISRC converted to private String SongIsrc, song file converted to private String SongFile, etc.
[0134] The multimedia resource processing method of the embodiment of the present application is exemplarily introduced below in conjunction with specific application scenarios.
[0135] In actual application scenarios, taking the multimedia resources as music files as an example, multiple music copyright holders can authorize the playback rights of the music files to a music playback platform (which can be understood as the server of the above embodiment of the present disclosure).
[0136] In a specific implementation, each music copyright holder can transfer their own music files and their song meta description files to a music playback platform, where the music files can specifically include audio files and video files, and the song meta description files contain song meta description information; the music files and their song meta description files can be collectively referred to as materials.
[0137] After receiving the above materials transmitted by the music copyright holder, the music playback platform can import the materials into the music library database, a process called warehousing. During the warehousing process, the materials need to be parsed, specifically, the song meta description files therein can be parsed to obtain various resource attributes of the music files.
[0138] Various resource attributes of music files, such as album name, album code, album language, song file address, song language, song name, International Standard Audiovisual Product Code (ISRC), music video MV name, singer name, resource release time, resource online time, resource authorized region and other resource attributes in multiple dimensions.
[0139] Afterwards, the parsed resource attributes can be written to the music library database for persistent storage after appropriate conversion and assembly.
[0140] In the embodiments of the present disclosure, a parsing strategy is pre-configured for the song meta description files transmitted by each music copyright holder, that is, the parsing tool and multiple parsing scripts of the above embodiments of the present disclosure. First, multiple parsing methods in the parsing tool are determined, and then multiple parsing scripts are configured. The configuration process of multiple parsing scripts can refer to the above embodiments of the present disclosure.
[0141] The multiple parsing scripts that have been configured can be saved in the database, and a separate entry can be created for the parsing script of each resource attribute, which includes the ID of the parsing script in the database, the parsed resource attribute, the parsing code, and the remarks. The parsing code of the parsing script can be written in the Groovy scripting language. As shown in Table 1, the resource attributes are album name, song name, song file address, song ISRC, and MV name.
[0142] Table 1
[0143]
[0144] like Figure 6 As shown, the multimedia resource processing method of the embodiment of the present disclosure includes the following steps:
[0145] (1) After receiving the material transmitted by the music copyright holder, the music playback platform transfers the material to the storage system. The storage system can obtain the song meta description file in the material and transfer the song meta description file to the parsing tool CommonParseUtil.java for parsing.
[0146] (2) The parsing tool CommonParseUtil.java can call multiple parsing methods, such as CommonAlbumNameParseUtil.java, CommonSonglsrcParseUtil.java, CommonSongFileParseUtil.java, etc., to execute multiple parsing scripts obtained from the database, such as the Groovy script corresponding to the album name, the Groovy script corresponding to the song ISRC, the Groovy script corresponding to the song file, etc.
[0147] In this step, when parsing the song meta description file, multiple parsing scripts can be obtained from the database, and then the multiple parsing scripts can be passed into the corresponding parsing methods respectively. That is, the parsing script is not fixedly written in the parsing method, but can be dynamically obtained and then written into the parsing method to execute the parsing process. This can ensure that the parsing script can be flexibly modified and upgraded.
[0148] In some embodiments, the music playback platform can implement material warehousing services through a server cluster. Each server in the server cluster can deploy the above-mentioned warehousing system. The warehousing system includes a parsing tool. Each server can dynamically obtain multiple parsing scripts from the database, so that after the parsing script is modified and upgraded, the server cluster can simultaneously obtain the modified parsing script.
[0149] (3) After the parsing tool completes the parsing, it obtains the parsing results of the multiple parsing scripts, determines the multiple resource attributes parsed based on the multiple parsing results, and then combines the multiple resource attributes and converts them into the data structure format set by the music playback platform, and then saves them into the music library database.
[0150] This step can be seen above Figure 4 The resource attribute combination and data conversion process will not be described in detail here.
[0151] The solution of the embodiment of the present disclosure has at least the following beneficial effects:
[0152] 1) Song meta description files of multiple music copyright holders can be parsed by multiple parsing scripts in the above-mentioned parsing tool, without the need to parse them separately through different meta description information parsing programs, thus simplifying the parsing process of song meta description files.
[0153] 2) No matter how many music copyright holders are connected, there is no need to configure a dedicated meta description file parsing program for each music copyright holder, which improves the reusability of the parsing tool and saves a lot of development human resources.
[0154] 3) By dynamically acquiring the parsing script and then writing it into the parsing method, hot deployment of the parsing tool is achieved. In addition, since the parsing script can be configured separately, the parsing script can be flexibly modified and upgraded, avoiding the redeployment of the parsing tool.
[0155] 4) After the parsing script is modified and upgraded, the server cluster can obtain the modified parsing script at the same time.
[0156] Based on the same inventive concept, the embodiment of the present disclosure also provides a multimedia resource processing device, the principle of solving the problem of the device is similar to the method of the above embodiment, so the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0157] Figure 7 A schematic diagram of a multimedia resource processing device provided by an embodiment of the present disclosure is shown. As shown in FIG, a multimedia resource processing device provided by an embodiment of the present disclosure includes a resource acquisition module 71 and a parsing module 72 .
[0158] Resource acquisition module 71, used to acquire target meta description information of target multimedia resources;
[0159] The parsing module 72 is used to parse the target meta description information respectively through multiple parsing scripts in the parsing tool to obtain at least one resource attribute of the target multimedia resource;
[0160] Each parsing script is used to parse a resource attribute in the target meta description information, and different parsing scripts are used to parse different resource attributes.
[0161] In a possible implementation, Figure 8 As shown, it also includes a script acquisition module 73, which is used to:
[0162] Get multiple parsing scripts;
[0163] Write multiple parsing scripts into corresponding parsing methods in the parsing tool respectively.
[0164] In a possible implementation, the parsing module 72 is further configured to:
[0165] By using multiple parsing methods in the parsing tool, respective parsing scripts are executed to parse the target meta description information respectively, and the parsing results of each parsing method are obtained;
[0166] At least one resource attribute of the target multimedia resource is determined according to the obtained multiple parsing results.
[0167] In a possible implementation, each parsing script is used to parse the same resource attribute in the meta description information of the multimedia resources of the multiple multimedia platforms;
[0168] The resource acquisition module 71 is also used for:
[0169] Target meta description information of a target multimedia resource sent by a target multimedia platform among multiple multimedia platforms is obtained.
[0170] In a possible implementation, multiple parsing scripts are obtained in the following manner:
[0171] According to the description mode of at least one resource attribute in the meta description information of the multimedia resource corresponding to each of the multiple multimedia platforms, parsing scripts corresponding to the multiple resource attributes of the multimedia resource are configured, and the configured multiple parsing scripts are saved.
[0172] In a possible implementation, a combination module 74 is further included, which is used to:
[0173] At least one resource attribute of the obtained target multimedia resource is combined to obtain combined resource attribute information.
[0174] In a possible implementation, a conversion module 75 is further included, which is used to:
[0175] The data format of the combined resource attribute information is converted into a preset data format.
[0176] In a possible implementation, the multimedia resource is a music file, and the at least one resource attribute of the music file includes at least one of the following:
[0177] Album name, album code, album language, song file address, song language, song name, song's International Standard Audiovisual Product Code (ISRC), music video MV name, singer's name, resource release time, resource online availability time, and resource authorized region.
[0178] In a possible implementation, the parsing script uses the Groovy scripting language, the parsing tool is the target java file class, and the parsing method corresponding to each parsing script is the corresponding parsing method in the target java file class.
[0179] For the convenience of description, the above parts are divided into modules according to their functions and described separately. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software or hardware.
[0180] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system".
[0181] Regarding the device in the above embodiment, the specific execution mode of each module therein has been described in detail in the embodiment of the method, and will not be elaborated here.
[0182] Based on the same inventive concept, the embodiment of the present disclosure also provides an electronic device, the principle of solving the problem by the electronic device is similar to the method of the above embodiment, so the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated. Fig. 9 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.
[0183] See also Fig. 9 As shown, the electronic device may include a processor 902 and a memory 901. The memory 901 provides the processor 902 with program instructions and data stored in the memory 901. In the embodiment of the present disclosure, the memory 901 may be used to store a program for multimedia resource processing in the embodiment of the present disclosure.
[0184] The processor 902 calls the program instructions stored in the memory 901, and the processor 902 is used to execute the method in any of the above method embodiments, for example Figure 2 The illustrated embodiment provides a method for processing multimedia resources.
[0185] The specific connection medium between the memory 901 and the processor 902 is not limited in the embodiments of the present disclosure. Fig. 9 In the embodiment, the memory 901 and the processor 902 are connected via a bus 903. The bus 903 is connected to the processor 902 via a bus 903. Fig. 9 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. Bus 903 can be divided into address bus, data bus, control bus, etc. For ease of illustration, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0186] The memory may include a read-only memory (ROM) and a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0187] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.
[0188] An embodiment of the present disclosure also provides a computer storage medium, in which a computer program is stored. A processor of an electronic device reads the computer program from the computer readable storage medium, and the processor executes the computer program, so that the electronic device executes the multimedia resource processing method in any of the above method embodiments.
[0189] In the specific implementation process, the computer storage medium may include: Universal Serial Bus Flash Drive (USB), mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other storage media that can store program codes.
[0190] Based on the same inventive concept as the above method embodiment, the present application embodiment provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the steps of any of the above operation interface display methods.
[0191] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0192] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0193] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0194] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0196] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.< / song>
Claims
1. A multimedia resource processing method, It is characterized in that include: Acquire target meta description information of a target multimedia resource sent by a target multimedia resource provider among multiple multimedia resource providers; wherein the target meta description information is used to describe information of the target multimedia resource; By using a plurality of parsing scripts in a parsing tool, the target meta description information is parsed respectively to obtain at least one resource attribute of the target multimedia resource; Each parsing script is used to parse the same resource attribute in the meta description information of the multimedia resources of the multiple multimedia resource providers, and different parsing scripts are used to parse different resource attributes; Before respectively parsing the target meta description information through a plurality of parsing scripts in the parsing tool, the method further includes: Writing the multiple parsing scripts into corresponding parsing methods in the parsing tool respectively; wherein the parsing tool is a tool class in a preset programming language, and the tool class includes multiple parsing methods; Each parsing script is obtained as follows: According to the description modes of the same resource attribute in the meta description information of the multimedia resources corresponding to the multiple multimedia resource providers respectively, a parsing script corresponding to the same resource attribute is configured, and the configured parsing script is saved.
2. The method according to claim 1, It is characterized in that The step of respectively parsing the target meta description information through a plurality of parsing scripts in the parsing tool to obtain at least one resource attribute of the target multimedia resource includes: By using the multiple parsing methods in the parsing tool, the respective parsing scripts are respectively executed to parse the target meta description information respectively, and the parsing results of each parsing method are obtained; At least one resource attribute of the target multimedia resource is determined according to the obtained multiple parsing results.
3. The method according to claim 1 or 2, It is characterized in that After the target meta description information is parsed respectively by the multiple parsing scripts in the parsing tool to obtain at least one resource attribute of the target multimedia resource, the method further includes: At least one resource attribute of the obtained target multimedia resource is combined to obtain combined resource attribute information.
4. The method according to claim 3, It is characterized in that The method further comprises: The data format of the combined resource attribute information is converted into a preset data format.
5. The method according to claim 1 or 2, It is characterized in that The multimedia resource is a music file, and the at least one resource attribute of the music file includes at least one of the following: Album name, album code, album language, song file address, song language, song name, song's International Standard Audiovisual Product Code (ISRC), music video MV name, singer's name, resource release time, resource online availability time, and resource authorized region.
6. The method according to claim 1 or 2, It is characterized in that The parsing script adopts the Groovy scripting language, the parsing tool is the target java file class, and the parsing method corresponding to each parsing script is the corresponding parsing method in the target java file class.
7. A multimedia resource processing device, It is characterized in that include: A resource acquisition module, used to acquire target meta description information of a target multimedia resource sent by a target multimedia resource provider among multiple multimedia resource providers; wherein the target meta description information is used to describe information of the target multimedia resource; A parsing module, used to parse the target meta description information respectively through a plurality of parsing scripts in a parsing tool to obtain at least one resource attribute of the target multimedia resource; Each parsing script is used to parse the same resource attribute in the meta description information of the multimedia resources of the multiple multimedia resource providers, and different parsing scripts are used to parse different resource attributes; A script acquisition module, used to write the multiple parsing scripts into the corresponding parsing methods in the parsing tool respectively; wherein the parsing tool is a tool class in a preset programming language, and the tool class includes multiple parsing methods; Each parsing script is obtained as follows: According to the description modes of the same resource attribute in the meta description information of the multimedia resources corresponding to the multiple multimedia resource providers respectively, a parsing script corresponding to the same resource attribute is configured, and the configured parsing script is saved.
8. The device according to claim 7, It is characterized in that The parsing module is also used for: By using the multiple parsing methods in the parsing tool, the respective parsing scripts are respectively executed to parse the target meta description information respectively, and the parsing results of each parsing method are obtained; At least one resource attribute of the target multimedia resource is determined according to the obtained multiple parsing results.
9. The device according to claim 7 or 8, It is characterized in that Also includes combination modules for: At least one resource attribute of the obtained target multimedia resource is combined to obtain combined resource attribute information.
10. The device according to claim 9, It is characterized in that Also includes conversion modules for: The data format of the combined resource attribute information is converted into a preset data format.
11. The device according to claim 7 or 8, It is characterized in that The multimedia resource is a music file, and the at least one resource attribute of the music file includes at least one of the following: Album name, album code, album language, song file address, song language, song name, song's International Standard Audiovisual Product Code (ISRC), music video MV name, singer's name, resource release time, resource online availability time, and resource authorized region.
12. The device according to claim 7 or 8, It is characterized in that The parsing script adopts the Groovy scripting language, the parsing tool is the target java file class, and the parsing method corresponding to each parsing script is the corresponding parsing method in the target java file class.
13. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of any one of the methods in claims 1 to 6.
14. A computer-readable storage medium, It is characterized in that The method comprises a program code. When the program code is run on an electronic device, the program code is used to enable the electronic device to execute the steps of any method described in claims 1 to 6.
