Content identification method, device, equipment and storage medium

By constructing initial and candidate recognition patterns, automatically learning and combining to form target recognition patterns, the problems of low accuracy and poor applicability caused by relying on artificial timeliness classification in the prior art are solved, and content timeliness recognition with high accuracy and wide applicability are achieved.

CN113704568BActive Publication Date: 2025-08-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110372174.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-07
Publication Date
2025-08-08
Estimated Expiration
2041-04-07

AI Technical Summary

Technical Problem

In the prior art, information platforms rely on the number and categories of timeliness classifications provided by human subjective or experience when identifying the timeliness of content, resulting in low accuracy and poor applicability.

Method used

By constructing the initial recognition mode and candidate recognition mode, using multiple first timely keywords in the preset timely vocabulary, we automatically learn and combine to form a target recognition mode to identify the timeliness of content and avoid human intervention.

Benefits of technology

It improves the accuracy and applicability of content timeliness recognition, can be applied to the timeliness recognition of any content, reduces manslaughter and omits complex keyword scenarios, and improves the accuracy and applicability of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113704568B_ABST
    Figure CN113704568B_ABST
Patent Text Reader

Abstract

The present application relates to a content recognition method, apparatus, device and storage medium, and belongs to the field of natural language processing technology of artificial intelligence. The method includes: obtaining an initial recognition pattern, which is constructed based on multiple first timeliness keywords with the same first preset timeliness value; transforming the initial recognition pattern according to the part of speech of the first timeliness keyword to obtain a candidate recognition pattern; using the initial recognition pattern and the candidate recognition pattern to recognize the test content respectively, and determining the target recognition pattern from the candidate recognition pattern according to the recognition result; using the target recognition pattern to recognize the content to be recognized to determine whether the content to be recognized has the first preset timeliness value. The present application can avoid relying on artificially provided timeliness classification numbers and categories, and can be applied to the timeliness recognition of any content while improving the accuracy, thereby improving applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a content recognition method, apparatus, device, and storage medium. Background Art

[0002] Information is valuable information that users can access and utilize in a relatively short period of time. To recommend relevant and relevant information to users, information platforms must process massive amounts of content daily, identify its timeliness, and distribute it to products like Kandian, Browser, and Express. Therefore, timeliness identification directly impacts the quality of information push, which in turn influences metrics like click-through rate (CTR), user dwell time, and even user impressions of the product.

[0003] Technologies for determining the timeliness of content rely on timeliness data such as the number and categories of timeliness classifications provided by humans subjectively or through experience, or only match words related to time, resulting in low accuracy and poor applicability. Summary of the Invention

[0004] The present application provides a content identification method, apparatus, device and storage medium, which can avoid relying on manually provided time classification numbers and categories. While improving accuracy, it can be applied to the timeliness identification of any content, thereby improving applicability.

[0005] In one aspect, the present application provides a content identification method, the method comprising:

[0006] Acquire an initial recognition pattern, where the initial recognition pattern is constructed based on a plurality of first time-sensitive keywords in a preset time-sensitive vocabulary, where the plurality of first time-sensitive keywords have the same first preset time-sensitive value;

[0007] transforming the initial recognition pattern according to the part of speech of the first timeliness keyword to obtain a candidate recognition pattern;

[0008] Using the initial recognition pattern to identify the content to be tested in the test set, obtaining a first timeliness test result of the initial recognition pattern; and using the candidate recognition pattern to identify the content to be tested in the test set, obtaining a second timeliness test result of the candidate recognition pattern; wherein the content to be tested has the first preset timeliness value;

[0009] Determining a target recognition mode from the candidate recognition modes according to the first timeliness test result and the second timeliness test result;

[0010] The target recognition mode is used to recognize the content to be recognized, so as to determine a timeliness recognition result of the content to be recognized, wherein the timeliness recognition result indicates whether the content to be recognized has the first preset timeliness value.

[0011] Another aspect provides a content identification device, the device comprising:

[0012] An initial pattern acquisition module, configured to acquire an initial recognition pattern, wherein the initial recognition pattern is constructed based on a plurality of first timeliness keywords in a preset timeliness vocabulary, wherein the plurality of first timeliness keywords have the same first preset timeliness value;

[0013] a candidate pattern determination module, configured to transform the initial recognition pattern according to the part of speech of the first timeliness keyword to obtain a candidate recognition pattern;

[0014] a pattern time validity verification module, configured to use the initial recognition pattern to identify the content to be tested in the test set to obtain a first time validity test result of the initial recognition pattern; and use the candidate recognition pattern to identify the content to be tested in the test set to obtain a second time validity test result of the candidate recognition pattern; wherein the content to be tested has the first preset time validity value;

[0015] a target mode determination module, configured to determine a target recognition mode from the candidate recognition modes according to the first timeliness test result and the second timeliness test result;

[0016] The timeliness identification module is configured to identify the content to be identified by using the target identification mode to determine a timeliness identification result of the content to be identified, wherein the timeliness identification result indicates whether the content to be identified has the first preset timeliness value.

[0017] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the processor loads the at least one instruction or at least one program to execute the content identification method described above.

[0018] On the other hand, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the content identification method as described above.

[0019] The embodiment of the present application constructs an initial recognition pattern by utilizing multiple first preset timeliness keywords having a first preset timeliness value, so that the candidate recognition pattern obtained by transforming the initial recognition pattern and the target recognition pattern determined by recognizing the content to be tested having the first preset timeliness value both have the first preset timeliness value, thereby enabling the target recognition pattern to be directly utilized to quickly identify the timeliness of the content to be identified and determine whether the content to be identified has the first preset timeliness value without providing the number and category of timeliness classifications; and since the target recognition pattern is determined by verification of a test set having the first preset timeliness value, it has a higher accuracy rate than directly utilizing the number and category of timeliness classifications; in addition, as long as the multiple first preset timeliness keywords included in the initial recognition pattern have the same timeliness value, timeliness recognition can be performed, without being limited to the first preset timeliness keywords being words related to time, and thus can be applied to timeliness recognition of any content, thereby improving applicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0021] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application.

[0022] Figure 2 This is a flow chart of a content identification method provided in an embodiment of the present application.

[0023] Figure 3 This is a flowchart of determining candidate recognition modes provided in an embodiment of the present application.

[0024] Figure 4 This is a flowchart of another content identification method provided in an embodiment of the present application.

[0025] Figure 5 This is a flowchart of determining the total number of initial correct recognitions provided by an embodiment of the present application.

[0026] Figure 6 This is a flow chart of determining the confidence value of a candidate recognition pattern provided in an embodiment of the present application.

[0027] Figure 7 It is a flowchart of determining the target recognition mode provided in an embodiment of the present application.

[0028] Figure 8 This is a flow chart of updating a preset time-sensitive vocabulary library provided in an embodiment of the present application.

[0029] Figure 9 This is an example diagram of a content identification method provided in an embodiment of the present application.

[0030] Figure 10 It is a block diagram of a content identification device provided in an embodiment of the present application.

[0031] Figure 11 This is a hardware structure diagram of a computer device provided in an embodiment of the present application for implementing the present application. DETAILED DESCRIPTION

[0032] First, the relevant terms involved in the embodiments of this application are explained as follows:

[0033] Timeliness: Generally speaking, content has a certain effect over a period of time, and this effect is measured by user interest in the content. Timeliness means that content pushed to users within a certain timeframe does not expire. Timeliness plays a crucial role in user retention, clickthrough rates, and CTR (Click Through Rate) on the end-user side. Pushing content to users within its timeliness period can have a positive impact; otherwise, it can cause user dissatisfaction.

[0034] Regular Expression (RE): describes a string matching pattern that can be used to check whether a string contains a certain substring, replace the matching substring, or extract a substring that meets a certain condition from a string.

[0035] Artificial Intelligence (AI) is the theory, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive field within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making. AI technology is an interdisciplinary discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics.

[0036] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0037] The solution provided in the embodiments of the present application relates to the natural language processing (NLP) technology of artificial intelligence. Natural language processing technology is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can enable effective communication between humans and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology generally includes text processing, semantic understanding, machine translation, robot question answering, knowledge graphs and other technologies.

[0038] In natural language processing, the original and traditional approach is based on symbolic rule systems, such as regular expressions. These rule systems are typically constructed by human experts based on domain knowledge. They are highly interpretable and can be used in cold-start scenarios with no data. They can also quickly adapt to changes in the target task by adding, deleting, and modifying rules. For example, using regular expressions to match email addresses, websites, version numbers, and other items within article content is highly effective. However, regular expression-based processing often requires extensive expert experience and manual effort. Therefore, regular expressions can often only solve simple and obvious problems and are not widely applicable to many business scenarios.

[0039] Neural networks have also achieved significant success in many natural language processing tasks. When sufficient labeled data is available, neural networks often achieve impressive results. However, when labeled data is scarce, their performance is significantly reduced. Furthermore, neural networks have long been criticized for their lack of interpretability and difficulty in incorporating external knowledge.

[0040] Currently, the main timeliness assessment methods rely on subjective or empirically derived timeliness data, such as the number and categories of timeliness categories, or simply match keywords related to time (e.g., today, tomorrow, press conference, etc.). However, the specific number and categories of timeliness categories, as well as the keywords related to time, are generally determined subjectively and empirically. This is partly due to the limited human experience, which prevents the widespread application of complex and efficient expressions. Furthermore, to prevent keyword misclassification, only clear and broad keywords are often used. As a result, a large number of keywords cannot be used in real-world scenarios, resulting in low accuracy and poor applicability.

[0041] In view of this, the embodiments of the present application provide a content identification method. To make the purpose, technical solutions, and advantages of this application more clear, the present application will be further described in detail below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0043] See also Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present application, such as Figure 1 As shown, the implementation environment may include at least a client 01 and a server 02 .

[0044] Client 01 can be a device such as a smartphone, desktop computer, tablet computer, laptop computer, digital assistant, smart wearable device, monitoring device, or voice interaction device. It can also be software running on the device, such as a web page provided by a service provider to a user, or an application provided by the service provider to a user. Specifically, client 01 can be used to send a request to server 02 for time-sensitive recognition of content to be recognized.

[0045] Server 02 can be a standalone server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Specifically, server 02 can be used to perform time-sensitive identification on the content to be identified.

[0046] See also Figure 2 , which shows a flow chart of a content identification method provided by an embodiment of the present application, which can be applied to the server side of the above-mentioned implementation environment. It should be noted that the present application provides method operation steps as described in the embodiment or flow chart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many, and does not represent the only execution order. When the actual system or server product is executed, it can be executed sequentially or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 2 As shown, the method may include:

[0047] S201 : Acquire an initial recognition pattern, where the initial recognition pattern is constructed based on a plurality of first time-effectiveness keywords in a preset time-effectiveness vocabulary, and the plurality of first time-effectiveness keywords have the same first preset time-effectiveness value.

[0048] The server can obtain one or more initial recognition patterns from the preset database. The initial recognition pattern represents the rules for timeliness recognition of the content to be recognized, and its expression can be a regular expression. Each timeliness keyword stored in the preset timeliness vocabulary has a corresponding timeliness value, which is used to indicate the timeliness of the timeliness keyword, such as twenty-four hours, three days, seven days, one month or three months, etc. The first timeliness keyword represents a keyword with a first preset timeliness value. For example, "China" in the preset timeliness vocabulary is a keyword with a timeliness of three days, then the first preset timeliness value is three days, and "China" is the first timeliness keyword.

[0049] All first-time-effectiveness keywords in the initial recognition pattern have the same first preset time-effectiveness value, so the initial recognition pattern can be considered to also have the first preset time-effectiveness value. If the initial recognition pattern is used to recognize the content to be recognized, it can be determined whether the content to be recognized also has the first preset time-effectiveness value. In one example, the first preset time-effectiveness value is three days, meaning that the initial recognition pattern has a time-effectiveness of three days. If the initial recognition pattern is used to recognize the content to be recognized, it can be determined whether the content to be recognized also has a time-effectiveness of three days.

[0050] S203: transform the initial recognition pattern according to the part of speech of the first timeliness keyword to obtain a candidate recognition pattern.

[0051] In an embodiment of the present application, the part of speech of the first timeliness keyword contained in each initial recognition pattern is the same. For example, initial recognition pattern 1 is 'China|Company|Finance', and initial recognition pattern 2 is 'Release|Appointment'. Initial recognition pattern 1 only contains nouns, and initial recognition pattern 2 only contains verbs.

[0052] The server automatically learns the combination relationship between each first timeliness keyword in the initial recognition pattern, and converts the learning task into the problem of optimizing the search recognition pattern space to improve the initial recognition pattern. This can not only reduce the operation of manually writing complex initial recognition patterns, but also improve the accuracy of content timeliness judgment. Optionally, the server can, for each initial recognition pattern, recombine each first timeliness keyword in the initial recognition pattern according to the part of speech of the first timeliness keyword contained in the initial recognition pattern to form a new timeliness keyword, and expand the initial recognition pattern according to the new timeliness keyword to obtain a candidate recognition pattern. By transforming the initial recognition pattern, the server can, on the one hand, reduce the situation of keyword miskilling, and on the other hand, not miss the content of those complex keyword scenarios, thereby achieving the effect of timeliness optimization.

[0053] In one example, if you use Represents the i-th initial recognition mode, assuming that the initial recognition mode The two time-sensitive keywords "China" and "movie" are included in the data. Since these two time-sensitive keywords are nouns, "China" and "movie" can be combined into "Chinese movies". According to the logic or relationship, the initial recognition pattern can be Expand to 'China|Movies|Chinese Movies' and get the candidate recognition pattern.

[0054] In the above example, the combination relationship between the timeliness keywords contained in the initial recognition pattern is a logical OR relationship (|). However, in actual applications, the combination relationship between the timeliness keywords contained in the initial recognition pattern obtained by the server may also include other logical operation relationships, such as a logical AND relationship or a logical NOT relationship, etc. In this case, after forming a new timeliness keyword, the server can expand it according to different combination relationships. For example, if the initial recognition pattern is 'China & Movie' and the new timeliness keyword is "Chinese Movie", then the candidate recognition pattern after the initial recognition pattern is expanded can be 'China & Movie & Chinese Movie'. Therefore, different combination relationships have different expansion methods, and this application does not make specific limitations here.

[0055] In some implementations, when the server obtains multiple initial recognition patterns, the server may also perform combination transformations between the initial recognition patterns based on part of speech. Figure 3 , which shows a schematic diagram of the process of determining candidate recognition modes provided by an embodiment of the present application. Figure 3 As shown, step S203 may include:

[0056] S2031: Determine the part of speech of the first time-sensitive keyword in the initial recognition pattern as the part of speech of the initial recognition pattern.

[0057] All the first time-sensitive keywords included in the initial recognition pattern have the same part of speech, and the server can determine the part of speech of any one of the first time-sensitive keywords as the part of speech of the initial recognition pattern. It is expressed as '(heavyweight|release|appointment|response|interview)' using a regular expression. If the part of speech of any of the first timeliness keywords is a verb, then The part of speech of is also a verb.

[0058] S2033: Perform a first logical combination on multiple initial recognition patterns with the same part of speech to obtain a transformation pattern set.

[0059] In the embodiment of the present application, the first logical combination represents a logical OR combination, which refers to a combination using a logical OR relationship (|) or a symbol having a logical OR relationship. In one example, the server obtains 5 initial recognition patterns, which can be used respectively. as well as Indicates that as well as have the same part of speech, and have the same part of speech. The server can as well as Perform logical OR combination (|) to obtain the transformation mode and will and Perform logical OR combination to obtain the transformation mode Thus, the transformation pattern set can be obtained as Specifically, if as well as The resulting transformation mode It can be expressed as '(big news|release)|(appointment|response)|interview)'.

[0060] S2035: Perform a second logical combination on each transformation pattern in the transformation pattern set to obtain a candidate recognition pattern.

[0061] In the embodiment of the present application, the second logical combination represents a logical AND combination, and / or, a logical OR combination, that is, the second logical combination includes a logical AND combination, a logical OR combination, and a simultaneous logical AND combination and a logical OR combination. Among them, performing a logical AND combination and a logical OR combination simultaneously means performing both a logical AND combination and a logical OR combination, and a logical AND combination means directly using a logical AND relationship or using symbols with a logical AND relationship to perform a combination. For example, the two transformation modes of '(A)' and '(B)', '(A)(B)', '(A)&(B)', and '(A)(.*?)(B)' can all be regarded as performing a logical AND combination on the two transformation modes.

[0062] In one example, for the two transformation modes '(A)' and '(B)', if the second logical combination represents a logical AND combination, the candidate recognition mode may be '(A)&(B)'; if the second logical combination represents a logical OR combination, the candidate recognition mode may be '(A)|(B)'; if the second logical combination represents a logical AND combination and a logical OR combination, the candidate recognition modes may be '(A)&(B)' and '(A)|(B)'.

[0063] The transformation patterns in the transformation pattern set may include one or more transformation patterns. If only one transformation pattern is included, that transformation pattern may be determined as a candidate recognition pattern. If multiple transformation patterns are included, since each transformation pattern is derived from an initial recognition pattern with the same part of speech, the transformation patterns may belong to different parts of speech. The server may perform a logical AND and / or logical OR combination of the transformation patterns with different parts of speech to obtain one or more candidate recognition patterns.

[0064] In an example, the transformation pattern set includes two transformation patterns '(Breaking News|Release|Appointment|Response|Interview)' and '(China|Company|Finance|Advertisement|Movie)'. After performing the second logical combination transformation on the two transformation patterns, the obtained candidate recognition patterns can be '(Breaking News|Release|Appointment|Response|Interview)(.*?)(China|Company|Finance|Advertisement|Movie)', '(Breaking News|Release|Appointment|Response|Interview)(China|Company|Finance|Advertisement|Movie)' and '(Breaking News|Release|Appointment|Response|Interview)|(China|Company|Finance|Advertisement|Movie)'.

[0065] S205, using the initial recognition pattern to identify the content to be tested in the test set, and obtaining a first timeliness test result of the initial recognition pattern; and using the candidate recognition pattern to identify the content to be tested in the test set, and obtaining a second timeliness test result of the candidate recognition pattern; wherein the content to be tested has a first preset timeliness value.

[0066] In the embodiment of the present application, the first timeliness test result represents the timeliness test result of the initial recognition mode on the tested content, and the second timeliness test result represents the timeliness test result of the candidate recognition mode on the tested content. The test set can include multiple tested content, and the tested content can be any article content with a first preset timeliness value. The server uses the initial recognition mode and the candidate recognition mode to identify each tested content, and the resulting timeliness test result also has the first preset timeliness value.

[0067] The timeliness test result is used to indicate whether the timeliness of each content to be tested is correctly identified. For example, if the initial recognition pattern is used to identify the content to be identified, and the recognition result is empty or no useful information is identified, the server can determine that the initial recognition pattern has incorrectly identified the timeliness of the content to be identified. Similarly, if the candidate recognition pattern is used to identify the content to be identified, and the recognition result is not empty or useful information is identified, the server can determine that the candidate recognition pattern has correctly identified the timeliness of the content to be identified.

[0068] In one example, as shown in Table 1, an example of a timeliness test result is shown. After each recognition pattern (including the initial recognition pattern and the candidate recognition pattern) recognizes each content to be recognized, the server will determine the correctness of the recognition pattern's timeliness recognition of the content to be recognized based on the recognition result, and obtain the timeliness test result of the recognition pattern.

[0069] Table 1

[0070]

[0071] S207 : Determine a target recognition mode from the candidate recognition modes according to the first timeliness test result and the second timeliness test result.

[0072] In some embodiments, as shown in the example of step S205 above, the server knows the accuracy of each recognition pattern's timeliness recognition of each content to be recognized. The server can determine the candidate recognition pattern with the highest total number of candidate correct recognitions as the target recognition pattern among multiple candidate recognition patterns, or can select a preset number of candidate recognition patterns from multiple candidate recognition patterns as the target recognition pattern based on the total number of initial correct recognitions and the total number of candidate correct recognitions. The total number of initial correct recognitions is used to indicate the total number of correct recognitions of one or more initial recognition patterns; the total number of candidate correct recognitions is used to indicate the total number of correct recognitions of the candidate recognition patterns, that is, each candidate recognition pattern corresponds to a total number of candidate correct recognitions, and the value of the total number of candidate correct recognitions is the same as the value of the total number of correct recognitions of the candidate recognition pattern; the total number of correct recognitions represents the number of contents to be tested in the correct recognition test set.

[0073] Please refer to the following for details: Figure 4 , which shows a flow chart of another content identification method provided by an embodiment of the present application. Figure 4 As shown, step S207 may include:

[0074] S2071: Determine the total number of initial correct recognitions based on the first timeliness test result.

[0075] In an embodiment of the present application, the server may determine the total number of initial correct recognitions based on the total number of correct recognitions of the multiple initial recognition patterns. For example, the server may determine the maximum value among the total number of correct recognitions of the multiple initial recognition patterns as the total number of initial correct recognitions.

[0076] In some implementations, the server may also combine the first timeliness test results of multiple initial recognition patterns and obtain the total number of initial correct recognitions based on the combined results. Figure 5 , which shows a flow chart for determining the total number of initial correct recognitions. Figure 5 As shown, step S2071 may include:

[0077] S20711, merging the first timeliness test results of the multiple initial recognition patterns to obtain a timeliness test merged result.

[0078] When the server merges multiple first timeliness test results, for each piece of content to be identified, as long as there is a first timeliness test result for an initial recognition pattern that indicates the timeliness of the content to be identified is correct, the timeliness of the content to be identified in the merged timeliness test result is set as correct. As shown in Table 2, when identifying content 4, initial recognition pattern 1 is correct, but initial recognition pattern 2 is incorrect. Therefore, the merged timeliness test result indicates that content 4 is correctly identified.

[0079] Table 2

[0080]

[0081] S20713, based on the timeliness test merging results, obtain the initial total number of correct recognitions.

[0082] As shown in Table 2 above, the total number of correct recognitions for initial recognition mode 1 is 2, and the total number of correct recognitions for initial recognition mode 2 is 2. After merging, the total number of initial correct recognitions determined based on the merged results of the timeliness test is 3.

[0083] S2073: Determine the total number of correct recognition candidates based on the second timeliness test result; and determine the confidence value of the candidate recognition pattern according to the total number of correct recognition candidates and the total number of initial correct recognitions.

[0084] In the embodiments of the present application, the total number of candidate correct recognitions is the total number of correct recognitions of the candidate recognition pattern. The confidence value is used to indicate the accuracy of timeliness recognition using the candidate recognition pattern. The higher the confidence value, the higher the accuracy of timeliness recognition. In some possible implementations, the server may calculate the difference between the total number of candidate correct recognitions and the initial total number of correct recognitions, and determine the confidence value of the candidate recognition pattern as the ratio of the difference to the initial total number of correct recognitions.

[0085] In some possible implementations, the server may also determine the accuracy and recall of the candidate recognition pattern based on the total number of candidate correct recognitions and the total number of initial correct recognitions, and determine the confidence value of the candidate recognition pattern based on the accuracy and recall. Figure 6 As shown in , it shows a flow chart of determining the confidence value of a candidate recognition pattern. Figure 6 As shown, determining the confidence value of the candidate recognition mode based on the total number of candidate correct recognitions and the total number of initial correct recognitions may include:

[0086] S20731, determining the accuracy of the candidate recognition pattern based on the total number of correct recognition candidates;

[0087] S20733, determining the recall rate of the candidate recognition pattern as the ratio of the total number of candidate correct recognitions to the total number of initial correct recognitions;

[0088] S20735, determining the confidence value of the candidate recognition pattern according to the precision and recall rate.

[0089] In the embodiment of the present application, the server can determine the F1 value based on the accuracy and recall rate, and then determine the F1 value as the confidence value of the candidate recognition pattern. Represents the test set, using Represents candidate recognition patterns, using Indicates the initial recognition mode, Indicates the total number of correct recognition candidates, Indicates the total number of incorrect recognitions of candidate recognition patterns in the test set, represents the total number of initial correct recognitions, then the accuracy (precision), recall (recall) and F1 value of the candidate recognition pattern can be expressed as:

[0090]

[0091]

[0092]

[0093] in, Indicates the accuracy, represents the recall rate, Indicates the F1 value.

[0094] S2075: Determine a target recognition mode based on the confidence values of multiple candidate recognition modes.

[0095] In some possible implementations, the server may sort multiple candidate recognition patterns according to confidence values, and determine the candidate recognition pattern with the maximum confidence value as the target recognition pattern.

[0096] In some possible implementations, the server may also compare the confidence values of each candidate recognition pattern with a preset confidence threshold, and determine the target recognition pattern based on the comparison result. Figure 7 As shown, step S2075 may include:

[0097] S20751, selecting a candidate recognition pattern having a confidence value greater than a preset confidence threshold from multiple candidate recognition patterns;

[0098] S20753, sorting the selected results in descending order of confidence values;

[0099] S20753: Determine a first threshold number of candidate recognition patterns that are ranked high as target recognition patterns.

[0100] When the confidence value of a candidate recognition pattern is greater than a preset confidence threshold, the server can determine that the candidate recognition pattern has sufficient confidence, that is, the candidate recognition pattern can participate in the timeliness judgment as a credible pattern. In an example, as shown in Table 3, for 5 candidate recognition patterns, if the confidence threshold is 0.80, then the candidate recognition patterns with confidence values greater than 0.80 are candidate recognition pattern 1, candidate recognition pattern 2, candidate recognition pattern 4, and candidate recognition pattern 5. If the first quantity threshold is 2, candidate recognition pattern 1, candidate recognition pattern 2, candidate recognition pattern 4, and candidate recognition pattern 5 are sorted in descending order of confidence value, and the top two candidate recognition patterns are candidate recognition pattern 2 and candidate recognition pattern 4, respectively. Then candidate recognition pattern 2 and candidate recognition pattern 4 are both target recognition patterns.

[0101] Table 3

[0102] Candidate recognition patterns Confidence value Candidate recognition pattern 1 0.87 Candidate recognition mode 2 0.93 Candidate recognition mode 3 0.75 Candidate recognition mode 4 0.92 Candidate recognition pattern 5 0.86

[0103] In some embodiments, when the confidence values of all candidate recognition patterns are less than or equal to a preset confidence threshold, the server may re-execute the step of determining the target recognition pattern, that is, re-execute the above steps S201 to S207. The specific implementation methods can be found in the contents of the above steps S201 to S207, which will not be repeated here.

[0104] S209 , identifying the content to be identified using the target identification mode to determine a timeliness identification result of the content to be identified, where the timeliness identification result indicates whether the content to be identified has a first preset timeliness value.

[0105] In the embodiment of the present application, the server uses a target recognition pattern to identify the content to be identified. If information that matches the target recognition pattern is identified, the server can determine that the content to be identified has a first preset timeliness value. For example, if the recognition pattern is a regular expression, if the recognition result obtained by the regular expression is not empty, the content to be identified can be determined to have the first preset timeliness value.

[0106] The target recognition pattern may include one or more candidate recognition patterns. In one possible implementation, the server may arbitrarily select one of the candidate recognition patterns to recognize the content to be recognized, and use the recognition result of the candidate recognition pattern as the timeliness recognition result of the content to be recognized.

[0107] In other embodiments, the server may select several candidate recognition patterns from a plurality of candidate recognition patterns, and then combine the recognition results of the content to be recognized by each of the selected candidate recognition patterns to obtain a timeliness recognition result for the content to be recognized. For example, as long as any one of the selected candidate recognition patterns determines that the content to be recognized has a first preset timeliness value, it can be determined that the content to be recognized has the first preset timeliness value.

[0108] In some application scenarios, after determining the timeliness identification result of the content to be identified, the server can determine whether to recommend the identified content to the user based on the timeliness identification result. Optionally, the server can determine whether the content to be identified meets the preset timeliness condition based on the timeliness identification result, and recommend the content to be identified to the user if the preset timeliness condition is met. The preset timeliness condition represents the condition of meeting the preset timeliness value to ensure that the information recommended to the user is not outdated. For example, the preset timeliness condition represents the condition of meeting the three-day timeliness. If the timeliness identification result indicates that the content to be identified has a three-day timeliness, then the content to be identified can be recommended to the user; if the timeliness identification result indicates that the content to be identified has a seven-day timeliness, then the content to be identified cannot be recommended to the user.

[0109] In other application scenarios, the timeliness of the information content to be presented by different products is different, and the server can also divert the identified content to the corresponding products based on the timeliness identification results. For example, there are several products, Product 1, Product 2, and Product 3. The information presented in Product 1 requires information content from the past three days, the information presented by Product 2 requires information content from the past seven days, and the information presented in Product 3 can be information content of any timeliness. If the timeliness identification result indicates that the content to be identified has a timeliness of seven days, the server can divert the content to be identified to Product 2 and / or Product 3; if the timeliness identification result indicates that the content to be identified has a timeliness of 30 days, the server can divert the content to be identified to Product 3. By diverting the content to be identified to different products based on the timeliness identification results, the accuracy of information content recommendations to products can be improved.

[0110] In one possible implementation, each time-sensitive keyword in the preset time-sensitive vocabulary has a corresponding time-sensitive value, which is consistent with the time-sensitive value of the article content read when the preset time-sensitive vocabulary is updated. The server can update the preset time-sensitive vocabulary at preset intervals.

[0111] See also Figure 8 , which shows a schematic diagram of the process of updating the preset time-sensitive vocabulary provided by the embodiment of the present application. Figure 8 As shown, updating the preset time-sensitive vocabulary library may include:

[0112] S801, crawling article content with a second preset timeliness value to obtain a second timeliness keyword.

[0113] A crawling task is set in the server, which crawls the title, keywords, release time, text content and other information in the article content through crawler technology to obtain the second timeliness keyword.

[0114] In an embodiment of the present application, the second timeliness keyword represents a keyword with a second preset timeliness value, and the content of the article crawled by the crawling task has a second preset timeliness value, so that the second timeliness keyword also has a second preset timeliness value. For example, the crawled article content has a seven-day timeliness, and the crawled keyword is "appointment", then "appointment" is a keyword with a seven-day timeliness, that is, the second preset timeliness value is seven days, and "appointment" is the second timeliness keyword. It can be understood that the second preset timeliness value can be set according to the type of crawling task or the specific application scenario, and is not specifically limited here.

[0115] In a specific implementation, in order to make the obtained second timeliness keywords encompass various categories of article content, the article content may include information articles and non-information articles. By crawling timeliness keywords for both categories of article content, the timeliness keywords in the preset timeliness vocabulary can be made more comprehensive. It should be noted that there are many technologies for implementing crawlers, such as customizing crawler tasks using different programming languages, or selecting open source crawler frameworks, etc., and this application does not specifically limit this.

[0116] In one example, the consulting platform needs to push article content with a validity period of three days to the target product. The server can set the second preset validity period value to three days, so that the obtained second timeliness keyword has a validity period of three days; accordingly, the initial recognition pattern constructed by the second timeliness keyword and the target recognition pattern determined based on the initial recognition pattern also have a validity period of three days, so that when the content to be recognized is recognized by the target recognition pattern, it can be determined whether the content to be recognized has a validity period of three days. If it has a validity period of three days, the content to be recognized can be recommended to the target product.

[0117] S803: Count the frequency of the second time-sensitive keyword and determine the part of speech of the second time-sensitive keyword.

[0118] The server can use sequence labeling algorithms to count the parts of speech of each keyword, such as noun, verb, adjective, etc.

[0119] S805 , classify the second time-sensitive keywords according to parts of speech to obtain one or more second time-sensitive keyword sets.

[0120] S807 , for each second time-sensitive keyword set, sort the second time-sensitive keywords in the second time-sensitive keyword set in descending order of frequency, and merge the second time-sensitive keywords with the highest sorting count, which are a second threshold number, into a preset time-sensitive vocabulary.

[0121] After the server classifies the second time-sensitive keywords, each obtained second time-sensitive keyword set corresponds to a part of speech. The server screens the top ten high-frequency second time-sensitive keywords under each part of speech, removes duplicates from the existing time-sensitive keywords in the preset time-sensitive vocabulary, obtains new time-sensitive keywords, and adds the new time-sensitive keywords to the preset time-sensitive vocabulary.

[0122] It should be noted that the pre-set values such as the first preset time value, the second preset time value, the first quantity threshold, the second quantity threshold and the preset confidence threshold in the above embodiments can be set according to the specific application scenario, and this application does not make any specific restrictions on this.

[0123] For ease of understanding, the following takes the initial recognition pattern as a regular expression and determines whether the content to be recognized has a three-day validity period as an example to further illustrate the content recognition method of the embodiment of the present application. Figure 9 , which shows an example diagram of a content identification method provided by an embodiment of the present application. Figure 9 As shown, the method may include:

[0124] S901, regularly triggering the keyword mining process, and storing the mined keywords into a preset time-sensitive vocabulary;

[0125] S902, obtaining an initial regular expression constructed based on multiple timeliness keywords in a preset timeliness vocabulary, wherein the multiple timeliness keywords all have a timeliness value of three days;

[0126] S903, transforming the initial regular expression to obtain multiple candidate regular expressions (illustrated by 906a, 906b, ..., 906n in the figure);

[0127] S904, using each candidate regular expression and the initial regular expression to identify the content to be tested, and determining the F1 value of each candidate regular expression based on the identification results; wherein the content to be identified has a time validity value of three days;

[0128] S905, comparing the F1 value of each candidate regular expression with a preset confidence threshold to determine the target regular expression;

[0129] S906: Use the target regular expression to identify the content to be identified, so as to determine whether the content to be identified has a time validity value of three days.

[0130] When the server triggers the keyword mining process at a scheduled time, it mainly mines time-sensitive keywords from the content of information articles and non-information articles, then performs part-of-speech analysis on the time-sensitive keywords, and selects the TOPN time-sensitive keywords under each part of speech and stores them in the preset time-sensitive vocabulary.

[0131] During the entire process of identifying the content to be identified, the server collects statistics on the part of speech and frequency of keywords appearing in information and non-information articles, and stores the keywords in a preset time-sensitive vocabulary based on the statistical results; then enters the regular expression learning process, and obtains a set of candidate regular expressions based on the transformation (transformer) of the initial regular expression. Each candidate regular expression in the candidate regular expression set is verified on the test set, and the F1 value is determined based on the verification result; the F1 value is compared with a preset confidence threshold. If the F1 value exceeds the preset confidence threshold, it is considered that the candidate regular expression has sufficient confidence and can be used for time-sensitive identification of the content to be identified.

[0132] In actual applications, information platforms usually need to process a huge amount of content every day, and then divert it to products such as Kandian, Browser, and Express. Such a large amount of content contains data with different timeliness. The timeliness of the content directly affects the push quality and delivery strategy, as well as the pushed products, thereby affecting indicators such as user click-through rate, user residence time, and even affecting users' impression of the product.

[0133] In a specific application scenario, consider content A and content B in an information flow product, where A is related to social news and B is a clip from a classic film or television work. Generally speaking, news information has a shorter timeliness, while classics have a much longer timeliness. Therefore, it is necessary to judge the timeliness of each separately to determine the appropriate timeframe for pushing content to users. On the one hand, outdated content should not be pushed to users, which can lead to user disgust and negative feedback, directly affecting their impression of the product and making them believe that the product's content is not timely. On the other hand, classic content should not be removed prematurely, which can lead to poor end-user consumption (e.g., user click-through rate, consumption time, etc.), resulting in too little content in the recommendation pool and users believing that the product's content volume is too small, thus causing user churn.

[0134] In the technical solution provided in the embodiment of the present application, each first timeliness keyword and the test set are time-sensitive, so that the target recognition pattern is also time-sensitive. If the target recognition pattern can be used to identify information from content A or content B, it can be determined that content A or content B has the same timeliness as each first timeliness keyword. Since the timeliness of social news and fragments of classic works is different, it is impossible for the server to determine that content A and content B have the same timeliness as each first timeliness keyword at the same time, so that the timeliness of content A or content B can be accurately determined. By providing the timeliness of different content, it is convenient for each product side to make corresponding recommendation strategies. For example, content with a long timeliness can be pushed to users for a long time, which will have a positive impact on indicators such as daily activity of the product, while content with a short timeliness must be known in advance that it cannot continue to be pushed to users, otherwise it will reduce the user's overall impression of the product.

[0135] It can be seen from the technical solution provided by the above embodiment that the embodiment of the present application constructs an initial recognition pattern by utilizing multiple first preset timeliness keywords with a first preset timeliness value, so that the candidate recognition pattern obtained by transforming the initial recognition pattern and the target recognition pattern determined by identifying the content to be tested with the first preset timeliness value both have the first preset timeliness value, thereby enabling the target recognition pattern to be directly used to quickly identify the timeliness of the content to be identified and determine whether the content to be identified has the first preset timeliness value without providing the number and category of timeliness classifications; and since the target recognition pattern is determined by verification of a test set with a first preset timeliness value, it has a higher accuracy rate than directly using the number and category of timeliness classifications; in addition, as long as the multiple first preset timeliness keywords contained in the initial recognition pattern have the same timeliness value, timeliness recognition can be performed, and is not limited to the first preset timeliness keywords being words related to time, and thus can be applied to timeliness recognition of any content, thereby improving applicability.

[0136] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a content identification device, which can implement the functions provided by the above method embodiment. Figure 10 , the apparatus 100 may include:

[0137] An initial pattern acquisition module 110 is configured to acquire an initial recognition pattern, where the initial recognition pattern is constructed based on a plurality of first timeliness keywords in a preset timeliness vocabulary, where the plurality of first timeliness keywords have the same first preset timeliness value;

[0138] A candidate pattern determination module 120 is configured to transform the initial recognition pattern according to the part of speech of the first timeliness keyword to obtain a candidate recognition pattern;

[0139] The pattern time validity verification module 130 is configured to identify the content to be tested in the test set using the initial recognition pattern to obtain a first time validity test result of the initial recognition pattern; and identify the content to be tested in the test set using the candidate recognition pattern to obtain a second time validity test result of the candidate recognition pattern; wherein the content to be tested has a first preset time validity value;

[0140] A target pattern determination module 140 is configured to determine a target recognition pattern from candidate recognition patterns based on the first timeliness test result and the second timeliness test result;

[0141] The timeliness identification module 150 is configured to identify the content to be identified using a target identification mode to determine a timeliness identification result of the content to be identified. The timeliness identification result indicates whether the content to be identified has a first preset timeliness value.

[0142] In one possible implementation, the target mode determination module 140 may include:

[0143] an initial correct total number determining unit, configured to determine an initial correct total number of recognitions based on a first timeliness test result;

[0144] A confidence value determination unit, configured to determine the total number of correct recognition candidates based on the second timeliness test result; and determine the confidence value of the candidate recognition mode based on the total number of correct recognition candidates and the total number of initial correct recognitions;

[0145] The target recognition mode determination unit is used to determine the target recognition mode according to the confidence values of multiple candidate recognition modes.

[0146] In one possible implementation, the confidence value determining unit may include:

[0147] an accuracy determination unit, configured to determine an accuracy of a candidate recognition pattern based on the total number of correct recognition candidates;

[0148] a recall rate determination unit, configured to determine the ratio of the total number of candidate correct recognitions to the total number of initial correct recognitions as the recall rate of the candidate recognition pattern;

[0149] The confidence value calculation unit is used to determine the confidence value of the candidate recognition mode according to the precision and recall rate.

[0150] In one possible implementation, the target recognition mode determination unit may include:

[0151] A confidence comparison unit, configured to select, from a plurality of candidate recognition modes, a candidate recognition mode whose confidence value is greater than a preset confidence threshold;

[0152] A pattern sorting unit, used to sort the selected results in descending order of confidence values;

[0153] The mode selection unit is used to determine a first threshold number of candidate recognition modes that are ranked high as target recognition modes.

[0154] In one possible implementation, the initial correct total number determining unit may include:

[0155] A result merging unit, configured to merge the first timeliness test results of the multiple initial recognition patterns to obtain a timeliness test merged result;

[0156] The total correct number calculation unit is used to combine the results based on the timeliness test to obtain the initial total correct recognition number.

[0157] In a possible implementation, the first timeliness keywords included in the initial recognition patterns have the same part of speech, and the candidate pattern determination module 120 may include:

[0158] a pattern part-of-speech determination unit, configured to determine the part-of-speech of the first temporal keyword in the initial recognition pattern as the part-of-speech of the initial recognition pattern;

[0159] The same part-of-speech pattern conversion unit is used to perform a first logical combination between multiple initial recognition patterns with the same part of speech to obtain a conversion pattern set;

[0160] The different part-of-speech pattern conversion units are used to perform a second logical combination on each conversion pattern in the conversion pattern set to obtain a candidate recognition pattern.

[0161] In one possible implementation, the apparatus 100 may further include:

[0162] The vocabulary update module is used to update the preset time-sensitive vocabulary at preset intervals.

[0163] Optionally, the vocabulary update module may include:

[0164] A keyword crawling unit, configured to crawl article content having a second preset timeliness value to obtain a second timeliness keyword;

[0165] a keyword statistics unit, configured to count the frequency of the second time-sensitive keyword and determine the part of speech of the second time-sensitive keyword;

[0166] A keyword classification unit, configured to classify the second time-sensitive keywords according to parts of speech to obtain one or more second time-sensitive keyword sets;

[0167] The keyword storage unit is used to sort the second time-sensitive keywords in each second time-sensitive keyword set in descending order of word frequency, and merge the second time-sensitive keywords with the highest sorting quantity and the second threshold number into the preset time-sensitive keyword library.

[0168] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0169] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded by the processor to execute the content identification method provided by the above method embodiment.

[0170] Further, Figure 11 A schematic diagram of the hardware structure of a computer device for implementing the embodiment of the present application is shown, and the device may participate in or include the apparatus or system provided in the embodiment of the present application. Figure 11 As shown, the device 11 may include one or more (illustrated as 1102a, 1102b, ..., 1102n in the figure) processors 1102 (the processor 1102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1104 for storing data, and a transmission device 1106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 11 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 11 More or fewer components than shown, or with Figure 11 Different configurations shown.

[0171] It should be noted that the one or more processors 1102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the device 11 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0172] The memory 1104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the content recognition method described in the embodiments of the present application. The processor 1102 executes various functional applications and data processing by running the software programs and modules stored in the memory 1104, thereby implementing the above-mentioned content recognition method. The memory 1104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1104 may further include memory remotely located relative to the processor 1102, and these remote memories may be connected to the device 11 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0173] Transmission device 1106 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the communications provider of device 11. In one embodiment, transmission device 1106 may include a network interface controller (NIC), which may be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, transmission device 1106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0174] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the device 11 (or mobile device).

[0175] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by a processor to implement the content identification method provided by the above method embodiment.

[0176] Optionally, in this embodiment, the computer storage medium may be located in at least one of a plurality of network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard drive, a magnetic disk, or an optical disk.

[0177] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the content identification method provided in the above-mentioned method embodiment.

[0178] It should be noted that the order of the embodiments of the present application described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0179] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and electronic device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the partial description of the method embodiments.

[0180] The above description has fully disclosed the specific embodiments of this application. It should be noted that any changes made by those skilled in the art to the specific embodiments of this application do not depart from the scope of the claims of this application. Accordingly, the scope of the claims of this application is not limited to the above specific embodiments.

Claims

1. A content identification method, characterized in that: The method comprises: Acquire an initial recognition pattern, where the initial recognition pattern is constructed based on a plurality of first time-sensitive keywords in a preset time-sensitive vocabulary, where the plurality of first time-sensitive keywords have the same first preset time-sensitive value; transforming the initial recognition pattern according to the part of speech of the first timeliness keyword to obtain a candidate recognition pattern; Using the initial recognition pattern to identify the content to be tested in the test set, obtaining a first timeliness test result of the initial recognition pattern; and using the candidate recognition pattern to identify the content to be tested in the test set, obtaining a second timeliness test result of the candidate recognition pattern; wherein the content to be tested has the first preset timeliness value; Determining a target recognition mode from the candidate recognition modes according to the first timeliness test result and the second timeliness test result; The target recognition mode is used to recognize the content to be recognized, so as to determine a timeliness recognition result of the content to be recognized, wherein the timeliness recognition result indicates whether the content to be recognized has the first preset timeliness value.

2. The method according to claim 1, characterized in that Determining a target recognition mode from the candidate recognition modes according to the first timeliness test result and the second timeliness test result includes: Determining an initial total number of correct recognitions based on the first timeliness test result; Determining the total number of correct recognition candidates based on the second timeliness test result; Determining a confidence value of the candidate recognition pattern according to the total number of candidate correct recognitions and the total number of initial correct recognitions; The target recognition mode is determined according to the confidence values of the plurality of candidate recognition modes.

3. The method according to claim 2, characterized in that Determining the confidence value of the candidate recognition mode according to the total number of candidate correct recognitions and the total number of initial correct recognitions includes: Determining the accuracy of the candidate recognition mode according to the total number of correct recognition candidates; Determine the ratio of the total number of candidate correct recognitions to the total number of initial correct recognitions as the recall rate of the candidate recognition pattern; The confidence value of the candidate recognition pattern is determined according to the accuracy and the recall rate.

4. The method according to claim 2 or 3, characterized in that Determining the target recognition mode according to the confidence values of the multiple candidate recognition modes includes: Selecting, from the plurality of candidate recognition patterns, the candidate recognition pattern whose confidence value is greater than a preset confidence threshold; Sort the selected results in descending order of the confidence values; A first threshold number of the candidate recognition patterns ranked at the top are determined as the target recognition patterns.

5. The method according to claim 2, characterized in that Determining the total number of initial correct recognitions based on the first timeliness test result includes: Merging the first timeliness test results of the plurality of initial recognition patterns to obtain a timeliness test merged result; Based on the combined results of the timeliness test, the initial total number of correct recognitions is obtained.

6. The method according to claim 1 or 2, characterized in that The parts of speech of the first time-sensitive keywords included in the initial recognition pattern are the same; The step of transforming the initial recognition pattern according to the part of speech of the first timeliness keyword to obtain a candidate recognition pattern includes: Determining the part of speech of the first timeliness keyword in the initial recognition pattern as the part of speech of the initial recognition pattern; Performing a first logical combination on a plurality of the initial recognition patterns having the same part of speech to obtain a transformation pattern set; Perform a second logical combination on each transformation pattern in the transformation pattern set to obtain the candidate recognition pattern.

7. The method according to claim 1 or 2, characterized in that The method further comprises: At every preset time interval, the preset time-sensitive vocabulary is updated; The updating of the preset time-sensitive vocabulary library includes: Crawling article content with a second preset timeliness value to obtain a second timeliness keyword; Counting the frequency of the second time-sensitive keyword, and determining the part of speech of the second time-sensitive keyword; Classifying the second time-sensitive keywords according to the part of speech to obtain one or more second time-sensitive keyword sets; For each second time-sensitive keyword set, the second time-sensitive keywords in the second time-sensitive keyword set are sorted in descending order of the word frequency, and a second threshold number of the second time-sensitive keywords that are ranked high are merged into the preset time-sensitive vocabulary.

8. A content recognition device, characterized in that: The device comprises: An initial pattern acquisition module, configured to acquire an initial recognition pattern, wherein the initial recognition pattern is constructed based on a plurality of first timeliness keywords in a preset timeliness vocabulary, wherein the plurality of first timeliness keywords have the same first preset timeliness value; a candidate pattern determination module, configured to transform the initial recognition pattern according to the part of speech of the first timeliness keyword to obtain a candidate recognition pattern; a pattern time validity verification module, configured to use the initial recognition pattern to identify the content to be tested in the test set to obtain a first time validity test result of the initial recognition pattern; and use the candidate recognition pattern to identify the content to be tested in the test set to obtain a second time validity test result of the candidate recognition pattern; wherein the content to be tested has the first preset time validity value; a target mode determination module, configured to determine a target recognition mode from the candidate recognition modes according to the first timeliness test result and the second timeliness test result; The timeliness identification module is configured to identify the content to be identified by using the target identification mode to determine a timeliness identification result of the content to be identified, wherein the timeliness identification result indicates whether the content to be identified has the first preset timeliness value.

9. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the processor loads the at least one instruction or at least one program to execute the content identification method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction or at least one program segment, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the content identification method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Retrieval method and apparatus

    CN105159938A

  • Software product evaluation processing method and device, computer equipment and storage medium

    CN110263329A