Index construction and resource recall method, device, electronic device and storage medium
By constructing a resource index based on attribute text extraction, the problems of low accuracy of resource recall and slow recovery speed in the existing technology are solved, and efficient and accurate resource recall effects are achieved.
Patent Information
- Application Number
- CN202210483566.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2042-05-05
AI Technical Summary
In the prior art, the accuracy of resource recall is relatively low and the initial recall rate is low, and the recall rate is increased too slowly, making it difficult to achieve efficient recall of resources.
By obtaining the attribute text of the resources to be published, extracting attribute keywords, and building resource indexes based on these keywords, it is used to retrieve and recall resources, avoiding the publisher setting keywords by himself, and improving recall accuracy and efficiency.
It has achieved the early recall effect and high recall accuracy of efficient recall of newly released resources, solved the problems of low initial recall rate and slow recall rate improvement, reduced traffic waste, and improved the input-output ratio of resource release and recall process.
Smart Images

Figure CN114860865B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computers, and in particular to an index construction and resource recall method, device, electronic device, and storage medium. Background Art
[0002] Resource publishers can publish resources on resource consumption platforms. For example, video producers can publish their videos on video management platforms, and advertisers can publish ads on platforms with advertising capabilities. Published resources can be recalled by resource consumption platforms and made available to users.
[0003] In related technologies, when publishing resources, publishers can set keywords for the resources to be published, so that the resource consumption platform can recall the corresponding published resources based on the keywords. For example, the publisher can adopt an aggressive strategy to set keywords, such as setting as many keywords related to the resources to be published as possible, and using a broad matching method to delete keywords with poor performance through data accumulation, and finally select suitable keywords; alternatively, the publisher can adopt a conservative strategy to set keywords, such as only setting keywords closely related to the resource, such as the resource title, and gradually adding new keywords based on data accumulation, and finally selecting suitable keywords.
[0004] When resource consumption platforms recall published resources, publishers typically incur corresponding costs, such as traffic and funds. The aforementioned aggressive strategy, due to a lack of effective keyword screening, results in low resource recall accuracy. Conversely, the aforementioned conservative strategy, due to the minimal number of keywords, improves accuracy but suffers from low initial recall rates and slow recall rate increases, hindering efficient resource recall. Summary of the Invention
[0005] The present disclosure provides an index construction and resource recall method, apparatus, electronic device, and storage medium to at least solve the technical problems existing in the related art. The technical solution of the present disclosure is as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a method for constructing an index is proposed, comprising:
[0007] Acquire attribute text of a resource to be published, where the attribute text corresponds to a resource attribute of the resource;
[0008] Extracting attribute keywords of the resource from the attribute text;
[0009] A resource index corresponding to the resource attribute is constructed according to the corresponding relationship between the attribute keyword and the resource, and the corresponding relationship is used to retrieve the resources recorded in the resource index.
[0010] Optionally,
[0011] The obtaining of the attribute text of the resource to be published includes: obtaining the attribute texts corresponding to the multiple resource attributes of the resource to be published;
[0012] The extracting of the attribute keywords of the resource from the attribute text includes: extracting the attribute keywords corresponding to the various resource attributes from the attribute texts corresponding to the various resource attributes.
[0013] Optionally, extracting attribute keywords corresponding to any resource attribute from the attribute text corresponding to the resource attribute includes:
[0014] The attribute text corresponding to any one of the resource attributes is segmented, and the attribute keyword corresponding to any one of the resource attributes is determined based on the basic words obtained from the segmentation.
[0015] Optionally, determining the attribute keyword corresponding to any resource attribute based on the basic words obtained through processing includes:
[0016] Determine each basic word obtained by processing as an attribute keyword corresponding to any resource attribute; or
[0017] A combined word obtained by combining the processed multiple basic words is determined as an attribute keyword corresponding to any one of the resource attributes.
[0018] Optionally, the multiple basic words in any combination word satisfy at least one of the following:
[0019] The relative positions of the multiple basic words in the combined word are consistent with the relative positions of the multiple basic words in all basic words corresponding to any one resource attribute;
[0020] The position interval between any two adjacent basic words among the multiple basic words in all basic words corresponding to any one resource attribute is not greater than a first interval threshold;
[0021] A character interval between adjacent characters of any two adjacent basic words among the multiple basic words in the attribute text corresponding to any resource attribute is not greater than a second interval threshold.
[0022] Optionally, determining the attribute keyword corresponding to any resource attribute based on the basic words obtained through processing includes:
[0023] The content words in the basic words are determined as attribute keywords corresponding to any one of the resource attributes, and function words in the basic words are avoided from being determined as attribute keywords corresponding to any one of the resource attributes.
[0024] Optionally, constructing a resource index corresponding to the resource attribute according to the correspondence between the attribute keyword and the resource includes:
[0025] If a resource index corresponding to the resource attribute does not exist, construct a resource index corresponding to the resource attribute, add the attribute keyword to the constructed resource index, and add the resource to the resource set corresponding to the attribute keyword;
[0026] In the case where a resource index corresponding to the resource attribute exists, if the resource index records any attribute keyword corresponding to the resource attribute and a resource set corresponding to the attribute keyword, then add the resource to the resource set; or
[0027] In the case where there is a resource index corresponding to the resource attribute, if any attribute keyword corresponding to the resource attribute is not recorded in the resource index, the attribute keyword is newly added to the resource index, and the resource is added to the resource set corresponding to the attribute keyword.
[0028] Optionally, obtaining the attribute text of the resource to be published includes:
[0029] The resource material submitted by the publisher of the resource is obtained, and the attribute text of the resource is obtained from the resource material.
[0030] Optionally, the acquiring of the attribute text of the resource from the resource material includes at least one of the following:
[0031] In the case where the resource material includes text, the text is used as the attribute text of the resource;
[0032] In the case where the resource material includes an image or a video, the text recognized from the image or the video screen of the video is used as the attribute text of the resource;
[0033] In the case where the resource material includes audio, text converted from the voice contained in the audio is used as the attribute text of the resource.
[0034] According to a second aspect of an embodiment of the present disclosure, a resource recall method is proposed, comprising:
[0035] In response to a resource search request including a search text corresponding to a resource attribute, determining a search keyword based on the search text;
[0036] Determining a target resource corresponding to the search keyword from resources recorded in a resource index corresponding to the resource attribute, wherein the resource index is constructed based on a correspondence between a resource to be published and an attribute keyword of the resource, and the attribute keyword is extracted from an attribute text corresponding to the resource attribute of the resource;
[0037] The target resource is returned to the initiator of the resource search request.
[0038] Optionally, determining the search keyword according to the search text includes:
[0039] If the search text contains a regular expression, determining the search keyword according to the regular expression;
[0040] If the search text does not contain a regular expression, the search text is segmented, and the search keyword is determined based on the basic search terms obtained through the segmentation process.
[0041] Optionally, determining the search keyword based on the basic search term obtained through processing includes:
[0042] Determine each basic search term obtained through processing as the search keyword; or
[0043] A combined search term obtained by combining the processed multiple basic search terms is determined as the search keyword.
[0044] Optionally, the attribute text corresponds to multiple resource attributes of the resource, and determining the target resource corresponding to the search keyword from the resources of the resource index record corresponding to the resource attributes includes:
[0045] The target resources corresponding to the search keyword are respectively determined from the resources of each resource index record corresponding to the multiple resource attributes.
[0046] Optionally, the multiple resource attributes are respectively provided with corresponding attribute weights, and determining the target resource corresponding to any search keyword from the resources of each resource index record corresponding to the multiple resource attributes includes:
[0047] Determining a plurality of resources corresponding to any one of the search keywords and recorded in a resource index corresponding to at least one resource attribute;
[0048] Determining a score for each resource in the plurality of resources according to an attribute weight of the at least one resource attribute;
[0049] A target resource corresponding to any one of the search keywords is determined from the multiple resources according to the score.
[0050] Optionally, determining the score of any resource according to the attribute weight of the at least one resource attribute includes:
[0051] In the case where any of the resources is recorded in a resource index corresponding to a resource attribute, the attribute weight of the resource attribute is used as the score of the resource;
[0052] In the case that any resource is recorded in resource indexes corresponding to a plurality of resource attributes, the accumulated value of the attribute weights of the plurality of resource attributes is used as the score of the resource.
[0053] Optionally, determining a target resource corresponding to any search keyword from the resources of each resource index record corresponding to the multiple resource attributes includes:
[0054] In the case where any of the search keywords is the same as any of the attribute keywords of any of the resource index records, the resource corresponding to any of the attribute keywords is determined as the target resource corresponding to any of the search keywords; or
[0055] The relevance between any one of the search keywords and the attribute keywords of each resource index record is determined, and the target resource is determined from the resources of each resource index record according to the relevance.
[0056] According to a third aspect of an embodiment of the present disclosure, an index construction device is provided, comprising:
[0057] A text acquisition unit is configured to acquire attribute text of a resource to be published, wherein the attribute text corresponds to a resource attribute of the resource;
[0058] A keyword extraction unit, configured to extract attribute keywords of the resource from the attribute text;
[0059] The index building unit is configured to build a resource index corresponding to the resource attribute according to the corresponding relationship between the attribute keyword and the resource, and the corresponding relationship is used to retrieve the resources recorded in the resource index.
[0060] Optionally,
[0061] The text acquisition unit is further configured to: acquire attribute texts corresponding to multiple resource attributes of the resource to be published;
[0062] The keyword extraction unit is further configured to extract attribute keywords corresponding to various resource attributes from the attribute texts corresponding to various resource attributes.
[0063] Optionally, the keyword extraction unit is further configured to:
[0064] The attribute text corresponding to any resource attribute is segmented, and the attribute keyword corresponding to the any resource attribute is determined based on the basic words obtained from the segmentation.
[0065] Optionally, the keyword extraction unit is further configured to:
[0066] Determine each basic word obtained by processing as an attribute keyword corresponding to any resource attribute; or
[0067] A combined word obtained by combining the processed multiple basic words is determined as an attribute keyword corresponding to any one of the resource attributes.
[0068] Optionally, the multiple basic words in any combination word satisfy at least one of the following:
[0069] The relative positions of the multiple basic words in the combined word are consistent with the relative positions of the multiple basic words in all basic words corresponding to any one resource attribute;
[0070] The position interval between any two adjacent basic words among the multiple basic words in all basic words corresponding to any one resource attribute is not greater than a first interval threshold;
[0071] A character interval between adjacent characters of any two adjacent basic words among the multiple basic words in the attribute text corresponding to any resource attribute is not greater than a second interval threshold.
[0072] Optionally, the keyword extraction unit is further configured to:
[0073] The content words in the basic words are determined as attribute keywords corresponding to any one of the resource attributes, and function words in the basic words are avoided from being determined as attribute keywords corresponding to any one of the resource attributes.
[0074] Optionally, the index building unit is further configured to:
[0075] If a resource index corresponding to the resource attribute does not exist, construct a resource index corresponding to the resource attribute, add the attribute keyword to the constructed resource index, and add the resource to the resource set corresponding to the attribute keyword;
[0076] In the case where a resource index corresponding to the resource attribute exists, if the resource index records any attribute keyword corresponding to the resource attribute and a resource set corresponding to the attribute keyword, then add the resource to the resource set; or
[0077] In the case where there is a resource index corresponding to the resource attribute, if any attribute keyword corresponding to the resource attribute is not recorded in the resource index, the attribute keyword is newly added to the resource index, and the resource is added to the resource set corresponding to the attribute keyword.
[0078] Optionally, the text acquisition unit is further configured to:
[0079] The resource material submitted by the publisher of the resource is obtained, and the attribute text of the resource is obtained from the resource material.
[0080] Optionally, the text acquisition unit is further configured to:
[0081] In the case where the resource material includes text, the text is used as the attribute text of the resource;
[0082] In the case where the resource material includes an image or a video, the text recognized from the image or the video screen of the video is used as the attribute text of the resource;
[0083] In the case where the resource material includes audio, text converted from the voice contained in the audio is used as the attribute text of the resource.
[0084] According to a fourth aspect of an embodiment of the present disclosure, a resource recall device is provided, comprising:
[0085] a keyword determination unit configured to, in response to a resource search request containing a search text corresponding to a resource attribute, determine a search keyword based on the search text;
[0086] a resource determination unit configured to determine a target resource corresponding to the search keyword from resources recorded in a resource index corresponding to the resource attribute, wherein the resource index is constructed based on a correspondence between a resource to be published and an attribute keyword of the resource, and the attribute keyword is extracted from an attribute text corresponding to the resource attribute of the resource;
[0087] The resource returning unit is configured to return the target resource to the initiator of the resource search request.
[0088] Optionally, the keyword determination unit is further configured to:
[0089] If the search text contains a regular expression, determining the search keyword according to the regular expression;
[0090] If the search text does not contain a regular expression, the search text is segmented, and the search keyword is determined based on the basic search terms obtained through the segmentation process.
[0091] Optionally, the keyword determination unit is further configured to:
[0092] Determine each basic search term obtained through processing as the search keyword; or
[0093] A combined search term obtained by combining the processed multiple basic search terms is determined as the search keyword.
[0094] Optionally, the attribute text corresponds to multiple resource attributes of the resource, and the resource determination unit is further configured to:
[0095] The target resources corresponding to the search keyword are respectively determined from the resources of each resource index record corresponding to the multiple resource attributes.
[0096] Optionally, the multiple resource attributes are respectively set with corresponding attribute weights, and the resource determination unit is further configured to:
[0097] Determine a plurality of resources corresponding to any search keyword and recorded in a resource index corresponding to at least one resource attribute;
[0098] Determining a score for each resource in the plurality of resources according to an attribute weight of the at least one resource attribute;
[0099] A target resource corresponding to any one of the search keywords is determined from the multiple resources according to the score.
[0100] Optionally, the resource determining unit is further configured to:
[0101] In the case where any of the resources is recorded in a resource index corresponding to a resource attribute, the attribute weight of the resource attribute is used as the score of the resource;
[0102] In the case that any resource is recorded in resource indexes corresponding to a plurality of resource attributes, the accumulated value of the attribute weights of the plurality of resource attributes is used as the score of the resource.
[0103] Optionally, the resource determining unit is further configured to:
[0104] In the case where any search keyword is identical to any attribute keyword of any resource index record, the resource corresponding to any attribute keyword is determined as the target resource corresponding to any search keyword; or
[0105] The relevance between any one of the search keywords and the attribute keywords of each resource index record is determined, and the target resource is determined from the resources of each resource index record according to the relevance.
[0106] According to a fifth aspect of the embodiments of the present disclosure, an electronic device is provided, including:
[0107] processor;
[0108] a memory for storing instructions executable by the processor;
[0109] The processor is configured to execute the instructions to implement the index construction method described in any embodiment of the first aspect or the resource recall method described in any embodiment of the second aspect.
[0110] According to the sixth aspect of the embodiments of the present disclosure, a storage medium is proposed. When the instructions in the storage medium are executed by the processor of the index building electronic device, the index building electronic device is enabled to execute the index building method described in any embodiment of the first aspect or the resource recall method described in any embodiment of the second aspect.
[0111] According to the seventh aspect of the embodiments of the present disclosure, a computer program product is provided, comprising a computer program and / or instructions, which, when executed by a processor, implement the index construction method described in any embodiment of the first aspect or the resource recall method described in any embodiment of the second aspect.
[0112] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0113] According to an embodiment of the present disclosure, during the release phase of a resource, the server of the resource consumption platform can obtain the attribute text corresponding to the resource attribute of the resource, and extract the attribute keywords of the resource therefrom, and then construct a resource index corresponding to the resource attribute based on the correspondence between the attribute keywords and the resource, and the correspondence can be used by the server to retrieve the resources recorded in the resource index. Among them, the resources recorded in the above resource index are the published resources, so the server can use the above resource index to retrieve each published resource. It can be seen that in the above release method, the publisher does not need to set any keywords for the resource to be released, but the server automatically obtains the attribute keywords based on the attribute text of the resource and constructs the corresponding resource index.
[0114] During the resource retrieval phase, the resource consumption platform's server responds to a resource search request containing search text corresponding to a resource attribute by determining a search keyword based on the search text. It then determines the target resource corresponding to the search keyword from the resources in the resource index record corresponding to the resource attribute, and returns this target resource to the initiator of the resource search request. This demonstrates that, through the resource index established in this manner, the server can recall target resources under the specific resource attribute corresponding to the search text based on the index keyword.
[0115] It is understandable that multiple attribute keywords of the resource can be obtained through the above-mentioned attribute text. Therefore, by retrieving resources through the resource index constructed according to the above-mentioned attribute keywords, a high recall rate can be achieved even for newly released resources, thereby having a good early recall effect in the cold start phase. In addition, because each attribute keyword involved in constructing the resource index corresponds to the resource attributes of the released resources, it is possible to ensure that each released resource is recalled according to the released resource attributes, thereby achieving a higher recall accuracy. It can be seen that compared with the solutions in the related art, this solution effectively solves the problems of low initial recall rate of resources and slow recall rate improvement, thereby helping to achieve efficient recall of resources.
[0116] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0117] The accompanying drawings herein are incorporated into the specification and constitute a part of the present disclosure, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation to the present disclosure.
[0118] Figure 1 This is a schematic diagram of the architecture of a resource consumption platform provided by an exemplary embodiment;
[0119] Figure 2 is a flowchart illustrating an index construction method according to an embodiment of the present disclosure;
[0120] Figure 3 is a schematic diagram showing a structure of a resource index according to an embodiment of the present disclosure;
[0121] Figure 4 is a schematic diagram showing the structure of another resource index according to an embodiment of the present disclosure;
[0122] Figure 5 is a flow chart showing a resource recall method according to an embodiment of the present disclosure;
[0123] Figure 6 is a schematic block diagram of an index construction device according to an embodiment of the present disclosure;
[0124] Figure 7 is a schematic block diagram of a resource recall device according to an embodiment of the present disclosure;
[0125] Figure 8 is a structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0126] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0127] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable 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. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0128] Resource publishers can publish resources on resource consumption platforms. For example, video producers can publish their videos on video management platforms, and advertisers can publish ads on platforms with advertising capabilities. Published resources can be recalled by resource consumption platforms and made available to users.
[0129] In related technologies, when publishing resources, publishers can set keywords for the resources to be published, so that the resource consumption platform can recall the corresponding published resources based on the keywords. For example, the publisher can adopt an aggressive strategy to set keywords, such as setting as many keywords related to the resources to be published as possible, and using a broad matching method to delete keywords with poor performance through data accumulation, and finally select suitable keywords; alternatively, the publisher can adopt a conservative strategy to set keywords, such as only setting keywords closely related to the resource, such as the resource title, and gradually adding new keywords based on data accumulation, and finally selecting suitable keywords.
[0130] When resource consumption platforms recall published resources, publishers typically incur corresponding costs, such as traffic and funds. The aforementioned aggressive strategy, due to a lack of effective keyword screening, results in low resource recall accuracy. Conversely, the aforementioned conservative strategy, due to the minimal number of keywords, improves accuracy but suffers from low initial recall rates and slow recall rate increases, hindering efficient resource recall.
[0131] In order to solve the above-mentioned technical problems existing in the related art, the present disclosure proposes an index construction method, in which the server extracts corresponding attribute keywords based on the attribute text of the resource to be published, and uses the attribute keywords to construct a resource index, and then uses the resource index to retrieve the target resource in the published resources. Based on the above-mentioned resource index, the present disclosure also proposes a resource recall method, in which the server responds to a resource search request containing a search text corresponding to a resource attribute, determines a search keyword based on the search text, and returns the target resource corresponding to the search keyword determined from the resource recorded in the resource index corresponding to the resource attribute to the initiator of the resource search request.
[0132] This approach eliminates the need for publishers to set resource keywords. Instead, the server automatically constructs a resource index corresponding to the resource attributes. This resource index is used to retrieve target resources with specific resource attributes corresponding to the search text, improving both the accuracy and efficiency of resource recall. This method is described in detail below with reference to the accompanying figures.
[0133] First combine Figure 1 , introduces the resource consumption platform described in the embodiment of the present disclosure. Figure 1 This is a schematic diagram of the architecture of a resource consumption platform provided by an exemplary embodiment. Figure 1 As shown, the system may include a network 10, a server 11, and several electronic devices, such as a mobile phone 12, a mobile phone 13, and a mobile phone 14.
[0134] The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server, a cloud server, etc. hosted by a host cluster. Mobile phones 12-14 are just one type of electronic device that users can use. In fact, users may also use electronic devices such as tablet devices, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), VR (Virtual Reality) devices, AR (Augmented Reality) devices, etc., and one or more embodiments of the present disclosure are not limited to this. The network 10 may include various types of wired or wireless networks.
[0135] In one embodiment, the server 11 can cooperate with the mobile phones 12-14. For example, the publisher of the resource can use the mobile phone 12 to submit the resource material of the resource to be released (hereinafter referred to as the resource to be released) to the server 11, so that the server 11 can obtain the attribute text of the resource from the resource material and build a resource index for the resource based on the index construction scheme of the embodiment of the present disclosure. For another example, the consumer of the resource can also use the mobile phone 13 or the mobile phone 14 to initiate a resource search request to the server 11, so that the server 11 can respond to the request and use the resource recall scheme described in the embodiment of the present disclosure to recall the corresponding target resource according to the resource index.
[0136] The client application of the resource consumption platform can be pre-installed on the electronic device so that the client can be started and run on the electronic device; of course, when an online "client" such as HTML5 technology is adopted, the client can be obtained and run without installing the corresponding application on the electronic device.
[0137] Among them, the resources described in the embodiments of the present disclosure may include movies, TV series, comics, advertisements, etc., and any resource may be in the form of text, audio, video, image, etc. For example, in the case where the above-mentioned resource is a video resource, the resource publisher may be the producer of the resource, such as the author, UP host, etc.; in the case where the above-mentioned resource is an advertisement, the resource publisher may be the producer or agent of the advertisement, and the advertisement may be for a certain product, activity or event, etc. In addition, the above-mentioned resource consumption platform may be UGC (User Generated Content), PGC (Professionally Generated Content) or OGC (Occupationally Generated Content), etc., and the embodiments of the present disclosure do not limit this.
[0138] Figure 2 This is a flowchart of an index construction method shown in an exemplary embodiment of the present disclosure. Figure 2 As shown, the method is applied to the server side of the resource consumption platform and may include the following steps 202-206.
[0139] Step 202: Acquire the attribute text of the resource to be published, where the attribute text corresponds to the resource attribute of the resource.
[0140] First, it should be noted that the index construction method described in the embodiments of this disclosure is applied to the resource publishing phase. That is, during the resource publishing phase, the server can construct a corresponding resource index for the resources to be published. Obviously, the resources in question are the unpublished resources to be published to the resource consumption platform. Once the resource index is constructed, the resources recorded in the resource index can be considered as published resources.
[0141] In addition, the resource attributes of the resources described in the embodiments of the present disclosure are the inherent attributes of the resource, and any attribute can be used to reflect the characteristics of the resource under a certain dimension. For example, if the resource is a product (virtual product or physical product), the resource attributes of the product may include product name, product category, product origin, product description, etc. For another example, if the resource is a video, the resource attributes of the video may be video name, video introduction, video subtitles, content keywords, etc., which will not be repeated here.
[0142] In one embodiment, the publisher of the resource can submit the resource material of the resource (i.e., the aforementioned resource to be published) to the resource consumption platform. Accordingly, the server can obtain the attribute text of the resource from the resource material after obtaining it. The publisher can submit the resource material in a variety of ways. For example, the publisher can upload the resource material to the server through the client used by itself, and the material can be pre-made by the client or other electronic devices. For another example, the publisher can also specify the storage path such as the download address of the resource material to the server through the client used by itself, so that the server can obtain the above-mentioned resource material by itself according to the storage path.
[0143] Furthermore, depending on the form of the resource material, the server can also use a variety of methods to obtain the attribute text of the resource from the resource material. For example, in the case where the resource material includes text, the server can directly use the text as the attribute text of the resource, wherein the above text can be used to describe the characteristic information of the resource. For example, in the case where the resource is an advertisement for a certain product, the text can be used to introduce the price, appearance, characteristics and other information of the product; in the case where the resource is an advertisement for a certain event, the text can be used to introduce the time, location, participants and other information of the event, which will not be repeated here.
[0144] For another example, when the resource material includes an image or a video, the server can identify the text contained in the image or the video screen of the video, and use the identified text as the attribute text of the resource, wherein, for the video, the server can first extract the video frame image from the video, and then identify the text contained in each video frame image. The text identified from the above image or video is the text element or text map contained in the image or video frame image. Specifically, the server can identify the text contained in the above image or video frame image through OCR (Optical Character Recognition) technology, which will not be repeated. In addition, when the above video contains a barrage file or a subtitle file, the server can also directly extract the barrage file or subtitle file from the video file, and obtain the corresponding barrage or subtitle text from the extracted file.
[0145] For another example, when the resource material includes audio, the server can use the text converted from the voice contained in the audio as the attribute text of the resource, wherein the audio can be an independent audio, or it can be an audio file extracted from the aforementioned video. Specifically, the server can use the speech recognition technology in the relevant technology to convert the speech into text, which will not be repeated here. In addition, when the audio is an audio file extracted from the aforementioned video, in order to avoid duplication of attribute text (such as the voice in the video is the voice corresponding to the subtitles), the server can also compare the attribute text converted from the audio file with the attribute text extracted from the aforementioned video frame image and remove duplication. In this way, even if multiple forms of resource materials are obtained, the server can also obtain the corresponding attribute text respectively to ensure the smooth completion of the resource index construction.
[0146] Step 204: extract attribute keywords of the resource from the attribute text.
[0147] In one embodiment, the resource to be published may have multiple resource attributes. Accordingly, the server can obtain the attribute text corresponding to the multiple resource attributes of the resource. Furthermore, the server can extract the attribute keywords corresponding to the various resource attributes from the attribute text corresponding to the various resource attributes of the resource. For example, in the case where the resource is an advertisement for a certain product, the advertisement may have multiple resource attributes such as product name, product category, product origin, and product description. In this case, the server can extract the corresponding attribute keywords for each of the above-mentioned resource attributes, such as name keywords, category keywords, origin keywords, description keywords, etc. In the case where the advertisement includes a video, the advertisement may also have resource attributes such as video content, and the server can extract video content keywords, etc., which will not be repeated here. In this way, the server can extract the attribute keywords corresponding to the various resource attributes, which helps to create resource indexes corresponding to the various resource attributes in a targeted manner. Retrieving target resources based on these resource indexes helps to achieve higher recall accuracy.
[0148] The following is an example of an advertisement for a certain brand XX television set as an example to illustrate the above process. The publisher of the advertisement can select a pre-made video in the client used by itself, enter the name, category, description and other text of the television set, and then upload the video and text to the server. Furthermore, the server can extract the attribute text corresponding to the various resource attributes of the advertisement from the above video and text in the manner of the aforementioned embodiment. For example, for resource attributes such as product name, product category, product description and video content, the attribute text corresponding to each resource attribute is "XX TV", "Electrical Living Room TV", "Has millions of OLED self-luminous pixels, capable of presenting more delicate and exquisite images" and "Uses self-luminous pixels, with more precise light control capabilities". Considering that the server usually maintains multiple resources, the resource index it creates usually contains multiple resources. Therefore, in order to avoid text confusion and facilitate index creation, the server can merge the attribute texts of the same resource into a record as the resource identifier of the resource (i.e., the resource ID below). For example, for the attribute text of the resource, the server can record it as resource id = {[XX TV]; [Electrical Living Room TV]; [Has millions of OLED self-luminous pixels, capable of presenting more delicate and exquisite images]; [Uses self-luminous pixels, has more precise light control capabilities]}.
[0149] Furthermore, for any of the aforementioned multiple resource attributes, the server can extract the attribute keywords corresponding to that resource attribute through word segmentation: first, the attribute text corresponding to the resource attribute is segmented, and then the attribute keywords corresponding to the resource attribute are determined based on the basic words obtained. In this way, the server can accurately obtain as many attribute keywords as possible.
[0150] Since attribute text may contain punctuation, which generally does not substantially affect the attributes of the resource, punctuation can be removed before segmenting the attribute text, and then segmenting the resulting plain text. Alternatively, segmenting the attribute text first and then removing punctuation is also possible, which will not be elaborated here.
[0151] Continuing from the above embodiment, the server can segment the attribute text recorded in the resource id and remove punctuation marks. The segmentation result can be resource id = {[XX / TV]; [appliance / living room / TV]; [has / millions / OLED / self-luminous / pixels / can / present / more / refined / delicate / images / pictures]; [uses / self-luminous / pixels / has / more / precise / light-control / capability]}.
[0152] Through the above processing, the basic words after word segmentation can be obtained. For example, the basic words corresponding to the product name are "XX" and "TV", and the basic words corresponding to the product category are "electrical appliances", "living room" and "TV", which will not be repeated. Based on the basic words corresponding to the various resource attributes obtained by the above word segmentation processing, the server can determine the attribute keywords corresponding to the various resource attributes in a variety of ways. Taking the multiple basic words corresponding to any resource attribute as an example, the server can determine each basic word as the attribute keyword corresponding to any resource attribute, such as the above "XX" and "TV" can be used as the attribute keywords for the resource attribute of the product name. Alternatively, the server can also determine the combined words obtained by combining multiple basic words as the attribute keywords corresponding to any resource attribute. For example, for the resource attribute of product category, "electrical appliances living room" or "living room electrical appliances" obtained by combining "electrical appliances" and "living room" can be used as the attribute keywords corresponding to the resource attribute of product category. The combined word "electrical appliances, living room, TV" can also be used as the attribute keyword corresponding to the resource attribute of product classification; it should be noted that the combined word "electrical appliances, living room, TV" can be obtained by combining the three basic words "electrical appliances", "living room" and "television", or by combining the basic word "electrical appliances" and the combined word "living room, TV", or by combining the basic word "television" and the combined word "electrical appliances, living room, TV", which will not be repeated here.
[0153] It is worth noting that to avoid reduced recall accuracy due to semantic differences between different resource attributes, for any resource attribute, the server can only use compound words derived from the base words corresponding to that resource attribute as the attribute keyword for that resource attribute, and try to avoid using compound words derived from the base words corresponding to other resource attributes, or compound words derived from the base words corresponding to that resource attribute with the base words corresponding to other resource attributes as the attribute keyword for that resource attribute. In other words, the compound words that serve as the attribute keyword for any resource attribute can only be derived from the base words corresponding to that resource attribute, and should not be derived from the base words corresponding to other resource attributes.
[0154] Specifically, the attribute keywords corresponding to any resource index may only include the basic words corresponding to the resource index. For example, the attribute keywords corresponding to the product name may only include the two basic words "XX" and "TV", or may only include the two combination words "XX TV" and "TV XX", or may also include at least one basic word of "XX" and "TV" and at least one combination word of "XX TV" and "TV XX". The embodiments of the present disclosure are not limited to this.
[0155] In the process of combining multiple base words to form a compound word, in order to prevent the semantics of the resulting compound word from significantly deviating from the true attributes of the resource, the base words contained in the same compound word may satisfy certain rules. For example, the relative positions of the base words contained in any compound word corresponding to any resource attribute may be consistent with the relative positions of the base words in all base words corresponding to any resource attribute. Taking the aforementioned video content as an example, all the basic words corresponding to the resource attribute are in the following order: "adopt", "self-luminous", "pixel", "have", "more", "precise", "of", "light control", and "ability"; for "light control" and "ability", it can be seen that "light control" is before "ability"; if "light control" and "ability" are combined, we can get the two combined words "light control ability" and "pixel light control". Obviously, the relative positions of the basic words in "light control ability" ("light control" is before "ability") are consistent (the same) with the relative positions of the two in all the basic words, while the relative positions of the basic words in "ability light control" ("ability" is before "light control") are inconsistent (opposite) with the relative positions of the two in all the basic words. Therefore, the server can use the combined word "light control ability" as the attribute keyword corresponding to the resource attribute of video content, and avoid using "ability light control" as its attribute keyword. It is understandable that the combination words obtained by combining in the original order usually have a strong correlation with the resource attributes of the resource, but after the order changes, the correlation becomes weaker, or even becomes meaningless (such as "light control ability" has a clear physical meaning, while "ability to control light" is meaningless). Therefore, the above-mentioned relative position restrictions can be used to ensure that the combination words have more accurate semantics, which in turn helps to improve the accuracy of subsequent resource recall.
[0156] For another example, the position interval between any two adjacent basic words among the multiple basic words in all the basic words corresponding to any one of the resource attributes may not be greater than the first interval threshold. Still taking the aforementioned video content as an example, it is advisable to record the position interval between adjacent basic words as one (in this case, the position interval between basic words is at least one). Then, from the order of all the aforementioned basic words, it can be seen that the position interval between "adopt" and "self-luminous" and the position interval between "self-luminous" and "pixel" are both one, while the position interval between "adopt" and "pixel" is two. If the first interval threshold is pre-set to one, then "adopt self-luminous" (or "self-luminous adopt") obtained by combining "adopt" and "self-luminous" can be used as the attribute keyword corresponding to the resource attribute of the video content, and "adopt pixels" (or "pixel adopt") obtained by combining "adopt" and "pixel" can be avoided as the attribute keyword corresponding to the resource attribute. Similarly, if the first interval threshold is pre-set to two, then the “precise light control” (or “precise light control”) obtained by combining “precision” and “light control”, the “light control ability” (or “ability light control”) obtained by combining “light control” and “ability”, and the “ability to control light” obtained by combining “light control”, “of” and “ability”, etc. can all be used as attribute keywords corresponding to the resource attribute of video content, while the “precise ability” (or “precise ability”) obtained by combining “precision” and “ability” should not be used as the corresponding attribute keyword of the resource attribute, which will not be repeated. This rule mainly takes into account this law: the farther the distance between multiple basic words in the same text, the weaker the semantic correlation between these basic words is generally. In this way, from the perspective of basic words, it is possible to avoid using combination words composed of basic words that are too far apart as attribute keywords, thereby ensuring that the attribute keywords have more accurate semantics while minimizing the number of attribute keywords corresponding to the same resource, which helps to streamline the structure of the constructed resource index, thereby improving retrieval efficiency and recall accuracy.
[0157] Similarly, there is also the following rule: the farther apart multiple characters are in the same text, the weaker the semantic relevance between these characters usually is. Regarding this rule, each basic word included in the same combined word can also satisfy the following rule: the character interval between any two adjacent characters of any two adjacent basic words among the multiple basic words is not greater than a second interval threshold in the attribute text corresponding to the resource attribute. Among them, the adjacent characters of any two adjacent basic words mentioned above are the last character of the previous basic word and the previous character of the next basic word among any two adjacent basic words. Still taking the foregoing video content as an example, let's denote the position interval between adjacent characters as one. From the order of all the foregoing basic words, it can be seen that among "adopt", "self-luminous", and "pixel", the position interval between the character "yong" and the character "zi" and the position interval between the character "guang" and the character "xiang" are both one, while the position interval between the character "yong" and the character "xiang" is four. If the first interval threshold is preset to be one (at this time, the position interval between characters is at least one), then "adopt self-luminous" (or "self-luminous adopt") obtained by combining "adopt" and "self-luminous" or "self-luminous pixel" (or "pixel self-luminous") obtained by combining "self-luminous" and "pixel" can be used as the attribute keyword corresponding to the resource attribute of the video content, and "adopt pixel" (or "pixel adopt") obtained by combining "adopt" and "pixel" can be avoided as the attribute keyword corresponding to this resource attribute. Similarly to the previous embodiment, this method can, from the perspective of characters, avoid using a combined word composed of basic words with characters that are too far apart as an attribute keyword, so as to minimize the number of attribute keywords corresponding to the same resource while ensuring that the attribute keyword has a relatively accurate semantics, which helps to streamline the structure of the constructed resource index and thus improve the retrieval efficiency and recall accuracy.
[0158] In the foregoing embodiments, the position interval, the first interval threshold, the second interval threshold, etc. can all be set according to the actual situation; in addition, for multiple basic words forming any combined word, they can only satisfy any one of the above multiple rules, or can also satisfy multiple of them at the same time. The embodiments of the present disclosure do not limit this.
[0159] For any attribute text, there is usually such a rule: the function words in the text usually do not have actual semantics, while the content words therein do have actual semantics. Based on this, when the server determines the attribute keywords corresponding to any resource attribute based on the basic words obtained through processing, it can determine the content words in the basic words as the attribute keywords corresponding to the resource attribute, and avoid determining the function words in the basic words as attribute keywords. Among them, the above-mentioned content words can include nouns, verbs, adjectives, pronouns, etc., and the above-mentioned function words can include adverbs, auxiliary words, prepositions, interjections, etc., which will not be repeated here. Taking the resource id corresponding to any of the above-mentioned word segmentation results as an example, the function words such as "can", "more", "of", and "have" can be eliminated. At this time, the resource id composed of the remaining content words = {[XX / TV]; [Electrical appliances / living room / TV]; [has / millions / OLED / self-luminous / pixels / presents / exquisite / delicate / image / picture]; [adopts / self-luminous / pixels / precise / light control / capability]}. Of course, this elimination process can be performed after the above-mentioned word segmentation processing and before determining the attribute keywords to ensure that the determined attribute keywords only contain content words with clear semantics, so as to further streamline the structure of the resource index to be constructed.
[0160] It should also be noted that the various embodiments of obtaining the attribute text of the resource and extracting the corresponding attribute keywords can also be completed by the client used by the publisher of the resource. Thus, the client can submit the resource specified by the user, the extracted attribute keywords, and the corresponding relationship between each attribute keyword and the corresponding resource attribute to the server, and the server will build a resource index based on the above resources, attribute keywords and corresponding relationships. It can be seen that this method puts the keyword preparation process before building the resource index in front (completed by the client) to reduce the data processing pressure on the server, which helps to improve the index construction efficiency of the server.
[0161] Step 206: construct a resource index corresponding to the resource attribute according to the corresponding relationship between the attribute keyword and the resource. The corresponding relationship is used to retrieve the resources recorded in the resource index.
[0162] When the attribute keywords corresponding to the resource attributes of the resource are obtained through the aforementioned embodiment, the server can construct a resource index corresponding to the resource attributes according to the corresponding relationship between the attribute keywords and the resource.
[0163] According to an embodiment of the present disclosure, during the release phase of a resource, the server of the resource consumption platform can obtain the attribute text corresponding to the resource attribute of the resource, and extract the attribute keywords of the resource therefrom, and then construct a resource index corresponding to the resource attribute based on the correspondence between the attribute keywords and the resource, and the correspondence can be used by the server to retrieve the resources recorded in the resource index. Among them, the resources recorded in the above resource index are the published resources, so the server can use the above resource index to retrieve each published resource. It can be seen that in the above release method, the publisher does not need to set any keywords for the resource to be released, but the server automatically obtains the attribute keywords based on the attribute text of the resource and constructs the corresponding resource index.
[0164] It is understandable that multiple attribute keywords of the resource can be obtained through the above-mentioned attribute text. Therefore, by retrieving resources through the resource index constructed according to the above-mentioned attribute keywords, a high recall rate can be achieved even for newly released resources, thereby having a good early recall effect in the cold start phase. In addition, because each attribute keyword involved in constructing the resource index corresponds to the resource attributes of the released resources, it is possible to ensure that each released resource is recalled according to the released resource attributes, thereby achieving a higher recall accuracy. It can be seen that compared with the solutions in the related art, this solution effectively solves the problems of low initial recall rate of resources and slow recall rate improvement, thereby helping to achieve efficient recall of resources.
[0165] The server can usually maintain multiple resources, so when creating a resource index corresponding to any resource attribute of the resource, resource indexes corresponding to resource attributes of other resources may have already been created. Therefore, the server can create a resource index corresponding to the resource attribute of the resource in a corresponding manner based on the resource index status and index content at the current moment.
[0166] In one embodiment, the server may first determine whether there is a resource index corresponding to the resource attribute. If it is determined that the resource index does not exist, the server may first construct a resource index corresponding to the resource attribute, then add the attribute keyword to the resource index, and add the resource to the resource set corresponding to the attribute keyword. Conversely, if it is determined that the resource index exists, the server may further determine whether any attribute keyword corresponding to the resource attribute and the resource set corresponding to the attribute keyword are recorded in the resource index: if any attribute keyword and its corresponding resource set are recorded in the resource index, the server may add the resource to the resource set; if any attribute keyword corresponding to the resource attribute is not recorded in the resource index, the server may add the attribute keyword to the resource index, and add the resource to the resource set corresponding to the attribute keyword.
[0167] It can be seen that any attribute keyword recorded in the above resource index has a corresponding relationship with each resource contained in the corresponding resource set, that is, the corresponding relationship between any attribute keyword and any resource can be reflected by the corresponding relationship between the attribute keyword and the resource set in which the resource is located. Among them, the server can save the above correspondence in the form of a list or the like, and the embodiment of the present disclosure is not limited to this. It should also be noted that, considering that the original file of the resource (such as a video file) usually has a large amount of data, in order to simplify the data volume of the resource index, the resource recorded in the resource index can be only the resource identifier, such as the resource id described in the above embodiment, or the resource number allocated to the resource by the resource consumption platform, etc., rather than the actual resource file, which will not be repeated.
[0168] Following the resource attribute of the product name in the aforementioned embodiment, let’s assume that the resource (i.e. the aforementioned advertisement for XX TV) is resource A1, and assume that all resource indexes created by the server are maintained locally on the server; as mentioned above, the attribute keywords corresponding to this resource attribute include “XX”, “TV” and “XX TV”. First, the server can first determine whether a resource index corresponding to the resource attribute of the product name already exists locally: if the resource index does not exist, the server can create a new resource index locally, and then add the attribute keyword to the resource index, and add the resource to the resource set corresponding to the attribute keyword. The structural diagram of the resource index corresponding to the newly created product name on the server can be as follows: Figure 3 As shown. Figure 3 As you can see, the resource index contains the three attribute keywords added by the server: "XX," "TV," and "XX TV." Furthermore, the resource identifier "A1" for resource A1 has been added to the resource collection corresponding to each attribute keyword. At this point, the resource index only contains resource A1 and no other resources.
[0169] Alternatively, if the server already has a resource index corresponding to the resource attribute of the product name, the server can further determine whether the resource index contains any attribute keyword corresponding to the resource attribute and the resource set corresponding to the attribute keyword. For example, if the resource index contains the attribute keyword "XX" and its corresponding resource set, the server can record the resource identifier of resource A1 in the resource set. Figure 4As shown, if the resource set corresponding to the attribute keyword "XX" records resource identifiers such as "A2", the server can add resource identifier "A1" to the resource set; the process of adding resource identifier "A1" to the attribute keyword "TV" is similar and will not be repeated here. For another example, if the attribute keyword "XX TV" and its corresponding resource set are not recorded in the resource index, the server can add the attribute keyword "XX TV" to the resource index and add the resource identifier "A1" to the resource set corresponding to the attribute keyword. Figure 4 As shown, if the attribute keyword "XX TV" does not exist in the resource index corresponding to the product name, the server can create this attribute keyword and add the resource identifier "A1" to it. Through the above process, for the three attribute keywords "XX," "TV," and "XX TV" in the resource index corresponding to the resource attribute of the product name, the resource identifier "A1" of resource A1 is added to the resource collection corresponding to each attribute keyword.
[0170] like Figure 4 As shown in the figure, the resource index corresponding to the resource attribute of product name can also include other attribute keywords such as "refrigerator" and their corresponding resource collections. However, because the resource keyword corresponding to the resource attribute of product name of resource A1 does not include "refrigerator", the resource identifier "A1" will not be added to the resource collection corresponding to the attribute keyword "refrigerator". Figure 4 As shown, the server can also save the resource index corresponding to the resource attribute of video content. Similarly, because the resource keywords corresponding to the resource attribute of video content of resource A1 include attribute keywords such as "OLED", "TV", "OLED TV" and "pixel", but do not include the attribute keyword "network", the server can add the resource identifier "A1" to the resource collections corresponding to the attribute keywords such as "OLED", "TV", "OLED TV" and "pixel" respectively, without adding the resource identifier to the resource collection corresponding to the attribute keyword "network", which will not be repeated here.
[0171] It is understandable that the server can also maintain resource indexes corresponding to various other resource attributes. Moreover, in the resource index corresponding to any resource attribute maintained by the server, the resource identifier of the newly released resource can be further added. Figure 3 As shown in the resource index, if the attribute keyword corresponding to the product name of a resource A8 to be released contains "TV", the server can add the resource identifier "A8" to the resource collection corresponding to "TV" in the resource index. Figure 4As shown in the resource index, if the attribute keyword corresponding to the video content of a resource A9 to be released contains "network", the server can add the resource identifier "A9" to the resource collection corresponding to "network" of the resource index, which will not be repeated here.
[0172] So far, the process of constructing the resource index corresponding to the resource attribute of the resource on the server side has been introduced. As mentioned above, after the resource index corresponding to the resource attribute of any resource is created, the resource can be considered to have been published, that is, the resource has become a published resource.
[0173] Based on the resource index constructed by the above solution, the server can recall the resources recorded in the resource index through the correspondence between the attribute keywords recorded therein and the resources. Figure 5 The flowchart of a resource recall method shown in FIG. 1 is used to describe the specific process of resource recall in detail.
[0174] like Figure 5 As shown, the method is applied to the server side of the resource consumption platform and may include the following steps 502-506.
[0175] Step 502: In response to a resource search request containing a search text corresponding to a resource attribute, a search keyword is determined according to the search text.
[0176] In one embodiment, a server may receive a resource search request containing a search text, which may be initiated by a user of a resource consumption platform through a client used by the user. The user may be a resource consumer (searching for resources published by others), a resource publisher (searching for resources published by the user), a backend administrator of the resource consumption platform (managing published resources), or a functional component deployed in the resource consumption platform (such as an advertisement recall component). Accordingly, the server may respond to the resource search request and determine a search keyword based on the search text.
[0177] Among them, if the search text contains a regular expression, the server can determine the search keyword based on the regular expression. For example, if the search text is "fuel car||electric car" or "fuel car electric car", because "||" and space represent "or", the server can determine "fuel car" and "electric car" as search keywords; for another example, if the search text is "car&&electric car" or, because "&&" represents "and", the server can determine "car and electric car" or "electric car and car" as search keywords; for another example, if the search text is "car-electric car" or, because "minus" represents "except", the server can determine "car" as the search keyword, but after retrieving the target resource based on "car", the part of the target resource corresponding to "electric car" should be eliminated, and the remaining target resources should be returned to the initiator of the request. Through the above regular expression, the user can accurately express his or her search intention for the published resources. Accordingly, the server can accurately determine the search keyword corresponding to the above search intention based on the expression, thereby ensuring the accuracy of resource recall to a certain extent.
[0178] On the contrary, if the search text does not contain a regular expression, the server can perform word segmentation on the search text and determine the search keyword based on the basic search terms obtained through the processing. Among them, the server can determine each basic search term obtained through the processing as the search keyword respectively; or, it can also determine the combined search term obtained by combining multiple basic search terms obtained through the processing as the search keyword. The above-mentioned specific process of performing word segmentation on the search text and determining the search keyword based on the basic search terms is similar to the process of performing word segmentation on the attribute text and determining the attribute keywords based on the basic terms as described in the aforementioned embodiment, and will not be repeated here. Assuming that the above-mentioned search text is "XXOLED TV", the corresponding search keywords that can be determined in the above manner include "XX", "OLED", "TV", "XX TV" and "OLED TV".
[0179] Step 504, determine the target resource corresponding to the search keyword from the resources of the resource index record corresponding to the resource attribute, wherein the resource index is constructed based on the correspondence between the resource to be published and the attribute keyword of the resource, and the attribute keyword is extracted from the attribute text corresponding to the resource attribute of the resource.
[0180] As can be seen from the index construction method described above in this disclosure, the server can obtain the attribute text corresponding to the resource attributes of the resource to be released, and extract the attribute keywords of the resource from it, and then construct a resource index corresponding to the resource attributes based on the correspondence between the attribute keywords and the resource. In fact, the resource index used in the resource recall method described in this disclosure can be constructed using the index construction scheme described in the aforementioned embodiments, and will not be repeated here.
[0181] In one embodiment, the attribute text of the resource to be published may correspond to multiple resource attributes of the resource. In this case, the server can determine the target resource corresponding to the search keyword from the resources recorded in each resource index corresponding to the multiple resource attributes. In this way, the server can determine the target resource as accurately as possible from multiple attribute dimensions to accurately respond to the resource search request, thereby achieving a better resource recall effect. It can be understood that when any search keyword is recorded in any resource index, the server can retrieve the target resource corresponding to the search keyword from the resource index.
[0182] In one embodiment, the above-mentioned multiple resource attributes can be respectively set with corresponding attribute weights, and the weights can be default values of the server or set by managers of the resource consumption platform. In this case, the server can determine the target resource corresponding to any search keyword from the resources recorded in each resource index corresponding to the multiple resource attributes in the following manner. For example, the server can first determine the multiple resources corresponding to the any search keyword in the resource index corresponding to at least one resource attribute; then determine the score of each resource in the multiple resources according to the attribute weight of the at least one resource attribute, and finally determine the target resource corresponding to the search keyword from the multiple resources according to the score. In this way, the target resource can be determined more accurately by the score.
[0183] Taking the process of determining the score of any resource based on the attribute weight of at least one resource attribute as an example, when any resource is recorded in a resource index corresponding to one resource attribute, the server may use the attribute weight of the resource attribute as the score of the resource; and when any resource is recorded in resource indexes corresponding to multiple resource attributes respectively, the server may use the accumulated value of the attribute weights of the multiple resource attributes as the score of the resource.
[0184] Still Figure 4Taking the resource indexes corresponding to the two resource attributes of product name and video content as an example, it can be seen that the attribute weights corresponding to product name and video content are 1 and 2 respectively. Continuing from the above embodiment, because the search keywords include "XX", "OLED", "TV", "XX TV" and "OLED TV", where the attribute keywords "XX", "TV" and "XX TV" are recorded in the resource index corresponding to the product name, and "OLED", "TV" and "OLED TV" are recorded in the resource index corresponding to the video content, the server can first calculate the score of each resource in the resource set of the above attribute keywords. Taking A2 as an example, because A2 is recorded once in the attribute keywords "XX" and "TV" of the resource index corresponding to the product name, the score corresponding to A2 is F2=1*1+1*1=2; similarly, the scores of each resource corresponding to the corresponding attribute keywords can be calculated as follows: F1=9, F2=2, F3=3, F4=1, F5=1 (the scores of other resources indicated by ellipsis in the figure are not shown).
[0185] Furthermore, the server can sort the various resources according to the scores, and determine the target resources based on the sorting results. For example, resources with scores higher than the score threshold can be used as target resources, or a preset number of resources with the highest scores can be used as target resources. For example, the order of sorting from large to small according to the above scores is as follows: F1, F3, F2, F4, F5, among which F4 and F5 are tied. At this time, if the score threshold is 2 points, F1, F3 and F2 can be used as target resources; or, if the preset number is 4, F1, F3, F2 and F4 (or F1, F3, F2 and F5) can be used as target resources. Of course, it is also possible to simultaneously meet the score threshold of 2 points and the preset number of 2. In this case, F1 and F3 can be used as target resources, which will not be repeated.
[0186] In another embodiment, the server can also determine the target resource corresponding to any search keyword from the resources of the resource index records corresponding to various resource attributes in the following manner. For example, if any search keyword is the same as any attribute keyword of any resource index record, the resource corresponding to any attribute keyword can be determined as the target resource corresponding to any search keyword. Figure 4Taking the aforementioned search keywords as an example, since the attribute keywords "XX", "TV" and "XX TV" are recorded in the resource index corresponding to the product name, "OLED", "TV" and "OLED TV" are recorded in the resource index corresponding to the video content, all servers can use all resources of the resource set corresponding to "XX", "TV" and "XX TV" in the resource index corresponding to the product name, as well as all resources of the resource set corresponding to "OLED", "TV" and "OLED TV" in the resource index corresponding to the video content as target resources. Of course, since the same resources may exist in the resource sets of different attribute keywords, deduplication processing can also be performed, and the resource identifiers of the target resources finally determined include A1, A2, A3 and A6 (the scores of other resources indicated by ellipsis in the figure are not shown).
[0187] For another example, the server can also determine the correlation between any of the search keywords and the attribute keywords of each resource index record, and determine the target resource from the resources of each resource index record based on the correlation. Taking the search keyword "XX" and the attribute keywords in the resource index corresponding to the product name as an example, the server can determine the similarity between the attribute keyword "XX" and the attribute keywords "XX", "TV", "XX TV" and "Refrigerator" in the resource index in turn, thereby determining the similarity relationship as follows: "XX" > "XX TV" > "TV" > "Refrigerator". Furthermore, the server can choose to use only the resources corresponding to "XX" as the target resources, or use both the resources corresponding to "XX" and "XX TV" as the target resources based on the size of the similarity, which will not be repeated here.
[0188] Step 506: Return the target resource to the initiator of the resource search request.
[0189] As previously mentioned, each resource recorded in the resource index can be a resource identifier, not an actual resource file. Therefore, for the target resource identified in the above manner, the server can retrieve the target resource's resource file (such as a video file, audio file, image file, etc.) from the corresponding storage space and return the resource file to the initiator of the resource search request as a response to the request.
[0190] According to an embodiment of the present disclosure, after a resource is published, the server of the resource consumption platform can recall the resource based on the resource index generated in the aforementioned manner. Specifically, the server can respond to a resource search request containing search text corresponding to a resource attribute, determine a search keyword based on the search text, then determine the target resource corresponding to the search keyword from the resources recorded in the resource index corresponding to the resource attribute, and then return the target resource to the initiator of the resource search request.
[0191] As can be seen, the above search text can be used to obtain search keywords corresponding to at least one resource attribute, and then the target resource can be retrieved through the resource index constructed based on the above attribute keywords. This not only has a high recall rate for newly released resources, thus having a good early recall effect during the cold start phase; it can also ensure that each published resource is recalled according to its published resource attributes, thereby achieving a high recall accuracy. As can be seen, compared with the solutions in the related art, this solution effectively solves the problems of low initial resource recall rate and slow recall rate improvement, thereby helping to achieve efficient resource recall.
[0192] It's also understandable that the aggressive strategies used in the aforementioned related technologies, due to the lack of effective keyword screening, result in publishers wasting significant resources on ineffective traffic, resulting in a relatively low return on investment during the resource release and recall process. Conservative strategies, however, suffer from a low recall rate due to the extremely small number of keywords. This is particularly true during the cold start phase of newly released resources, where the recall rate improves slowly, resulting in poor initial recall results.
[0193] With the resource recall method described in the embodiment of the present disclosure, in the process of recalling resources using the resource index constructed by the index construction method, since each attribute keyword involved in constructing the resource index corresponds to the resource attributes of the published resources, each published resource can be recalled according to the resource attributes, thereby achieving a higher recall accuracy, helping to avoid traffic waste, and improving the input-output ratio of the resource release and recall process to a certain extent.
[0194] Corresponding to the aforementioned embodiments of the index construction method and the resource recall method, the present disclosure also proposes embodiments of an index construction device and a resource recall device.
[0195] Figure 6 This is a schematic block diagram of an index building device according to an embodiment of the present disclosure. The device can be applied to a server, which can be a physical server including an independent host, or a virtual server hosted by a host cluster, a cloud server, etc.
[0196] like Figure 6 As shown, the index building device may include:
[0197] The text acquisition unit 601 is configured to acquire the attribute text of the resource to be published, wherein the attribute text corresponds to the resource attribute of the resource;
[0198] A keyword extraction unit 602 is configured to extract attribute keywords of the resource from the attribute text;
[0199] The index building unit 603 is configured to build a resource index corresponding to the resource attribute according to the correspondence between the attribute keyword and the resource, and the correspondence is used to retrieve the resources recorded in the resource index.
[0200] Optionally,
[0201] The text acquisition unit 601 is further configured to: acquire attribute texts corresponding to multiple resource attributes of the resource to be published;
[0202] The keyword extraction unit 602 is further configured to extract attribute keywords corresponding to various resource attributes from the attribute texts corresponding to various resource attributes.
[0203] Optionally, the keyword extraction unit 602 is further configured to:
[0204] The attribute text corresponding to any resource attribute is segmented, and the attribute keyword corresponding to the any resource attribute is determined based on the basic words obtained from the segmentation.
[0205] Optionally, the keyword extraction unit 602 is further configured to:
[0206] Determine each basic word obtained by processing as an attribute keyword corresponding to any resource attribute; or
[0207] A combined word obtained by combining the processed multiple basic words is determined as an attribute keyword corresponding to any one of the resource attributes.
[0208] Optionally, the multiple basic words in any combination word satisfy at least one of the following:
[0209] The relative positions of the multiple basic words in the combined word are consistent with the relative positions of the multiple basic words in all basic words corresponding to any one resource attribute;
[0210] The position interval between any two adjacent basic words among the multiple basic words in all basic words corresponding to any one resource attribute is not greater than a first interval threshold;
[0211] A character interval between adjacent characters of any two adjacent basic words among the multiple basic words in the attribute text corresponding to any resource attribute is not greater than a second interval threshold.
[0212] Optionally, the keyword extraction unit 602 is further configured to:
[0213] The content words in the basic words are determined as attribute keywords corresponding to any one of the resource attributes, and function words in the basic words are avoided from being determined as attribute keywords corresponding to any one of the resource attributes.
[0214] Optionally, the index building unit 603 is further configured to:
[0215] If a resource index corresponding to the resource attribute does not exist, construct a resource index corresponding to the resource attribute, add the attribute keyword to the constructed resource index, and add the resource to the resource set corresponding to the attribute keyword;
[0216] In the case where a resource index corresponding to the resource attribute exists, if the resource index records any attribute keyword corresponding to the resource attribute and a resource set corresponding to the attribute keyword, then add the resource to the resource set; or
[0217] In the case where there is a resource index corresponding to the resource attribute, if any attribute keyword corresponding to the resource attribute is not recorded in the resource index, the attribute keyword is newly added to the resource index, and the resource is added to the resource set corresponding to the attribute keyword.
[0218] Optionally, the text acquisition unit 601 is further configured to:
[0219] The resource material submitted by the publisher of the resource is obtained, and the attribute text of the resource is obtained from the resource material.
[0220] Optionally, the text acquisition unit 601 is further configured to:
[0221] In the case where the resource material includes text, the text is used as the attribute text of the resource;
[0222] In the case where the resource material includes an image or a video, the text recognized from the image or the video screen of the video is used as the attribute text of the resource;
[0223] In the case where the resource material includes audio, text converted from the voice contained in the audio is used as the attribute text of the resource.
[0224] Figure 7 This is a schematic block diagram of a resource recall device according to an embodiment of the present disclosure. The device can be applied to a server, which can be a physical server including an independent host, or a virtual server hosted by a host cluster, a cloud server, etc.
[0225] like Figure 7 As shown, the resource recall device may include:
[0226] The keyword determination unit 701 is configured to respond to a resource search request containing a search text corresponding to a resource attribute and determine a search keyword based on the search text;
[0227] a resource determining unit 702 configured to determine a target resource corresponding to the search keyword from resources recorded in a resource index corresponding to the resource attribute, wherein the resource index is constructed based on a correspondence between a resource to be published and an attribute keyword of the resource, and the attribute keyword is extracted from an attribute text corresponding to the resource attribute of the resource;
[0228] The resource returning unit 703 is configured to return the target resource to the initiator of the resource search request.
[0229] Optionally, the keyword determination unit 701 is further configured to:
[0230] If the search text contains a regular expression, determining the search keyword according to the regular expression;
[0231] If the search text does not contain a regular expression, the search text is segmented, and the search keyword is determined based on the basic search terms obtained through the segmentation process.
[0232] Optionally, the keyword determination unit 701 is further configured to:
[0233] Determine each basic search term obtained through processing as the search keyword; or
[0234] A combined search term obtained by combining the processed multiple basic search terms is determined as the search keyword.
[0235] Optionally, the attribute text corresponds to multiple resource attributes of the resource, and the resource determination unit 702 is further configured to:
[0236] The target resources corresponding to the search keyword are respectively determined from the resources of each resource index record corresponding to the multiple resource attributes.
[0237] Optionally, the multiple resource attributes are respectively set with corresponding attribute weights, and the resource determination unit 702 is further configured to:
[0238] Determine a plurality of resources corresponding to any search keyword and recorded in a resource index corresponding to at least one resource attribute;
[0239] Determining a score for each resource in the plurality of resources according to an attribute weight of the at least one resource attribute;
[0240] A target resource corresponding to any one of the search keywords is determined from the multiple resources according to the score.
[0241] Optionally, the resource determining unit 702 is further configured to:
[0242] In the case where any of the resources is recorded in a resource index corresponding to a resource attribute, the attribute weight of the resource attribute is used as the score of the resource;
[0243] In the case that any resource is recorded in resource indexes corresponding to a plurality of resource attributes, the accumulated value of the attribute weights of the plurality of resource attributes is used as the score of the resource.
[0244] Optionally, the resource determining unit 702 is further configured to:
[0245] In the case where any search keyword is identical to any attribute keyword of any resource index record, the resource corresponding to any attribute keyword is determined as the target resource corresponding to any search keyword; or
[0246] The relevance between any one of the search keywords and the attribute keywords of each resource index record is determined, and the target resource is determined from the resources of each resource index record according to the relevance.
[0247] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0248] An embodiment of the present disclosure further provides an electronic device, including:
[0249] processor;
[0250] a memory for storing instructions executable by the processor;
[0251] The processor is configured to execute the instructions to implement the index construction method or resource recall method as described in any of the above embodiments.
[0252] An embodiment of the present disclosure further provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the index construction method or resource recall method described in any of the above embodiments.
[0253] An embodiment of the present disclosure further provides a computer program product, including a computer program and / or instructions, which implement the above-mentioned index construction method or resource recall method when executed by a processor.
[0254] Figure 88 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0255] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 818 .
[0256] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-described index construction method or resource recall method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0257] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0258] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0259] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0260] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 818. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0261] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0262] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect changes in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and temperature changes of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0263] The image acquisition component 816 can be used to collect image data of the subject to form an image of the subject, and can perform necessary processing on the image. The image acquisition component 816 can include a camera module. The image sensor (Sensor) in the camera module senses the light from the subject through the lens, and provides the obtained light-sensing data to the image signal processor (ISP, Image Signal Processing), which generates an image corresponding to the subject based on the light-sensing data. The above-mentioned image sensor can be a CMOS sensor or a CCD sensor. Of course, it can also be an infrared sensor, a depth sensor, etc.; the camera module can be built into the electronic device 800, or it can be an external module of the electronic device 800; the above-mentioned ISP can be built into the camera module, or it can be externally mounted in the above-mentioned electronic device (not in the camera module).
[0264] The communication component 818 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 818 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 818 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0265] In one embodiment of the present disclosure, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned index construction method or resource recall method.
[0266] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the electronic device 800 to perform the above method. Alternatively, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0267] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0268] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0269] It should be noted that, in the present disclosure, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. The terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0270] The above is a detailed introduction to the methods and devices provided in the embodiments of the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the methods and core ideas of the present disclosure. At the same time, for those skilled in the art, according to the ideas of the present disclosure, there may be changes in the specific implementation methods and application scopes. In summary, the content of the present disclosure should not be understood as a limitation of the present disclosure.
Claims
1. An index construction method, characterized in that: include: Acquire the attribute text of the resource to be published, wherein the attribute text corresponds to the resource attribute of the resource; Extracting attribute keywords of the resource from the attribute text; Building a resource index corresponding to the resource attribute according to the correspondence between the attribute keyword and the resource, wherein the correspondence is used to retrieve the resource recorded in the resource index; The obtaining of the attribute text of the resource to be published includes: obtaining the attribute texts corresponding to the multiple resource attributes of the resource to be published; The extracting the attribute keywords of the resource from the attribute text includes: extracting the attribute keywords corresponding to the various resource attributes from the attribute texts corresponding to the various resource attributes; Extracting attribute keywords corresponding to any resource attribute from the attribute text corresponding to the resource attribute, including: performing word segmentation processing on the attribute text corresponding to the resource attribute, and determining the attribute keywords corresponding to the resource attribute according to the basic words obtained by the processing; The method of determining the attribute keyword corresponding to any resource attribute based on the processed basic words includes: determining each processed basic word as the attribute keyword corresponding to any resource attribute; and determining a combined word obtained by combining multiple processed basic words as the attribute keyword corresponding to any resource attribute.
2. The method according to claim 1, characterized in that Multiple basic words in any combination of words satisfy at least one of the following: The relative positions of the multiple basic words in the combined word are consistent with the relative positions of the multiple basic words in all the basic words corresponding to any one of the resource attributes; The position interval between any two adjacent basic words among the multiple basic words in all basic words corresponding to any one resource attribute is not greater than a first interval threshold; The character interval between adjacent characters of any two adjacent basic words among the multiple basic words in the attribute text corresponding to any resource attribute is not greater than a second interval threshold.
3. The method according to claim 1, characterized in that The determining the attribute keyword corresponding to any resource attribute according to the basic word obtained through processing includes: Determine the content words in the basic words as the attribute keywords corresponding to any one of the resource attributes, and avoid determining the function words in the basic words as the attribute keywords corresponding to any one of the resource attributes.
4. The method according to claim 1, characterized in that: The step of constructing a resource index corresponding to the resource attribute according to the corresponding relationship between the attribute keyword and the resource includes: If there is no resource index corresponding to the resource attribute, construct a resource index corresponding to the resource attribute, add the attribute keyword to the constructed resource index, and add the resource to the resource set corresponding to the attribute keyword; In the case where there is a resource index corresponding to the resource attribute, if the resource index records any attribute keyword corresponding to the resource attribute and a resource set corresponding to the attribute keyword, then add the resource to the resource set; or, In the case where there is a resource index corresponding to the resource attribute, if any attribute keyword corresponding to the resource attribute is not recorded in the resource index, the attribute keyword is newly added to the resource index, and the resource is added to the resource set corresponding to the attribute keyword.
5. The method according to claim 1, characterized in that The step of obtaining the attribute text of the resource to be published includes: The resource material submitted by the publisher of the resource is obtained, and the attribute text of the resource is obtained from the resource material.
6. The method according to claim 5, characterized in that The acquiring of the attribute text of the resource from the resource material includes at least one of the following: In the case where the resource material includes text, the text is used as the attribute text of the resource; In the case where the resource material includes an image or a video, the text recognized from the image or the video screen of the video is used as the attribute text of the resource; In the case where the resource material includes audio, the text converted from the voice contained in the audio is used as the attribute text of the resource.
7. A resource recall method, characterized in that: include: In response to a resource search request including a search text corresponding to a resource attribute, determining a search keyword according to the search text; Determine the target resource corresponding to the search keyword from the resources recorded in the resource index corresponding to the resource attribute, wherein the resource index is constructed according to the correspondence between the resource to be released and the attribute keyword of the resource, the attribute keyword is extracted from the attribute text corresponding to various resource attributes, the attribute keyword is a word segmentation process performed on the attribute text corresponding to any resource attribute, and the attribute keyword corresponding to any resource attribute is determined according to the basic words obtained by the process; the determining the attribute keyword corresponding to any resource attribute according to the basic words obtained by the process includes: determining each basic word obtained by the process as the attribute keyword corresponding to any resource attribute; determining a combined word obtained by combining a plurality of basic words obtained by the process as the attribute keyword corresponding to any resource attribute; The target resource is returned to the initiator of the resource search request.
8. The method according to claim 7, characterized in that The step of determining the search keyword according to the search text includes: If the search text contains a regular expression, determining the search keyword according to the regular expression; If the search text does not contain a regular expression, the search text is segmented, and the search keyword is determined based on the basic search terms obtained through the processing.
9. The method according to claim 8, characterized in that The step of determining the search keyword based on the basic search term obtained through processing includes: Determine each basic search term obtained through processing as the search keyword; or, A combined search term obtained by combining the processed plurality of basic search terms is determined as the search keyword.
10. The method according to claim 7, characterized in that The attribute text corresponds to a plurality of resource attributes of the resource, and determining the target resource corresponding to the search keyword from the resources of the resource index record corresponding to the resource attributes includes: The target resources corresponding to the search keyword are determined respectively from the resources of each resource index record corresponding to the multiple resource attributes.
11. The method according to claim 10, characterized in that The plurality of resource attributes are respectively provided with corresponding attribute weights, and a target resource corresponding to any search keyword is determined from the resources of each resource index record corresponding to the plurality of resource attributes, including: Determine a plurality of resources corresponding to any one of the search keywords and recorded in a resource index corresponding to at least one resource attribute; Determining a score for each resource in the plurality of resources according to an attribute weight of the at least one resource attribute; A target resource corresponding to any one of the search keywords is determined from the multiple resources according to the score.
12. The method according to claim 11, characterized in that Determining the score of any resource according to the attribute weight of the at least one resource attribute includes: In the case where any resource is recorded in a resource index corresponding to a resource attribute, the attribute weight of the resource attribute is used as the score of the resource; In the case that any resource is recorded in resource indexes corresponding to a plurality of resource attributes respectively, the accumulated value of the attribute weights of the plurality of resource attributes is used as the score of the resource.
13. The method according to claim 10, characterized in that Determining a target resource corresponding to any search keyword from the resources of each resource index record corresponding to the multiple resource attributes includes: In the case where any of the search keywords is the same as any of the attribute keywords of any of the resource index records, the resource corresponding to any of the attribute keywords is determined as the target resource corresponding to any of the search keywords; or The relevance between any of the search keywords and the attribute keywords of each resource index record is determined, and the target resource is determined from the resources of each resource index record according to the relevance.
14. An index building device, characterized in that: include: A text acquisition unit, configured to acquire an attribute text of a resource to be published, wherein the attribute text corresponds to a resource attribute of the resource; A keyword extraction unit, configured to extract attribute keywords of the resource from the attribute text; An index building unit, configured to build a resource index corresponding to the resource attribute according to the corresponding relationship between the attribute keyword and the resource, wherein the corresponding relationship is used to retrieve the resource recorded in the resource index; The text acquisition unit is further configured to: acquire attribute texts corresponding to a plurality of resource attributes of the resource to be published; The keyword extraction unit is further configured to: extract attribute keywords corresponding to various resource attributes from the attribute texts corresponding to various resource attributes; The keyword extraction unit is further configured to: perform word segmentation processing on the attribute text corresponding to any resource attribute, and determine the attribute keyword corresponding to any resource attribute according to the basic words obtained by the processing; The keyword extraction unit is further configured to: determine each basic word obtained through processing as an attribute keyword corresponding to any one of the resource attributes; or determine a combined word obtained by combining multiple basic words obtained through processing as an attribute keyword corresponding to any one of the resource attributes.
15. The device according to claim 14, characterized in that Multiple basic words in any combination of words satisfy at least one of the following: The relative positions of the multiple basic words in the combined word are consistent with the relative positions of the multiple basic words in all the basic words corresponding to any one of the resource attributes; The position interval between any two adjacent basic words among the multiple basic words in all basic words corresponding to any one resource attribute is not greater than a first interval threshold; The character interval between adjacent characters of any two adjacent basic words among the multiple basic words in the attribute text corresponding to any resource attribute is not greater than a second interval threshold.
16. The device according to claim 14, characterized in that The keyword extraction unit is further configured to: Determine the content words in the basic words as the attribute keywords corresponding to any one of the resource attributes, and avoid determining the function words in the basic words as the attribute keywords corresponding to any one of the resource attributes.
17. The device according to claim 14, characterized in that The index building unit is further configured to: If there is no resource index corresponding to the resource attribute, construct a resource index corresponding to the resource attribute, add the attribute keyword to the constructed resource index, and add the resource to the resource set corresponding to the attribute keyword; In the case where there is a resource index corresponding to the resource attribute, if the resource index records any attribute keyword corresponding to the resource attribute and a resource set corresponding to the attribute keyword, then add the resource to the resource set; or, In the case where there is a resource index corresponding to the resource attribute, if any attribute keyword corresponding to the resource attribute is not recorded in the resource index, the attribute keyword is newly added to the resource index, and the resource is added to the resource set corresponding to the attribute keyword.
18. The device according to claim 14, characterized in that The text acquisition unit is further configured to: The resource material submitted by the publisher of the resource is obtained, and the attribute text of the resource is obtained from the resource material.
19. The device according to claim 18, characterized in that The text acquisition unit is further configured to: In the case where the resource material includes text, the text is used as the attribute text of the resource; In the case where the resource material includes an image or a video, the text recognized from the image or the video screen of the video is used as the attribute text of the resource; In the case where the resource material includes audio, the text converted from the voice contained in the audio is used as the attribute text of the resource.
20. A resource recall device, characterized in that: The device comprises: A keyword determination unit, configured to respond to a resource search request containing a search text corresponding to a resource attribute, and determine a search keyword according to the search text; A resource determination unit is configured to determine a target resource corresponding to the search keyword from resources recorded in a resource index corresponding to the resource attribute, wherein the resource index is constructed according to a correspondence between a resource to be published and an attribute keyword of the resource, the attribute keyword is extracted from an attribute text corresponding to a resource attribute of the resource, and the attribute keyword is each basic word obtained by performing word segmentation processing on an attribute text corresponding to any one of multiple resource attributes of the resource, and a combined word obtained by combining multiple basic words; The resource returning unit is configured to return the target resource to the initiator of the resource search request.
21. The device according to claim 20, characterized in that The keyword determination unit is further configured to: If the search text contains a regular expression, determining the search keyword according to the regular expression; If the search text does not contain a regular expression, the search text is segmented, and the search keyword is determined based on the basic search terms obtained through the processing.
22. The device according to claim 21, characterized in that The keyword determination unit is further configured to: Determine each basic search term obtained through processing as the search keyword; or, A combined search term obtained by combining the processed plurality of basic search terms is determined as the search keyword.
23. The device according to claim 20, characterized in that The attribute text corresponds to a plurality of resource attributes of the resource, and the resource determination unit is further configured to: The target resources corresponding to the search keyword are determined respectively from the resources of each resource index record corresponding to the multiple resource attributes.
24. The device according to claim 23, characterized in that The multiple resource attributes are respectively provided with corresponding attribute weights, and the resource determination unit is further configured to: Determine a plurality of resources corresponding to any search keyword and recorded in a resource index corresponding to at least one resource attribute; Determining a score for each resource in the plurality of resources according to an attribute weight of the at least one resource attribute; A target resource corresponding to any one of the search keywords is determined from the multiple resources according to the score.
25. The device according to claim 24, characterized in that The resource determination unit is further configured to: In the case where any resource is recorded in a resource index corresponding to a resource attribute, the attribute weight of the resource attribute is used as the score of the resource; In the case that any resource is recorded in resource indexes corresponding to a plurality of resource attributes respectively, the accumulated value of the attribute weights of the plurality of resource attributes is used as the score of the resource.
26. The device according to claim 23, characterized in that The resource determination unit is further configured to: In the case where any search keyword is the same as any attribute keyword of any resource index record, the resource corresponding to the any attribute keyword is determined as the target resource corresponding to the any search keyword; or The relevance between any of the search keywords and the attribute keywords of each resource index record is determined, and the target resource is determined from the resources of each resource index record according to the relevance.
27. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the index construction method according to any one of claims 1 to 6 or the resource recall method according to any one of claims 7 to 13.
28. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the index building method as described in any one of claims 1 to 6 or the resource recall method as described in any one of claims 7 to 13.
29. A computer program product comprising a computer program and / or instructions, characterized in that When the computer program and / or the instructions are executed by a processor, the index building method according to any one of claims 1 to 6 or the resource recall method according to any one of claims 7 to 13 is implemented.
Citation Information
Patent Citations
Network resource searching method and system
CN101097578A
User resource uploading processing method and apparatus
CN104978419A
Resource searching method and apparatus
CN105354283A