Media resource searching method and device, electronic equipment and storage medium
By matching, recommending similar resources and behavioral characteristics in the media resource library, the problem of low search efficiency in the existing technology is solved and the user experience is improved.
Patent Information
- Application Number
- CN202410202010.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-22
- Publication Date
- 2025-08-22
AI Technical Summary
The search methods for media resources in the prior art are inefficient, and users need to frequently re-enter search information to obtain accurate results.
In response to the search information of the target device, first search the matching media resources in the media resource library. If it matches but is not allowed to use, search for similar resources. If it does not match, the resources are recommended based on user behavior characteristics.
Improve search efficiency, reduce the frequency of users re-entering search information, and improve user experience.
Smart Images

Figure CN120523972A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of information retrieval and recommendation systems, and specifically, to a method and device for searching media resources, an electronic device, and a storage medium. Background Art
[0002] For devices that can play media resources, users can generally search for media resources through the search box. In related technologies, ES (Elastic Search) inverted index is generally used to calculate the relevance of terms to ensure that the search results based on the content entered by the user are accurate. However, when the content entered by the user does not exist or the content the user wants is inconsistent with the actual input content, it will be impossible to search for media resources that are consistent with the user's actual needs. The user is often required to re-enter new search information to trigger the search, which results in low search efficiency and a low user experience. Summary of the Invention
[0003] The present application provides a method and device for searching media resources, an electronic device, and a storage medium, so as to at least solve the problem of low search efficiency in the media resource search method in the related art.
[0004] According to the present application, a method for searching for media resources is provided, comprising: in response to current search information of a target device, searching a media resource library for media resources that match the current search information; in a case where a first media resource that matches the current search information is searched and the first media resource is allowed to be used, sending resource information of the first media resource to the target device as a search result; in a case where a first media resource that matches the current search information is searched but the first media resource is not allowed to be used, searching a media resource library for a second media resource that is similar to the first media resource, and sending resource information of the second media resource to the target device as a search result; in a case where no media resource that matches the current search information is searched, searching the media resource library for a third media resource that matches the behavioral characteristics of the user of the target device, and sending resource information of the third media resource to the target device as a search result.
[0005] According to the present application, a media resource search device is provided, comprising: a search unit for searching a media resource library for media resources that match the current search information in response to current search information of a target device; a first sending unit for, if a first media resource that matches the current search information is found and the first media resource is allowed to be used, sending the resource information of the first media resource as a search result to the target device; a first execution unit for, if a first media resource that matches the current search information is found but the first media resource is not allowed to be used, searching the media resource library for a second media resource that is similar to the first media resource, and sending the resource information of the second media resource as a search result to the target device; a second execution unit for, if no media resource that matches the current search information is found, searching the media resource library for a third media resource that matches the behavioral characteristics of the user of the target device, and sending the resource information of the third media resource as a search result to the target device.
[0006] According to another aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned method for searching media resources when running.
[0007] According to another aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the media resource search method through the computer program.
[0008] Through the present application, a method of flexibly adjusting the pushed media resources based on the matching results of the search information is adopted. Based on the search information input by the user, matching media resources are searched. When the corresponding media resources are found, the searched media resources are directly displayed. When the corresponding media resources are not found, based on the actual reason why the media resources are not found, media resources similar to the current search information or media resources matching the behavioral characteristics of the current user are searched for recommendation. When there is an error in the search information input by the user or the corresponding media resources do not exist in the current media resource library, similar media resources or media resources that the user may be interested in can be directly displayed, which can reduce the possibility of the user having to re-enter the search information, improve the user's usage experience, and achieve the technical effect of improving search efficiency, thereby solving the problem of low search efficiency in the media resource search method in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 This is a hardware structure block diagram of an optional method for searching media resources according to an embodiment of the present application;
[0010] Figure 2 This is a flowchart of an optional method for searching media resources according to an embodiment of the present application;
[0011] Figure 3 is a schematic diagram of an optional method for searching media resources according to an embodiment of the present application;
[0012] Figure 4 is a schematic diagram of an optional media resource search interface according to an embodiment of the present application;
[0013] Figure 5 is a schematic diagram of another optional media resource search interface according to an embodiment of the present application;
[0014] Figure 6 is a flowchart of another optional method for searching media resources according to an embodiment of the present application;
[0015] Figure 7 is a flowchart of another optional method for searching media resources according to an embodiment of the present application;
[0016] Figure 8 This is a structural block diagram of an optional media resource search device according to an embodiment of the present application;
[0017] Figure 9 This is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] According to one aspect of the embodiment of the present application, a method for searching media resources is provided. Optionally, in this embodiment, the above-mentioned method for searching media resources can be applied to Figure 1 In the hardware environment shown in FIG. 1 , which is composed of a terminal device 102 and a server 104. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0021] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi and Bluetooth. The terminal device 102 may be a smart device such as a projector.
[0022] The media resource search method of the embodiment of the present application can be executed by the server 104, or can be executed by the server 104 and the terminal device 102 together. Taking the media resource search method of the embodiment executed by the server 104 as an example, Figure 2 This is a flow chart of an optional method for searching media resources according to an embodiment of the present application. Figure 2 As shown, the process of the method may include the following steps:
[0023] Step S202, in response to the current search information of the target device, searching the media resource library for media resources that match the current search information;
[0024] Step S204: When a first media resource matching the current search information is found and the use of the first media resource is permitted, the resource information of the first media resource is sent to the target device as a search result;
[0025] Step S206: When a first media resource matching the current search information is found but the first media resource is not allowed to be used, a second media resource similar to the first media resource is searched in the media resource library, and resource information of the second media resource is sent as a search result to the target device.
[0026] Step S208: If no media resource matching the current search information is found, search the media resource library for a third media resource matching the behavior characteristics of the user of the target device, and send the resource information of the third media resource as the search result to the target device.
[0027] The method for searching for media resources in this embodiment can be applied to scenarios where media resources are projected and displayed based on search information input by a user during use of a projector. The target device in this embodiment can be a projector (e.g., a home projector that uses an OTT (Over The Top, a service that provides video, audio, or other media content over the internet) protocol). The user of the target device is the user currently using the projector.
[0028] In this embodiment, the current search information can be text information corresponding to a media resource entered by the user or collected voice information of the user (the voice information can indicate the media resource that the user currently wants to search for). The search information can be the name of the media resource or other tags related to the media resource (such as the name of the director or the lead actor). To improve the efficiency of inputting search information, the text information can be the first letters of the pinyin of the name or other tags.
[0029] Optionally, based on the detected search information input by the user, a search condition may be constructed to trigger a search.
[0030] It should be noted that in this embodiment, "allowed use of a media resource" may mean that the media resource currently exists in the media resource library and is not offline or disabled. Correspondingly, "not allowed use of a media resource" may mean that the media resource currently exists in the media resource library but has been offline or disabled for some reason.
[0031] Optionally, when searching in the media resource library based on the current search information, priority may be given to searching for matches in the media resources in the resource library that have not been taken offline or disabled. That is, a search condition may be first constructed based on the current search information to search whether there are media resources in the media resources in the resource library that have not been taken offline or disabled that match the current search information. If so, the search results are directly returned to the target device; otherwise, a new search condition (such as a disabled media resource search condition) is constructed to search whether there are media resources in the media resources in the resource library that have been taken offline or disabled that match the current search information.
[0032] In this embodiment, no media resources matching the current search information are found, which may mean that no media resources matching the current search information exist in all media resources in the media resource library (including offline and non-offline resources, and disabled and non-disabled resources).
[0033] The search process in this embodiment can be as follows Figure 3 As shown, after detecting that the user has input pinyin, the target device triggers the media gateway, and the media gateway calls the search service, so that the search service constructs the search conditions and calls ES to query the results based on the currently constructed search conditions. ES returns the query results to the search service, and the search service determines the search results based on the query results and returns them to the media gateway. If a matching media resource is found, it is returned to the target device. If there is no result, the media gateway triggers the search service to query whether there are any disabled media resources that meet the conditions (including disabled and offline media resources). The search service constructs the disabled media search conditions and calls ES to query the results. If no disabled media that meets the conditions is found, the recommendation service is called to obtain recommended data. The recommendation service can generate recommended data based on the user's behavioral characteristics and the relevant data of each media resource, and return it to the media gateway, and then return it to the target device. If disabled media that meets the conditions is found, the recommendation service is called to obtain media resources similar to the disabled media, generate similar recommendation results, and return them to the target device.
[0034] If the media resource that matches the search information is a disabled or offline resource, or if no matching media resource is found, you can Figure 4 As shown, related recommendations are displayed on the search result interface. The related recommendations can be similar media resources or personalized media resources.
[0035] Optionally, if a first media resource matching the current search information is found but its use is not permitted, a search can be performed directly within the media resource library for a third media resource matching the behavioral characteristics of the target device's user, and the resource information for the third media resource can be sent to the target device as the search result. In other words, even if the media resource found based on the user's search term is disabled or offline, personalized recommendations can be made based directly on the user's behavioral characteristics.
[0036] Through the above steps S202 to S208, in response to the current search information of the target device, the media resource library is searched for media resources that match the current search information; when the first media resource that matches the current search information is searched and the first media resource is allowed to be used, the resource information of the first media resource is sent to the target device as the search result; when the first media resource that matches the current search information is searched but the first media resource is not allowed to be used, the media resource library is searched for a second media resource that is similar to the first media resource, and the resource information of the second media resource is sent to the target device as the search result; when the media resource that matches the current search information is not searched, the media resource library is searched for a third media resource that matches the behavioral characteristics of the user of the target device, and the resource information of the third media resource is sent to the target device as the search result, thereby solving the problem of low search efficiency in the media resource search method in the related art.
[0037] In an exemplary embodiment, before searching the media resource library for media resources matching the current search information, the method further includes:
[0038] S11, determining an initial popularity value of each media resource in the media resource library based on resource operation data within a first time period, wherein the resource operation data is operation data of a set of resource operations performed on the media resources in the media resource library;
[0039] S12, scaling the initial popularity value of each media resource to a specified popularity value range to obtain a target popularity value for each media resource;
[0040] S13: Send resource information of the top N media resources with the highest target popularity values in the media resource library as initial search results to the target device, where N is a positive integer greater than or equal to 2.
[0041] Before the user enters the search information, Figure 5 As shown, according to the popularity value of each media resource in the media resource library, media resources with higher popularity can be selected and displayed on the initialization interface to provide recommendations when the user does not know when to search.
[0042] In this embodiment, the popularity value of each media resource can be calculated based on the accumulated behavioral data corresponding to each media resource within a certain time period (i.e., the resource operation data described above). The first time period described above can be a period of time before the current time, such as the last three days before the current time. The resource operation data can include data corresponding to behavioral events such as clicks, searches, plays, history records, and voice recordings of the media resource.
[0043] Optionally, Spark (a technology for batch processing) and Spark Streaming (a technology for real-time streaming data processing) can be used to process the behavioral data in the embedded data of the entire network, and ETL (Extract Transform Load, a data processing process) can be used to clean the log data and perform aggregation processing to finally obtain the resource operation data of each of the above media resources.
[0044] It should be noted that the resource operation data is determined by the operation data collected from users across the entire network on various media resources in the resource library.
[0045] In this embodiment, after determining the resource operation data, the corresponding heat calculation formula can be used to calculate the initial heat value of each media resource. For example, based on the acquired network-wide buried point data, the behavior data (including data corresponding to behavioral events such as clicks, searches, plays, historical records, and voice) is processed through Spark batch streaming, and then the log data is cleaned using ETL and aggregated to finally obtain the cumulative behavior data (i.e., resource operation data in this embodiment) for the past n days (such as 3 days or 5 days). In this embodiment, the heat calculation formula can be shown as formula (1).
[0046]
[0047] Where n is the number of days of the behavior, β is the attenuation coefficient (in the heat model, the shorter the time difference from the current moment, the more important the behavior data), a0 and b0 are coefficients used to adjust the size value of the heat calculation formula, and x is the cumulative number of statistics of the above behavior on the behavior day (that is, the cumulative number of statistics of resource operations corresponding to each media resource in the first time period).
[0048] Considering that there may be large differences between the initial popularity values of different media resources, to facilitate analysis and viewing, a piecewise function can be used to scale the initial popularity value of each media resource to a specified popularity value range, thereby obtaining the target popularity value of each media resource.
[0049] It should be noted that scaling here may refer to mapping the initial heat value to a specified heat value range based on a piecewise function, that is, adjusting multiple initial heat values of different sizes to different values within the specified heat value range. Initial heat values of different sizes may each have a mapping relationship with a different value within the specified heat value range. The mapping relationship between the initial heat value and the specified heat value range may be determined and adjusted based on the numerical distribution of the multiple initial heat values actually calculated.
[0050] For example, taking the specified heat value range as the heat interval [10.0, 85.0) as an example, the initial heat value of 0 to 10 can be mapped to 10.0, and the initial heat value ≥ 1000 can be mapped to 85.0.
[0051] Through this embodiment, by scaling the initial heat value of each media resource, the heat value of each media resource in the resource library can be mapped to a specified heat value range, thereby achieving standardization of the heat value and better comparing and analyzing the heat values of different media resources. Based on the resource operation data within a certain time period, the heat value of each media resource within the corresponding time period is determined, and the TOPN media resources are sent to the target device for display in the middle position of the search block, which can help users to timely understand the current hot resources and improve search efficiency and user satisfaction.
[0052] In an exemplary embodiment, before searching the media resource library for a second media resource similar to the first media resource, the method further includes:
[0053] S21, obtaining a resource vector matrix corresponding to each media resource in the media resource library, wherein the resource vector matrix corresponding to each media resource is obtained by performing vector-matrix conversion on a set of attribute data of each media resource;
[0054] S22, determining a first similarity between every two media resources in the media resource library according to a resource vector matrix corresponding to each media resource;
[0055] S23, determining a second similarity between every two media resources based on a feature vector corresponding to each attribute data in a set of attribute data of each media resource;
[0056] S24, performing weighted mean fusion on the first similarity between every two media resources and the second similarity between every two media resources to obtain a target similarity between every two media resources, wherein the second media resource is determined based on the target similarity between the first media resource and other media resources in the media resource library except the first media resource.
[0057] In this embodiment, a second media resource in a media resource library that is similar to a first media resource can be determined based on the similarity between any two media resources in the resource library. The similarity between any two media resources can be determined based on the attribute data corresponding to each media resource. Attribute data may include, but is not limited to, the director, region, host, primary film or television genre, secondary film or television tag, standard tag, mining tag, year, language, screenwriter, actor, producer, tag, and popularity of the media resource.
[0058] Optionally, before calculating the similarity between two media resources, based on the target popularity value of each media resource determined in the aforementioned embodiment, media resources with popularity values below a preset threshold (e.g., a popularity value of 25) can be removed to reduce the amount of calculation and improve the efficiency of determining similarity. In addition, the relevant information of the acquired media resources can be cleaned to remove duplicate or useless data, and the attribute data of each media resource can be regularized and standardized.
[0059] Optionally, before calculating the similarity between two media resources, the attribute data of each media resource may be subjected to feature processing. In the case where a set of attribute data includes numerical data (such as year and popularity), each numerical data may be subjected to numerical normalization feature processing to obtain a feature vector corresponding to each numerical data. In the case where a set of attribute data includes text data (such as region, host, first-level film and television type, second-level film and television label, etc.), each text data may be subjected to encoding processing to obtain a feature vector corresponding to each text data.
[0060] In this embodiment, two methods may be used to calculate the similarity between any two media resources, and the similarities calculated using the two methods may be merged to obtain a final similarity.
[0061] The first similarity calculation method can be based on the resource vector matrix of each media resource. The resource vector matrix can be determined by the eigenvectors of a set of attribute data corresponding to the media resource. By processing the resource vector matrix, the similarity between two resource vector matrices is obtained, and the similarity between the corresponding two media resources is then determined.
[0062] Taking the SVD (Singular Value Decomposition) algorithm as an example, the SVD dimensions and weights for different attribute data are pre-set. The resource vector matrix for each media resource is then input into a pre-trained SVD model. The SVD model then performs matrix decomposition on the resource vector matrix and calculates the corresponding similarity based on the decomposed matrix. The SVD model can be pre-trained using the ML (Machine Learning Library) of Spark (a big data analytics tool). During training, a regularization term (e.g., P = 2) can be added to the loss function to prevent the model from overfitting the data during training.
[0063] The second method may be to calculate based on the feature vector of each attribute data of each media resource. The Tag-Similar algorithm may be used, with a pre-set similarity threshold (eg, 0.3, where similarity is greater than 0.3, the two are considered similar) and other related parameters.
[0064] It should be noted that in this embodiment, the similarity calculation process can be performed after detecting that the user has input search information. That is, after detecting the search information input by the user, the similarity calculation can be performed with other media resources in the media resource library based on the first media resource corresponding to the current search information, and the resource search and display can be performed based on the calculation result. The similarity calculation process can also be performed before detecting that the user has input search information, based on the similarity between each media resource and other media resources calculated based on the relevant information of each media resource in the current media resource library. That is, when detecting that the user has input search information and determining that similar media resources need to be recommended based on the current search information, the similarity between each media resource and other media resources previously calculated can be directly used to find media resources that are currently similar to the first media resource.
[0065] Optionally, determining the second similarity between every two media resources according to the feature vector corresponding to each attribute data in a set of attribute data of each media resource includes:
[0066] Calculate the Cartesian product between every two media resources based on the feature vector corresponding to each attribute data in the set of attribute data of each media resource;
[0067] A second similarity between each two media resources is determined according to a Cartesian product between each two media resources.
[0068] During the calculation process, the Cartesian product of the attribute data of each two media resources can be calculated to obtain all possible tag (i.e., attribute data) combinations. Then, based on the tag combinations (i.e., the Cartesian product between each two media resources), the similarity (or similarity distance) between the two media resources can be calculated. The similarity between the two media resources can be determined by calculating the tag similarity score and combining it with information such as the tag weight. In the Tag-Similar algorithm, the standScore scoring model can be used to determine the similarity distance between media resources.
[0069] In this embodiment, the weighted mean fusion of the first similarity and the second similarity may be performed by multiplying the first similarity and the second similarity by corresponding weights respectively, and then adding all the products and dividing the result by the sum of all the weights.
[0070] After the similarity results are determined, they can be stored in a database for use in subsequent actual business scenarios.
[0071] According to this embodiment, similarities are calculated in two ways and merged to obtain the similarity between every two media resources, which can improve the accuracy of determining similar media resources.
[0072] In an exemplary embodiment, searching the media resource library for a third media resource that matches the behavior characteristics of the user of the target device includes:
[0073] S31, determining a first group of media resources corresponding to a behavior characteristic of a user of a target device, wherein the behavior characteristic of the user of the target device is used to represent a resource operation behavior of the user of the target device on media resources in a media resource library;
[0074] S32, fusing the first group of media resources and the second group of media resources to obtain a group of candidate media resources, wherein the second group of media resources includes at least one of the following: media resources whose release time is within the second time period, media resources whose scores are greater than a preset threshold, and third media resources that are at least part of the media resources in the group of candidate media resources.
[0075] When the user's desired media resources cannot be found, the user can search for media resources that may be of interest to improve search efficiency. Here, the media resources that may be of interest can be determined based on the user's behavioral characteristics. The behavior data collected on the target device's device serial number (i.e., International Mobile Equipment Identity) can be used as the user's behavior data. Alternatively, the behavior data of the same account can be used as the user's behavior data based on the user's logged-in account.
[0076] In this embodiment, when searching for media resources that the user may be interested in, personalized media resources searched based on user behavior, recently released media resources, and media resources with higher scores can be integrated, and at least part of the integrated set of candidate media resources can be used as the third media resources that can be currently recommended to the user.
[0077] The above-mentioned behavioral characteristics can be determined based on the user's behavioral data within a certain period of time (including but not limited to the user's historical search behavior and the user's viewing and clicking behavior). The viewing and clicking behavior may include but not limited to viewing time, viewing film and television tags, viewing year, viewing popularity, viewing rating, etc.
[0078] Optionally, before determining the first group of media resources corresponding to the behavioral characteristics of the user of the target device, the method further includes:
[0079] Generate a feature vector for each media resource based on the behavior data corresponding to the target device's user and each media resource in the media resource library, the text description information of each media resource, and the attribute data of each media resource;
[0080] Perform characterization processing on the feature vector of each media resource to obtain the behavioral characteristics of the user of the target device, wherein the characterization processing includes at least one of the following: transposition and weighted average.
[0081] In this embodiment, the behavior characteristics of the user object can be obtained by first determining the feature vector of the media resource, then using the representation of the behavior on the feature vector of the media resource, transposing the feature vector, and performing weighted averaging. The feature vector of the media resource can be determined using item2vector (a feature vectorization technology).
[0082] The above-mentioned feature processing of the feature vector can be first transposed to obtain the behavioral features corresponding to the behavioral data. When there are multiple types of behavioral data, the feature vectors of each behavioral data can be weighted averaged based on the weight corresponding to each behavioral data to obtain a behavioral feature corresponding to the usage object.
[0083] The second group of media resources may be determined using a new hot model, which may be a model for ranking the media resources in order of priority based on the release time of each media resource.
[0084] Optionally, considering that there may be duplicate media resources in the first group of media resources and the second group of media resources, deduplication can be performed before fusion, and the multiple media resources obtained after deduplication are used as a group of candidate media resources.
[0085] It should be noted that the fused set of candidate media resources can be directly used as third media resources for display in search results. If a set of candidate media resources is too large to be fully displayed, only a portion of the set can be displayed as third media resources. This portion of media resources can be randomly selected, based on the searched time, or by other selection methods, which are not limited in this embodiment.
[0086] In an exemplary embodiment, searching the media resource library for a third media resource that matches the behavior characteristics of the user of the target device includes:
[0087] S41, sorting the candidate media resources in a group of candidate media resources according to the behavioral characteristics of the user of the target device, and determining the first M candidate media resources obtained by sorting as the third media resources, wherein the group of candidate media resources is at least part of the media resources in the media resource library, and M is a positive integer greater than or equal to 1.
[0088] In this embodiment, if it is determined that no media resources matching the current search information exist in the media resource library, recommendation results may be directly displayed. The recommendation results may be media resources determined based on the user's behavioral characteristics. In this embodiment, a group of candidate media resources may be ranked, and only the top M media resources from the group may be recommended to the user. The ranking method may be based on the user's behavioral characteristics.
[0089] The above group of candidate media resources may be all media resources in the media resource library or part of the media resources.
[0090] A pre-trained deep twin-tower model can be used to rank a set of candidate media resources. The deep twin-tower model training process can employ a similar deployment (an automated technique) to reinforcement learning. Data within a certain time period is divided into training data and test data based on chronological order (training data is older data, and test data is later data). The training data is used to rank the media resources, and the test data is used to test the model.
[0091] By sorting media resources based on the user's behavioral characteristics through this embodiment, the possibility that the displayed media resources are resources that the user is interested in can be increased, thereby reducing the frequency of the user's search needs.
[0092] In an exemplary embodiment, before sorting the candidate media resources in a group of candidate media resources according to the behavior characteristics of the user of the target device, the method further includes:
[0093] S51, determining a first group of media resources corresponding to a behavior characteristic of a user of a target device, wherein the behavior characteristic of the user of the target device is used to represent resource operation behaviors of the user of the target device on media resources in a media resource library;
[0094] S52: Merge the first group of media resources and the second group of media resources to obtain a group of candidate media resources, wherein the second group of media resources includes at least one of the following: media resources whose release time is within the second time period, and media resources whose scores are greater than a preset threshold.
[0095] In this embodiment, a group of candidate media resources that need to be sorted can be part of the media resources searched from the media resource library, which can include a first group of media resources determined based on the behavioral characteristics of the user, recently released media resources determined based on the release time of each media resource (i.e., media resources whose release time is within the second time period), and high-scoring media resources determined based on the score of each media resource (i.e., media resources with a score greater than a preset threshold). That is, when it is determined that there are no media resources matching the current search information in the media resource library, the first group of media resources determined based on the behavioral characteristics of the user, the recently released media resources determined based on the release time of each media resource, and the high-scoring media resources determined based on the score of each media resource can be first merged to obtain a group of candidate media resources, and then the group of candidate media resources can be sorted. The sorting method is the same as the description type of the aforementioned embodiment, and this embodiment will not be repeated here.
[0096] The acquisition and integration of the above media resources may be similar to the description in the above embodiment, and will not be described in detail in this embodiment.
[0097] It should be noted that the acquisition and integration of the first and second groups of media resources can be performed after determining that the user has behavioral data within a certain period of time. When the target device is used for the first time or the user has no behavioral data within a certain period of time, the top M media resources on the current search popularity list of the entire network can be directly selected through the cold start link to display as media resources that the user may be interested in. The method for determining the search popularity of a media resource is the same as the method for determining the popularity value of a media resource in the aforementioned embodiment, and this embodiment will not be repeated here.
[0098] Through this embodiment, before performing a sorted search, some media resources are selected from the media resource library based on user behavior characteristics and the release time and rating of each media resource, and then sorting is performed based on the selected media resources. This can increase the possibility that the recommended results are media resources that the user is interested in, while reducing the amount of calculation required for sorting.
[0099] The following is an explanation of the method for searching media resources in this embodiment with reference to optional examples. In this embodiment, the user is a user and the target device is a smart projection device.
[0100] This optional example provides a search recommendation technology for smart projectors. When a user encounters no search results on a smart projector, it returns search recommendations in two scenarios. When a keyword retrieves a media resource that exists but is disabled or offline, it uses a similarity recommendation algorithm to recommend relevant results for the disabled or offline media resource. If a keyword fails to retrieve a media resource, it uses a deep learning model to learn user behavior characteristics and provide personalized recommendations, improving user experience and search efficiency.
[0101] like Figure 6 As shown, the search process for media resources on the target device side may include:
[0102] Step 1: The user searches for a term in the smart projection search box.
[0103] Step 2: If the search results exist, the ES sorted term results are returned. If the term results are insufficient, the popular terms are used to fill the gaps.
[0104] Step 3: If the search results show that the resource corresponding to the search term exists but is offline or disabled, then recommended content similar to the search term is obtained.
[0105] Step 4: If the search results show that the search term does not exist, obtain the deep learning personalized result data based on the user and display the top N resources.
[0106] like Figure 7 As shown, the media resource search process on the server side may include:
[0107] Step 1: Use Spark and Spark Streaming to obtain user search, voice, history, playback, click, and other behavioral information, and perform ETL cleaning of embedded data.
[0108] Step 2: Use portrait data and film and television behavior processing to sort the hot film and television entries of the entire network behavior data into TopN and store them in the database.
[0109] Step 3: Obtain data from the media resource library and perform ETL to clean the relevant attribute data of the media resources (such as year, director, actor, label, film and television name, and other key media attribute data).
[0110] Step 4: Fuse the similarity results determined by the Tag algorithm and SVD to generate similar data for each media resource and store it in the database.
[0111] Step 5: Combine user behavior data and media resource related data, and use deep learning algorithms to generate a long series of personalized recommended media resource data for each user.
[0112] Through this optional example, no matter the user enters an incorrect term or the resource does not exist in the resource library, the corresponding search results can be provided to the user, which can improve the search efficiency.
[0113] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware server, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory, Read-Only Memory) / RAM (Random Access Memory, Random Access Memory), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0115] According to another aspect of an embodiment of the present application, a media resource search device for implementing the above-mentioned media resource search method is also provided. The media resource search device can be applied to a smart device. Figure 8 This is a structural block diagram of an optional media resource search device according to an embodiment of the present application, such as Figure 8 As shown, the device may include:
[0116] A search unit 802 is configured to search a media resource library for media resources that match the current search information in response to the current search information of the target device;
[0117] The first sending unit 804 is configured to send resource information of the first media resource as a search result to the target device if a first media resource matching the current search information is found and the first media resource is allowed to be used;
[0118] The first execution unit 806 is configured to, when a first media resource matching the current search information is found but the first media resource is not allowed to be used, search the media resource library for a second media resource similar to the first media resource, and send resource information of the second media resource as a search result to the target device;
[0119] The second execution unit 808 is used to search for a third media resource that matches the behavioral characteristics of the user of the target device in the media resource library when no media resource matching the current search information is found, and send resource information of the third media resource as search results to the target device.
[0120] Through the embodiments of the present application, in response to the current search information of the target device, the media resource library is searched for media resources that match the current search information; when the first media resource that matches the current search information is searched and the first media resource is allowed to be used, the resource information of the first media resource is sent to the target device as the search result; when the first media resource that matches the current search information is searched but the first media resource is not allowed to be used, the media resource library is searched for a second media resource that is similar to the first media resource, and the resource information of the second media resource is sent to the target device as the search result; when the media resource that matches the current search information is not searched, the media resource library is searched for a third media resource that matches the behavioral characteristics of the user of the target device, and the resource information of the third media resource is sent to the target device as the search result, thereby solving the problem of low search efficiency in the media resource search method in the related art and improving the search efficiency.
[0121] In an exemplary embodiment, the apparatus further comprises:
[0122] a first determining unit, configured to determine an initial popularity value of each media resource in the media resource library based on resource operation data within a first time period, wherein the resource operation data is operation data of a set of resource operations performed on the media resources in the media resource library;
[0123] A scaling unit, configured to scale the initial popularity value of each media resource to a specified popularity value range to obtain a target popularity value for each media resource;
[0124] The second sending unit is used to send resource information of the first N media resources with the highest target heat values in the media resource library as an initial search result to the target device, where N is a positive integer greater than or equal to 2.
[0125] In an exemplary embodiment, the apparatus further comprises:
[0126] an acquisition unit, configured to acquire a resource vector matrix corresponding to each media resource in the media resource library before searching the media resource library for a second media resource similar to the first media resource, wherein the resource vector matrix corresponding to each media resource is obtained by performing vector-matrix conversion on a set of attribute data of each media resource;
[0127] a second determining unit, configured to determine a first similarity between every two media resources in the media resource library according to a resource vector matrix corresponding to each media resource;
[0128] a third determining unit, configured to determine a second similarity between every two media resources based on a feature vector corresponding to each attribute data in a set of attribute data of each media resource;
[0129] The fusion unit is used to perform weighted mean fusion on the first similarity between each two media resources and the second similarity between each two media resources to obtain a target similarity between each two media resources, wherein the second media resource is determined based on the target similarity between the first media resource and other media resources in the media resource library except the first media resource.
[0130] In an exemplary embodiment, the third determining unit includes:
[0131] a calculation module, configured to calculate the Cartesian product between every two media resources based on a feature vector corresponding to each attribute data in a set of attribute data of each media resource;
[0132] The first determining module is configured to determine a second similarity between every two media resources according to a Cartesian product between every two media resources.
[0133] In an exemplary embodiment, the second execution unit includes:
[0134] A second determining module is configured to determine a first group of media resources corresponding to a behavior characteristic of a user of the target device, wherein the behavior characteristic of the user of the target device is used to represent a resource operation behavior of the user of the target device on the media resources in the media resource library;
[0135] The first fusion module is used to fuse the first group of media resources and the second group of media resources to obtain a group of candidate media resources, wherein the second group of media resources includes at least one of the following: media resources whose release time is within the second time period, media resources with a score greater than a preset threshold, and third media resources that are at least part of the media resources in the group of candidate media resources.
[0136] In an exemplary embodiment, the second execution unit includes:
[0137] An execution module is used to sort candidate media resources in a group of candidate media resources according to behavioral characteristics of a user of a target device, and determine the first M candidate media resources obtained by sorting as third media resources, wherein a group of candidate media resources is at least part of the media resources in the media resource library, and M is a positive integer greater than or equal to 1.
[0138] In an exemplary embodiment, the apparatus further comprises:
[0139] a third determining module configured to determine, before sorting candidate media resources in a group of candidate media resources based on the behavioral characteristics of the user of the target device, a first group of media resources corresponding to the behavioral characteristics of the user of the target device, wherein the behavioral characteristics of the user of the target device are used to represent resource operation behaviors of the user of the target device on media resources in the media resource library;
[0140] The second fusion module is used to fuse the first group of media resources and the second group of media resources to obtain a group of candidate media resources, wherein the second group of media resources includes at least one of the following: media resources whose release time is within the second time period, and media resources whose scores are greater than a preset threshold.
[0141] In an exemplary embodiment, the apparatus further comprises:
[0142] a generating unit configured to generate a feature vector for each media resource based on the behavior data corresponding to the user of the target device and each media resource in the media resource library, text description information of each media resource, and attribute data of each media resource before determining the first group of media resources corresponding to the behavior characteristics of the user of the target device;
[0143] The processing unit is used to perform characterization processing on the feature vector of each media resource to obtain the behavioral characteristics of the user of the target device, wherein the characterization processing includes at least one of the following: transposition and weighted average.
[0144] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. Figure 1 The hardware environment shown can be implemented through software or hardware, wherein the hardware environment includes a network environment.
[0145] According to another aspect of the embodiments of the present application, a storage medium is further provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the above-mentioned media resource search methods in the embodiments of the present application.
[0146] Optionally, in this embodiment, the above-mentioned storage medium may be located on at least one network device among the multiple network devices in the network shown in the above-mentioned embodiment.
[0147] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0148] S1, in response to current search information of a target device, searching a media resource library for media resources matching the current search information;
[0149] S2, when a first media resource matching the current search information is found and use of the first media resource is permitted, sending resource information of the first media resource as a search result to the target device;
[0150] S3, when a first media resource matching the current search information is found but the first media resource is not allowed to be used, searching the media resource library for a second media resource similar to the first media resource, and sending resource information of the second media resource as a search result to the target device;
[0151] S4: If no media resource matching the current search information is found, search the media resource library for a third media resource matching the behavior characteristics of the user of the target device, and send the resource information of the third media resource as the search result to the target device.
[0152] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0153] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0154] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned media resource search method is also provided. The electronic device may be a smart device, a server, a terminal, or a combination thereof.
[0155] Figure 9 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 9 As shown, it includes a processor 902, a communication interface 904, a memory 906 and a communication bus 908, wherein the processor 902, the communication interface 904 and the memory 906 communicate with each other through the communication bus 908, wherein,
[0156] Memory 906, for storing computer programs;
[0157] The processor 902 is configured to execute the computer program stored in the memory 906 to implement the following steps:
[0158] S1, in response to current search information of a target device, searching a media resource library for media resources matching the current search information;
[0159] S2, when a first media resource matching the current search information is found and use of the first media resource is permitted, sending resource information of the first media resource as a search result to the target device;
[0160] S3, when a first media resource matching the current search information is found but the first media resource is not allowed to be used, searching the media resource library for a second media resource similar to the first media resource, and sending resource information of the second media resource as a search result to the target device;
[0161] S4: If no media resource matching the current search information is found, search the media resource library for a third media resource matching the behavior characteristics of the user of the target device, and send the resource information of the third media resource as the search result to the target device.
[0162] Optionally, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The communication interface is used for communication between the electronic device and other devices.
[0163] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the aforementioned processor.
[0164] As an example, the memory 906 may include, but is not limited to, the search unit 802, the first sending unit 804, the first execution unit 806, and the second execution unit 808 in the media resource search device. Furthermore, the memory 906 may also include, but is not limited to, other module units in the media resource search device, which will not be described in detail in this example.
[0165] The above-mentioned processor can be a general-purpose processor, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0166] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0167] It can be understood by those skilled in the art that Figure 9 The structure shown is for illustration only. The device for implementing the above-mentioned media resource search method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 9 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 9 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 9 Different configurations shown.
[0168] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0169] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0170] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application.
[0171] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0172] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.
[0173] The units described as separate components may or may not be physically separate, and 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 these units may be selected based on actual needs to achieve the purpose of the solution provided in this embodiment.
[0174] In addition, the functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or at least two units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional units.
[0175] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for searching media resources, characterized in that: include: In response to current search information of the target device, searching a media resource library for media resources that match the current search information; In a case where a first media resource matching the current search information is found and use of the first media resource is permitted, sending resource information of the first media resource as a search result to the target device; When a first media resource matching the current search information is found but the first media resource is not allowed to be used, searching a media resource library for a second media resource similar to the first media resource, and sending resource information of the second media resource as a search result to the target device; If no media resource matching the current search information is found, a third media resource matching the behavior characteristics of the user of the target device is searched in the media resource library, and resource information of the third media resource is sent to the target device as a search result.
2. The method according to claim 1, characterized in that The method further comprises: determining an initial popularity value of each media resource in the media resource library according to resource operation data within a first time period, wherein the resource operation data is operation data of a set of resource operations performed on the media resources in the media resource library; Scaling the initial popularity value of each media resource to a specified popularity value range to obtain a target popularity value of each media resource; The resource information of the first N media resources with the highest target heat values in the media resource library is sent to the target device as the initial search result, where N is a positive integer greater than or equal to 2.
3. The method according to claim 1, characterized in that Before searching the media resource library for a second media resource similar to the first media resource, the method further includes: Obtaining a resource vector matrix corresponding to each media resource in the media resource library, wherein the resource vector matrix corresponding to each media resource is obtained by performing vector-matrix conversion on a set of attribute data of each media resource; determining, according to a resource vector matrix corresponding to each media resource, a first similarity between every two media resources in the media resource library; determining a second similarity between each two media resources according to a feature vector corresponding to each attribute data in a set of attribute data of each media resource; A weighted mean fusion is performed on the first similarity between each two media resources and the second similarity between each two media resources to obtain a target similarity between each two media resources, wherein the second media resource is determined based on the target similarity between the first media resource and other media resources in the media resource library except the first media resource.
4. The method according to claim 3, characterized in that Determining the second similarity between each two media resources based on the feature vector corresponding to each attribute data in the set of attribute data of each media resource includes: Calculating a Cartesian product between each two media resources according to a feature vector corresponding to each attribute data in a set of attribute data of each media resource; A second similarity between each two media resources is determined according to a Cartesian product between each two media resources.
5. The method according to claim 1, wherein The searching the media resource library for a third media resource that matches the behavior characteristics of the user of the target device includes: Determining a first group of media resources corresponding to a behavior characteristic of a user of the target device, wherein the behavior characteristic of the user of the target device is used to represent a resource operation behavior of the user of the target device on the media resources in the media resource library; The first group of media resources and the second group of media resources are merged to obtain a group of candidate media resources, wherein the second group of media resources includes at least one of the following: media resources whose release time is within a second time period, media resources whose scores are greater than a preset threshold, and the third media resources are at least part of the media resources in the group of candidate media resources.
6. The method according to claim 1, wherein The searching the media resource library for a third media resource that matches the behavior characteristics of the user of the target device includes: According to the behavioral characteristics of the user of the target device, the candidate media resources in a group of candidate media resources are sorted, and the first M candidate media resources obtained by sorting are determined as the third media resources, wherein the group of candidate media resources are at least part of the media resources in the media resource library, and M is a positive integer greater than or equal to 1.
7. The method according to claim 5, characterized in that Before determining the first group of media resources corresponding to the behavioral characteristics of the user of the target device, the method further includes: generating a feature vector for each media resource based on the behavior data corresponding to the user of the target device and each media resource in the media resource library, the text description information of each media resource, and the attribute data of each media resource; Performing characterization processing on the feature vector of each media resource to obtain behavioral characteristics of the user of the target device, wherein the characterization processing includes at least one of the following: transposition and weighted averaging.
8. A device for searching media resources, characterized in that: include: A search unit, configured to search a media resource library for media resources matching the current search information in response to current search information of a target device; a first sending unit, configured to, when a first media resource matching the current search information is found and use of the first media resource is permitted, send resource information of the first media resource as a search result to the target device; a first execution unit configured to, when a first media resource matching the current search information is found but the first media resource is not allowed to be used, search a media resource library for a second media resource similar to the first media resource, and send resource information of the second media resource as a search result to the target device; The second execution unit is used to search for a third media resource that matches the behavioral characteristics of the user of the target device in the media resource library when no media resource matching the current search information is found, and send the resource information of the third media resource as a search result to the target device.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Resource searching method and device, computer equipment and storage medium
CN113377976A
Semantic search method based on knowledge base application
CN114547253A
Method and apparatus for processing search results
WO2015195364A1