Content reasoning method and device, electronic equipment, storage medium and program product
Through parallel inference strategy, one-time reasoning is used to use preset token sequences to perform one-time inference, which solves the problem of slow inference speed in the existing technology, and realizes an efficient and fast inference process.
Patent Information
- Application Number
- CN202411707989.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-18
AI Technical Summary
Existing large language models have serial dependencies in the inference process, resulting in slower inference speed, especially when processing longer sequences.
By pre-identifying and integrating possible information sequences, using parallel inference strategies, one-time reasoning is performed directly using the preset token sequence as input to perform one-time reasoning, avoiding lengthy inference steps.
It significantly improves the inference speed, improves the inference efficiency, reduces the consumption of computing resources, and reduces the redundant inference steps.
Smart Images

Figure CN119647591A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and specifically to a content reasoning method, device, electronic device, storage medium and program product. Background Art
[0002] With the continuous advancement of computer technology, large language models (LLMs) with powerful reasoning capabilities have emerged. Specifically, based on the reasoning capabilities of large language models, computer devices can infer the category labels of an article by calling a large number of model parameters in the large language model to obtain the category label reasoning results of the article.
[0003] However, in the current model reasoning process, the reasoning content is usually analyzed step by step, and the next step of reasoning is performed based on the information unit (token) analyzed and reasoned first, and tokens are generated one by one in sequence, and each new token generated depends on the previously generated token sequence. This dependency relationship requires the reasoning process to be carried out serially, resulting in a slow overall reasoning speed. Especially when processing longer sequences, the efficiency problem of serial reasoning is particularly obvious. Summary of the invention
[0004] The embodiments of the present application provide a content reasoning method, device, electronic device, storage medium and program product, which can avoid invalid reasoning in a huge information space, thereby reducing redundant reasoning steps. Therefore, the parallel reasoning strategy of the present application can not only significantly improve the reasoning speed and efficiency, but also reduce the consumption of computing resources.
[0005] The present application embodiment provides a content reasoning method, including:
[0006] Determine the content to be inferred and at least one information sequence, where different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task;
[0007] Determine a target reasoning task corresponding to the content to be reasoned from at least one reasoning task;
[0008] Performing feature interaction processing on each content information unit in the inference content and the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, wherein the target information sequence is composed of the content information units in the information sequence under the target inference task;
[0009] Based on the feature interaction information of each content information unit in the target information sequence, reasoning and analyzing each content information unit in the target information sequence to determine the matching degree between the content to be inferred and each content information unit in the target information sequence;
[0010] According to the matching degree, the inference result corresponding to the content to be inferred is determined from each content information unit of the target information sequence;
[0011] Output the inference result corresponding to the content to be inferred.
[0012] The present application also provides a content inference device, including:
[0013] An information determination unit, used to determine the content to be inferred and at least one information sequence, where different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task;
[0014] A task determination unit, used to determine a target reasoning task corresponding to the content to be reasoned from at least one reasoning task;
[0015] An information processing unit, used for performing feature interaction processing on each content information unit in the target information sequence and the content to be inferred, to obtain feature interaction information of each content information unit in the target information sequence, wherein the target information sequence is composed of the content information units in the information sequence under the target reasoning task;
[0016] A content matching unit, configured to perform reasoning and analysis on each content information unit in the target information sequence based on feature interaction information of each content information unit in the target information sequence, and determine a matching degree between the content to be inferred and each content information unit in the target information sequence;
[0017] An inference determination unit, used to determine the inference result corresponding to the content to be inferred from each content information unit of the target information sequence according to the matching degree;
[0018] The reasoning output unit is used to output the reasoning result corresponding to the content to be reasoned.
[0019] In some embodiments, before performing feature interaction processing on each content information unit in the inference content and the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, the apparatus further includes a sequence determination unit:
[0020] A sequence determination unit is used to infer candidate content information units that match the content to be inferred from the information sequence under the target reasoning task, and the content information units in the information sequence are sorted according to the content importance; based on the sorting position of the candidate content information units in the information sequence under the target reasoning task, the candidate content information units are sorted to obtain the target information sequence;
[0021] The information processing unit is used to perform feature interaction processing on the inference content and each content information unit in the target information sequence based on the sorting position of the content information unit in the target information sequence, so as to obtain feature interaction information of each content information unit in the target information sequence.
[0022] In some embodiments, the sequence determination unit includes a unit matching subunit, a unit evaluation subunit, and a unit screening subunit:
[0023] The unit matching subunit is used to infer the preliminary content information unit that matches the content to be inferred from the information sequence under the target reasoning task;
[0024] The unit evaluation subunit is used to perform unit matching evaluation on the preliminary content information unit and the content to be inferred, and obtain a unit evaluation value corresponding to the preliminary content information unit;
[0025] The unit screening subunit is used to infer candidate content information units from preliminary content information units according to unit evaluation values.
[0026] In some embodiments, the content information unit includes unit content and an initial determination result corresponding to the unit content, and the matching degree between the content to be inferred and the content information unit represents the confidence of the initial determination result of the unit content in the content information unit;
[0027] The reasoning determination unit includes a determination update subunit and a reasoning determination subunit:
[0028] A determination updating subunit is used to update the initial determination result corresponding to each content information unit in the target information sequence according to the confidence level, and obtain an updated determination result corresponding to each unit content in the target information sequence;
[0029] The reasoning determination subunit is used to determine the reasoning result corresponding to the content to be inferred based on the update judgment result corresponding to the content of each unit in the target information sequence.
[0030] In some embodiments, the determination update subunit is configured to:
[0031] Determine valid unit contents from the unit contents of the target information sequence based on update determination results corresponding to the unit contents in the target information sequence;
[0032] According to the valid unit content and the update determination result corresponding to the valid unit content, the inference result corresponding to the content to be inferred is determined.
[0033] In some embodiments, the determination update subunit is configured to:
[0034] When the confidence level of the initial determination result of the unit content is not less than a first preset confidence level, taking the initial determination result corresponding to the unit content as an updated determination result;
[0035] When the confidence level of the initial determination result of the unit content is not greater than a second preset confidence level, the initial determination result corresponding to the unit content is inverted and the processing result is determined as an updated determination result;
[0036] When the confidence of the initial determination result of the unit content is greater than the second preset confidence and the confidence of the initial determination result of the unit content is less than the first preset confidence, the initial determination result corresponding to the unit content is adjusted to an updated determination result with an invalid result.
[0037] In some embodiments, before determining the content to be inferred and at least one information sequence, the device further includes a sample acquisition unit, an inference result determination unit, and an information sequence setting unit:
[0038] A sample acquisition unit, used to acquire a sample content set and at least one reasoning task, wherein the sample content set includes a plurality of samples;
[0039] An inference result determination unit, for performing inference analysis on each sample in the sample content set for each inference task, to obtain a sample inference result corresponding to each sample under the inference task, wherein the sample inference result is composed of at least one content information unit;
[0040] The information sequence setting unit is used to combine the content information units in the sample reasoning result corresponding to each sample under the reasoning task to obtain the information sequence under the reasoning task.
[0041] In some embodiments, the information sequence setting unit is used to:
[0042] Classify the content information units in the sample reasoning results corresponding to each sample under the reasoning task to obtain multiple categories of content information units;
[0043] Determining the content importance of each type of content information unit among the multiple types of content information units;
[0044] According to the importance of the content, multiple types of content information units are sorted to obtain a sorted information sequence.
[0045] In some embodiments, the information sequence setting unit is used to:
[0046] Determine the occurrence frequency of each type of content information unit in the content information unit set, where the content information unit set includes the content information unit in the sample reasoning result corresponding to each sample under the reasoning task;
[0047] Determine a correlation parameter between any two types of content information units among the multiple types of content information units;
[0048] Based on the occurrence frequency and the relevance parameter, the content importance of each type of content information unit in the plurality of types of content information units is determined.
[0049] In some embodiments, the inference result includes at least one content information unit; an inference output unit, configured to:
[0050] Based on the ranking position of each content information unit in the inference result in the target information sequence, the content information units in the inference result corresponding to the content to be inferred are sorted to obtain the sorted inference result corresponding to the content to be inferred, and the content information units in the sorted inference result are sorted according to the content importance;
[0051] Output the reasoning results after sorting corresponding to the content to be reasoned.
[0052] An embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores multiple instructions; the processor loads instructions from the memory to execute the steps in any content processing method provided in the embodiment of the present application.
[0053] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for a processor to load to execute the steps in any one of the content processing methods provided in the embodiment of the present application.
[0054] The embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in any one of the content processing methods provided in the embodiment of the present application.
[0055] The embodiments of the present application can determine the content to be inferred and at least one information sequence, where different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task; determine the target reasoning task corresponding to the content to be inferred from at least one reasoning task; perform feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, and the target information sequence is composed of content information units in the information sequence under the target reasoning task; based on the feature interaction information of each content information unit in the target information sequence, perform reasoning analysis processing on each content information unit in the target information sequence to determine the matching degree between the content to be inferred and each content information unit in the target information sequence; according to the matching degree, determine the reasoning result corresponding to the content to be inferred from each content information unit in the target information sequence; and output the reasoning result corresponding to the content to be inferred.
[0056] In the present application, the information sequence corresponding to each reasoning task can be determined first. After confirming the target reasoning task corresponding to the content to be reasoned, the target information sequence composed of the content information units in the information sequence under the target reasoning task can be obtained. Subsequently, each content information unit in the target information sequence is subjected to feature interaction processing in parallel with the content to be reasoned. Based on these feature interaction information, the matching degree between the content to be reasoned and each content information unit in the target information sequence can be analyzed by parallel reasoning. Then, according to the matching degree, the reasoning result corresponding to the content to be reasoned can be quickly determined from the target information sequence, which effectively reduces irrelevant calculations and avoids invalid reasoning in a huge information space, thereby reducing redundant reasoning steps. Therefore, the parallel reasoning strategy of the present application can not only significantly improve the reasoning speed and improve the reasoning efficiency, but also reduce the consumption of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0058] Figure 1a is a scenario diagram of the content reasoning method provided in an embodiment of the present application;
[0059] Figure 1b It is a flowchart of the content reasoning method provided in the embodiment of the present application;
[0060] Figure 2a It is a flowchart of applying the content reasoning method provided in the embodiment of the present application in a classification scenario;
[0061] Figure 2b This is a schematic diagram of the reasoning scenario of the candidate label information provided in the embodiment of the present application;
[0062] Figure 2c This is a schematic diagram of the inference speed of candidate label information provided by an embodiment of the present application;
[0063] Figure 2d This is a schematic diagram of a scenario for generating target tag information provided by an embodiment of the present application;
[0064] Figure 3 is a schematic diagram of the structure of a content reasoning device provided in an embodiment of the present application;
[0065] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0067] Embodiments of the present application provide a content processing method, device, electronic device, storage medium, and program product.
[0068] The content processing device may be integrated into an electronic device, which may be a terminal, a server, or the like. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC); the server may be a single server or a server cluster consisting of multiple servers.
[0069] In some embodiments, the content processing device may also be integrated into multiple electronic devices. For example, the content processing device may be integrated into multiple servers, and the content processing method of the present application may be implemented by multiple servers.
[0070] In some embodiments, the terminal may also be used as a server to implement part or all of the functions of the server.
[0071] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0072] It is understandable that in the specific implementation of this application, related content such as user information is involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant content must comply with relevant laws, regulations and standards of relevant countries and regions.
[0073] For example, refer to Figure 1aThe electronic device S1 can determine the content to be inferred and at least one information sequence, where different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task; determine the target reasoning task corresponding to the content to be inferred from at least one reasoning task; perform feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, and the target information sequence is composed of content information units in the information sequence under the target reasoning task; based on the feature interaction information of each content information unit in the target information sequence, perform reasoning analysis processing on each content information unit in the target information sequence to determine the matching degree between the content to be inferred and each content information unit in the target information sequence; according to the matching degree, determine the inference result corresponding to the content to be inferred from each content information unit in the target information sequence; the electronic device S1 can output the inference result corresponding to the content to be inferred to the electronic device S2.
[0074] The present application can first determine the information sequence corresponding to each reasoning task. After confirming the target reasoning task corresponding to the content to be reasoned, the target information sequence composed of the content information units in the information sequence under the target reasoning task can be obtained. Subsequently, each content information unit in the target information sequence is subjected to feature interaction processing in parallel with the content to be reasoned. Based on these feature interaction information, the matching degree between the content to be reasoned and each content information unit in the target information sequence can be analyzed by parallel reasoning. Then, based on the matching degree, the reasoning result corresponding to the content to be reasoned can be quickly determined from the target information sequence, effectively reducing irrelevant calculations, avoiding invalid reasoning in a huge information space, and thus reducing redundant reasoning steps. Therefore, the parallel reasoning strategy of the present application can not only significantly improve the reasoning speed and improve the reasoning efficiency, but also reduce the consumption of computing resources.
[0075] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0076] In this embodiment, a content reasoning method is provided, such as Figure 1b As shown, the specific process of the content reasoning method can be as follows:
[0077] 101. Determine content to be inferred and at least one information sequence, where different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task.
[0078] The content to be inferred refers to the content that needs to be assigned to a specific reasoning task for processing, and it can include at least one of various forms of data such as text, image, video, audio, etc. For example, the content to be inferred can be content that has not yet participated in any reasoning task, or content that has participated in some reasoning tasks but still needs to be processed by other reasoning tasks, and so on.
[0079] Reasoning tasks are tasks set according to reasoning requirements. Different reasoning requirements correspond to different reasoning tasks. For example, reasoning tasks can be reasoning tasks for a single form of data or for multiple forms of data. Reasoning tasks for each form of data can be further subdivided according to specific reasoning requirements.
[0080] Reasoning requirements refer to the need to interpret, judge, and infer information through logical reasoning or analysis in a specific application scenario. For example, reasoning requirements can be of various types, such as classification reasoning requirements, text reasoning requirements, causal reasoning requirements, and predictive reasoning requirements.
[0081] Classification reasoning requirements refer to the requirements of classifying the reasoning content into specific categories or groups through analysis and reasoning. For example, classification reasoning requirements can be object classification requirements, email classification requirements, sentiment analysis requirements, object recognition requirements, action recognition requirements, etc.
[0082] The need for text reasoning refers to inferring the next development direction from the content to be inferred in order to take appropriate actions or draw reasonable conclusions.
[0083] For example, if the content to be inferred is a question raised by the user, the text reasoning requirement needs to identify potential needs from the question in order to generate a response that can answer the question. The text reasoning requirement can also be to understand the content to be inferred, predict or deduce the next writing direction or theme development, so as to guide subsequent creation or narration, etc.
[0084] Causal reasoning needs refer to understanding the mutual influence and causal relationship between different events or situations by analyzing the causal relationship in the content to be reasoned. For example, in the medical field, the causal reasoning needs may be to infer possible diseases based on the user's symptoms, or in the business field, it may be possible to infer the impact of promotional activities on sales based on sales data, and so on.
[0085] Predictive reasoning needs are the need to make future predictions based on existing data or trends. For example, predictive reasoning needs may require inferring weather conditions in the next few days through historical data, predicting the sales performance of a product through market trends, and so on.
[0086] An information sequence refers to a collection of content information units set in advance according to the reasoning task, which is used to ensure that the reasoning is only performed within the specified information range during the reasoning process. After the information sequence is set, new content information units can be added to the information sequence according to the reasoning requirements of the reasoning task, so as to better adapt to the changes and expansions of the reasoning task.
[0087] Content information unit refers to the information unit that serves as the basic element in the reasoning task. Each content information unit usually contains specific knowledge or data and can provide the necessary basis and support for the reasoning process.
[0088] For example, if the reasoning task is a task set according to classification reasoning requirements, the content information unit is label information, which is a descriptive identifier used to distinguish and identify different types of content to help the classification system or users quickly identify and understand the type of content.
[0089] If the reasoning task is set according to the text reasoning requirements, then the content information unit is the basic information element related to the text reasoning requirements. By analyzing the reasoning content, key information can be inferred from the content information unit of the information sequence under the reasoning task, and then a reasonable conclusion or answer can be drawn to meet the target requirements of text reasoning.
[0090] If the reasoning task is a task set according to the causal reasoning requirements, the content information unit is the information element corresponding to the cause and the result. By analyzing the cause in the content to be reasoned, the corresponding result can be inferred from the content information unit of the information sequence under the reasoning task.
[0091] If the reasoning task is a task set according to the prediction reasoning requirements, the content information unit is the entity information corresponding to the prediction target. By analyzing the prediction requirements in the content to be reasoned, the expected result can be inferred from the content information unit of the information sequence under the reasoning task.
[0092] In some embodiments, in order to obtain various content information units that may be involved in different reasoning tasks; before determining the content to be inferred and at least one information sequence, the method further includes:
[0093] Acquire a sample content set and at least one reasoning task, where the sample content set includes a plurality of samples;
[0094] For each reasoning task, perform reasoning analysis on each sample in the sample content set to obtain a sample reasoning result corresponding to each sample under the reasoning task, wherein the sample reasoning result is composed of at least one content information unit;
[0095] The content information units in the sample reasoning results corresponding to each sample under the reasoning task are combined to obtain the information sequence under the reasoning task.
[0096] The sample content set refers to a representative set of samples collected under at least one reasoning task. By analyzing these samples, corresponding content information units can be allocated to each reasoning task.
[0097] A sample refers to the specific content that can represent the reasoning task and needs to be inferred, and the sample can include at least one of various forms of data such as text, image, video, audio, etc.
[0098] The sample reasoning result corresponding to the sample refers to the basic information unit that constitutes the reasoning conclusion generated by the sample in the reasoning task.
[0099] For example, if the reasoning task is a task set according to classification reasoning requirements, the content information unit of the sample reasoning result corresponding to the sample may be label information.
[0100] For example, if the reasoning task is a task set according to the causal reasoning requirement, the content information unit in the sample reasoning result corresponding to the sample may be an information unit containing a causal relationship.
[0101] For example, if the reasoning task is a task set according to predictive reasoning requirements, the content information unit in the sample reasoning result corresponding to the sample may be entity information.
[0102] Entity information refers to an object or concept that actually exists and has independent meaning in a specific context. It usually represents a specific thing, concept, individual or event. It can be an object, person, place in the physical world, or an abstract concept or category, etc.
[0103] The annotation method of the inference result corresponding to each sample in the inference task can be:
[0104] 1) After reasoning the samples in the sample content set through the sample reasoning model corresponding to the reasoning task, the sample reasoning result corresponding to each sample under the reasoning task is obtained.
[0105] 2) It is also possible to manually label the samples in the sample content set according to the reasoning task, and obtain the sample reasoning result corresponding to each sample under the reasoning task.
[0106] For example, if the reasoning task is a task set according to text reasoning requirements, the sample reasoning result corresponding to the sample may be composed of at least one character, wherein the character has complete semantics.
[0107] The combination method of sample reasoning results corresponding to each sample in the reasoning task:
[0108] 1) After obtaining multiple types of content information units from the sample reasoning results corresponding to each sample under the reasoning task, the multiple types of content information units are sorted according to the content importance and weight of each type of content information unit in the reasoning task to obtain an information sequence.
[0109] 2) It is also possible to sort the multiple types of content information units according to the occurrence frequency of each type of content information unit in the multiple types of content information units to obtain the information sequence.
[0110] 3) Alternatively, the information sequence may be obtained by manually sorting multiple types of content information units under the reasoning task.
[0111] In some embodiments, in order to prioritize various content information units in the reasoning task, so that in the subsequent reasoning process, the relevant content information units can effectively participate in the specific task; the content information units in the sample reasoning result corresponding to each sample under the reasoning task are combined to obtain the information sequence under the reasoning task, including:
[0112] Classify the content information units in the sample reasoning results corresponding to each sample under the reasoning task to obtain multiple categories of content information units;
[0113] Determining the content importance of each type of content information unit among the multiple types of content information units;
[0114] According to the importance of the content, multiple types of content information units are sorted to obtain a sorted information sequence.
[0115] Among them, the multiple types of content information units are different types of content information units extracted from the content information units in the sample reasoning results corresponding to each sample under the reasoning task.
[0116] For example, the sample content set includes sample 1, sample 2 and sample 3. Under the reasoning task, the reasoning result corresponding to sample 1 includes content information unit a and content information unit b, the reasoning result corresponding to sample 2 includes content information unit b and content information unit c, and the reasoning result corresponding to sample 3 includes content information unit d. By extracting the content information units of all samples, multiple categories of content information units can be obtained, namely content information unit a, content information unit b, content information unit c and content information unit d.
[0117] Content importance is used to indicate the importance of the corresponding content information unit in the reasoning task.
[0118] For example, content importance may refer to the frequency of occurrence of each content information unit in the sample inference result corresponding to each sample in the sample content set under the reasoning task, as well as the correlation between the content information units. It may also refer to the hierarchical relationship of the content information units in the sample inference result corresponding to each sample in the sample content set, such as parent label information and sub-label information under the parent label information, and so on.
[0119] In some embodiments, in order to obtain the parameters required for sorting various types of content information units under the reasoning task; determining the content importance of each type of content information unit in the multiple types of content information units includes:
[0120] Determine the occurrence frequency of each type of content information unit in the content information unit set, where the content information unit set includes the content information unit in the sample reasoning result corresponding to each sample under the reasoning task;
[0121] Determine a correlation parameter between any two types of content information units among the multiple types of content information units;
[0122] Based on the occurrence frequency and the relevance parameter, the content importance of each type of content information unit in the plurality of types of content information units is determined.
[0123] The content information unit set refers to the set of content information units in the sample reasoning result corresponding to each sample in the sample content set under the reasoning task.
[0124] The occurrence frequency refers to the number of times a certain content information unit appears in the content information unit set, reflecting the frequency of the content information unit appearing in the sample inference results corresponding to all samples.
[0125] The correlation parameter is an indicator used to measure the relationship between any two types of content information units, reflecting the co-occurrence of these two types of content information units in the sample and the degree of their mutual dependence.
[0126] In some embodiments, when the correlation parameter between content information unit a and content information unit b among multiple categories of content information units is large, and the occurrence frequency of content information unit a is high while the occurrence frequency of content information unit b is low, the content importance of content information unit b can be improved due to its correlation with content information unit a, thereby compensating for the impact of its low occurrence frequency on the content importance.
[0127] 102. Determine a target reasoning task corresponding to the content to be reasoned from at least one reasoning task.
[0128] Among them, the target reasoning task refers to the reasoning task that the content to be reasoned needs to participate in.
[0129] For example, the target reasoning task can be a reasoning task in which the user needs to participate in the reasoning content selected from at least one reasoning task, or it can be a target reasoning task that matches the content to be reasoned, or it can be a target reasoning task determined from at least one reasoning task based on the reasoning requirements of the content to be reasoned, and so on.
[0130] 103. Perform feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, wherein the target information sequence is composed of content information units in the information sequence under the target reasoning task.
[0131] The target information sequence refers to a sequence of content information units selected from the information sequence under the target reasoning task and used to participate in the reasoning processing of the content to be reasoned.
[0132] The feature interaction information reflects the relationship between the content to be inferred and each content information unit in the target information sequence. This relationship can reveal the potential connection between the content to be inferred and each content information unit in the target information sequence. Among them, the extraction of feature interaction information can not only capture the linear relationship between the content to be inferred and each content information unit in the target information sequence, but also mine complex nonlinear patterns, thereby improving the accuracy and robustness of the reasoning task.
[0133] In some embodiments, in order to screen out some content information units related to the content to be inferred in advance, thereby reducing the number of content information units required in the subsequent reasoning process; performing feature interaction processing on the content to be inferred and each content information unit in the target information sequence, before obtaining feature interaction information of each content information unit in the target information sequence, it also includes:
[0134] Inferring candidate content information units that match the content to be inferred from the information sequence under the target reasoning task, and sorting the content information units in the information sequence according to the importance of the content;
[0135] Based on the ranking positions of the candidate content information units in the information sequence under the target reasoning task, the candidate content information units are sorted to obtain the target information sequence;
[0136] Performing feature interaction processing on each content information unit in the inference content and the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, including:
[0137] Based on the sorting positions of the content information units in the target information sequence, feature interaction processing is performed on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence.
[0138] The information sequence is a sequence obtained by sorting the content information units according to the content importance of each content information unit under the target reasoning task.
[0139] The candidate content information units are determined from the information sequence under the target reasoning task and are used to participate in the content information units required for the reasoning of the content to be reasoned.
[0140] The ranking position of each content information unit in the information sequence and the target information sequence can reveal the relative importance of these content information units in their respective sequences.
[0141] The role of the sorting position of content information units in the target information sequence in feature interaction information:
[0142] 1) The ranking position can help content processing models (such as large language models, classification models, etc.) identify the relative importance of content information units in feature interactions. Content information units with higher rankings may have higher weights in the interaction and affect the final classification decision.
[0143] 2) The sorting position can also reflect the order of content information units in the target information sequence. The content processing model can use this sorting position to capture the dependencies and hierarchical structures between content information units, thereby improving the understanding of complex features.
[0144] 3) The ranking position can help the content processing model understand the relative priority between different content information units. The higher the ranking of the label, the greater the influence it may have when the features interact, further strengthening the content processing model's attention to important features.
[0145] 4) During the feature interaction process, the sorting position provides a dynamic adjustment mechanism for the content processing model, so that tags at specific positions can play different roles in different contexts, improving the flexibility and adaptability of the content processing model.
[0146] In some embodiments, when the information sequence under the target reasoning task contains a large number of content information units, in order to reduce the number of content information units that need to be processed during the reasoning process, a part of the content information units can be screened out as candidate content information units, thereby reducing the computational burden of the content to be inferred during the reasoning process.
[0147] In some embodiments, in order to verify the content information units related to the content to be inferred that are screened in advance, so as to ensure that these content information units can effectively participate in the subsequent processing and reasoning tasks of the content to be inferred; inferring the candidate content information units matching the content to be inferred from the information sequence under the target reasoning task, including:
[0148] Inferring preliminary content information units that match the content to be inferred from the information sequence under the target reasoning task;
[0149] Performing unit matching evaluation on the preliminary content information unit and the content to be inferred to obtain a unit evaluation value corresponding to the preliminary content information unit;
[0150] Based on the unit evaluation values, candidate content information units are inferred from the preliminary content information units.
[0151] The preliminary content information unit refers to a content information unit that is initially screened out from the information sequence of the target reasoning task and is related to the content to be reasoned.
[0152] The unit evaluation value is used to measure the relevance of the preliminary content information unit to the content to be inferred.
[0153] In some embodiments, determining a preliminary content information unit matching the content to be inferred from the information sequence under the target reasoning task includes:
[0154] By using the approximate model, the preliminary content information unit matching the content to be inferred is determined from the information sequence under the target reasoning task;
[0155] Perform unit matching evaluation on the preliminary content information unit and the content to be inferred to obtain a unit evaluation value corresponding to the preliminary content information unit, including:
[0156] Through the target model, the unit matching evaluation is performed on the preliminary content information unit and the content to be inferred, and the unit evaluation value corresponding to the preliminary content information unit is obtained.
[0157] Among them, the approximate model is a model with a simpler structure and lower computational cost, which aims to screen out preliminary content information units.
[0158] The target model is a model used to verify that the preliminary content information unit matches the content to be inferred.
[0159] The unit evaluation value is the probability that the target model accepts the preliminary content information unit screened by the approximate model.
[0160] 104. Based on the feature interaction information of each content information unit in the target information sequence, perform reasoning analysis on each content information unit in the target information sequence to determine the matching degree between the content to be inferred and each content information unit in the target information sequence.
[0161] The matching degree refers to the probability that the predicted content to be inferred matches each content information unit in the target information sequence.
[0162] 105. According to the matching degree, determine the inference result corresponding to the content to be inferred from each content information unit of the target information sequence.
[0163] The inference result refers to the result composed of content information units selected from the target information sequence and whose matching degree meets the preset conditions.
[0164] The preset condition refers to a pre-defined condition used to determine whether a content information unit matches the content to be inferred.
[0165] In some embodiments, in order to determine whether the content to be inferred matches the content information unit; the content information unit includes unit content and an initial determination result corresponding to the unit content, and the degree of matching between the content to be inferred and the content information unit represents the confidence of the initial determination result of the unit content in the content information unit;
[0166] According to the matching degree, the inference result corresponding to the content to be inferred is determined from each content information unit of the target information sequence, including:
[0167] According to the confidence level, the initial determination result corresponding to each content information unit in the target information sequence is updated to obtain the updated determination result corresponding to each unit content in the target information sequence;
[0168] Based on the update judgment results corresponding to the contents of each unit in the target information sequence, the inference results corresponding to the contents to be inferred are determined.
[0169] The unit content refers to the specific unit information that needs to be inferred from the content information unit.
[0170] For example, if the reasoning task corresponds to the classification reasoning requirement, the unit content in the content information unit is a specific identifier used to identify the content to be reasoned. For example, the unit content can be a label name, label characters, classification identifier, or other forms of descriptive symbols. Through these unit contents, different categories of content can be distinguished and identified, thereby ensuring that the content to be reasoned can be accurately classified and processed.
[0171] If the reasoning task corresponds to the text reasoning requirement, the unit content in the content information unit is the characters with complete semantics required to meet the text reasoning requirement. For example, if the text reasoning requirement requires identifying potential requirements from the question, the unit content is the semantic component that can constitute the answer to the question.
[0172] If the reasoning task corresponds to a causal reasoning requirement, the unit content in the content information unit is the information unit containing the causal relationship required to meet the causal reasoning requirement. For example, the causal reasoning requirement may be the need to infer possible diseases based on the user's symptoms, and the unit content is the name of the disease corresponding to the symptoms, etc.
[0173] If the reasoning task corresponds to a predictive reasoning requirement, the unit content in the content information unit is the predictive element required to meet the predictive reasoning requirement. For example, the predictive reasoning requirement may be the need to predict the weather, and the unit content is the elements or information related to the weather, and so on.
[0174] The initial judgment result is the judgment result corresponding to the preset unit content, but it cannot reflect the matching relationship between the unit content and the content to be inferred. For example, the initial judgment result can be "yes", "no", etc., and the content information unit can be expressed as (unit content, no) or (unit content, yes), etc.
[0175] The confidence level is used to indicate the probability that the content information unit matches the content to be inferred. For example, the confidence level can be expressed as a percentage or a value between 0 and 1.
[0176] The update judgment result is used to indicate the matching relationship between the content to be inferred and the unit content.
[0177] For example, when the confidence level indicates that the content to be inferred is consistent with the initial determination result of the unit content, the updated determination result is the same as the initial determination result.
[0178] When the confidence level indicates that the content to be inferred is inconsistent with the initial determination result of the unit content, the updated determination result is opposite to the initial determination result.
[0179] In some embodiments, in order to select valid unit content from a plurality of content information units, based on the update determination results corresponding to each unit content in the target information sequence, determining the inference result corresponding to the content to be inferred includes:
[0180] Determine valid unit contents from the unit contents of the target information sequence based on update determination results corresponding to the unit contents in the target information sequence;
[0181] According to the valid unit content and the update determination result corresponding to the valid unit content, the inference result corresponding to the content to be inferred is determined.
[0182] The effective unit content refers to the unit content in the target information sequence that can accurately reflect the characteristics of the content to be inferred after being indicated by the updated judgment result.
[0183] In some embodiments, the unit content corresponding to the update determination result "yes" or "no" is determined as a valid unit content, where (unit content, yes) and (unit content, no) are used as inference results.
[0184] In some embodiments, in order to distinguish valid unit content from invalid unit content, the initial determination result corresponding to each content information unit in the target information sequence is updated according to the confidence level to obtain the updated determination result corresponding to each unit content in the target information sequence, including:
[0185] When the confidence level of the initial determination result of the unit content is not less than the first preset confidence level, taking the initial determination result corresponding to the unit content as the updated determination result;
[0186] When the confidence level of the initial determination result of the unit content is not greater than the second preset confidence level, the initial determination result corresponding to the unit content is inverted and the processing result is determined as the updated determination result;
[0187] When the confidence of the initial determination result of the unit content is greater than the second preset confidence and the confidence of the initial determination result of the unit content is less than the first preset confidence, the initial determination result corresponding to the unit content is adjusted to an updated determination result with an invalid result.
[0188] The first preset confidence level is used to indicate that the content to be inferred matches the initial determination result of the unit content. When the confidence level is not less than the first preset confidence level, the updated determination result is the same as the initial determination result.
[0189] The second preset confidence level is used to indicate that the content to be inferred does not match the initial determination result of the unit content. If the confidence level is not greater than the second preset confidence level, the updated determination result is opposite to the initial determination result. For example, if the initial determination result is "no", the updated determination result is "yes".
[0190] The result is invalid and the correspondence between the content to be inferred and the unit content cannot be clearly determined.
[0191] In some embodiments, when the second preset confidence level < confidence level < first preset confidence level, since the relationship between the content to be inferred and the unit content cannot be determined, the result of updating the determination result is invalid.
[0192] 106. Output the reasoning result corresponding to the content to be reasoned.
[0193] In some embodiments, in order to facilitate users to preferentially focus on more important content information units in the inference results after the corresponding inference results are obtained for the content to be inferred; the inference results include at least one content information unit; outputting the inference results corresponding to the content to be inferred includes:
[0194] Based on the ranking position of each content information unit in the inference result in the target information sequence, the content information units in the inference result are sorted to obtain the sorted inference result corresponding to the content to be inferred, and the content information units in the sorted inference result are sorted according to the content importance;
[0195] Output the reasoning results after sorting corresponding to the content to be reasoned.
[0196] The inference result after sorting is a result obtained by sorting each content information unit in the inference result corresponding to the inference content according to the importance of the content.
[0197] In some embodiments, when there are repeated content information units in the target information sequence, there may be repeated content information units in the inference result corresponding to the content to be inferred. In order to remove duplicates from the inference result corresponding to the content to be inferred, after determining the inference result corresponding to the content to be inferred from each content information unit of the target information sequence according to the matching degree, the method further includes:
[0198] Repeat the detection of the inference results corresponding to the inference content;
[0199] When repeated content information units are detected, deduplication processing is performed on the repeated content information units to obtain an inference result after deduplication processing.
[0200] The repeated content information unit refers to a repeated content information unit in the inference result corresponding to the content to be inferred.
[0201] The deduplication-processed inference result refers to a unique content information unit obtained after removing duplicate items from repeated content information units.
[0202] In some embodiments, in order to train a model for inferring the content to be inferred, feature interaction processing is performed on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, including:
[0203] Through the content processing model, feature interaction processing is performed on each content information unit in the inference content and the target information sequence to obtain feature interaction information of each content information unit in the target information sequence;
[0204] Before performing feature interaction processing on the inference content and each content information unit in the target information sequence through the content processing model to obtain feature interaction information of each content information unit in the target information sequence, the method further includes:
[0205] Acquire training data, where the training data includes sample content and expected content information units of the sample content;
[0206] Determine a sample reasoning task corresponding to the sample content from at least one reasoning task;
[0207] Through the content processing model, feature interaction processing is performed on the sample content and each content information unit in the information sequence under the sample reasoning task, and feature interaction information of each content information unit in the information sequence under the sample reasoning task is obtained;
[0208] Based on the feature interaction information of each content information unit in the information sequence under the sample reasoning task, determine the sample matching degree between the sample content and each content information unit in the information sequence under the sample reasoning task;
[0209] According to the sample matching degree, determining the sample content information unit corresponding to the sample content from each content information unit of the information sequence under the sample reasoning task;
[0210] Model parameters in the content processing model are adjusted based on the sample content information unit and the expected content information unit.
[0211] The content processing model is a model used to classify the content to be inferred. For example, the content processing model can be a large language model, a classification model, etc.
[0212] The sample dataset is a set of samples used to train the content processing model.
[0213] The sample content is a sample for training the content processing model.
[0214] The expected content information unit is the correct content information unit expected for the sample content.
[0215] Sample reasoning tasks refer to tasks used to reason about sample content.
[0216] Sample matching degree refers to the probability that the predicted sample content matches each content information unit in the information sequence under the sample reasoning task.
[0217] Sample label information refers to the content information unit selected from the information sequence under the sample reasoning task and whose sample matching degree meets the preset conditions.
[0218] As can be seen from the above, the embodiments of the present application can determine the content to be inferred, and at least one information sequence, different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task; determine the target reasoning task corresponding to the content to be inferred from at least one reasoning task; perform feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, and the target information sequence is composed of content information units in the information sequence under the target reasoning task; based on the feature interaction information of each content information unit in the target information sequence, perform reasoning analysis processing on each content information unit in the target information sequence to determine the matching degree between the content to be inferred and each content information unit in the target information sequence; according to the matching degree, determine the reasoning result corresponding to the content to be inferred from each content information unit in the target information sequence; and output the reasoning result corresponding to the content to be inferred.
[0219] Therefore, this scheme can first determine the information sequence corresponding to each reasoning task. After confirming the target reasoning task corresponding to the content to be reasoned, the target information sequence composed of the content information units in the information sequence under the target reasoning task can be obtained. Subsequently, each content information unit in the target information sequence is processed in parallel with the content to be reasoned. Based on these feature interaction information, the matching degree between the content to be reasoned and each content information unit in the target information sequence can be analyzed by parallel reasoning. Then, according to the matching degree, the reasoning result corresponding to the content to be reasoned can be quickly determined from the target information sequence, which effectively reduces irrelevant calculations and avoids invalid reasoning in a huge information space, thereby reducing redundant reasoning steps. Therefore, this parallel reasoning strategy of the present application can not only significantly improve the reasoning speed and improve the reasoning efficiency, but also reduce the consumption of computing resources.
[0220] The method described in the above embodiment will be further described in detail below.
[0221] In this embodiment, the method of the embodiment of the present application is described in detail by taking the content to be inferred as the content to be classified and the reasoning task as the classification task as an example.
[0222] like Figure 2a As shown, the specific process of a content reasoning method is as follows:
[0223] 201. Determine content to be classified and at least one information sequence, where different information sequences correspond to different classification tasks, and each information sequence includes at least one label information under the corresponding classification task.
[0224] In some embodiments, before determining the content to be classified and at least one information sequence, the method further includes:
[0225] Acquire a sample content set and at least one classification task, where the sample content set includes a plurality of samples;
[0226] For each classification task, determine the label information corresponding to each sample under the classification task;
[0227] The label information corresponding to each sample under the classification task is combined to obtain the information sequence under the classification task.
[0228] In some embodiments, the label information corresponding to each sample under the classification task is combined to obtain an information sequence under the classification task, including:
[0229] Perform label classification processing on the label information corresponding to each sample in the classification task to obtain multi-class label information;
[0230] Determine the label importance of each type of label information among multiple types of label information;
[0231] According to the importance of tags, multiple types of tag information are sorted to obtain a preset tag information sequence after sorting.
[0232] In some embodiments, determining the tag importance of each type of tag information in multiple types of tag information includes:
[0233] Determine the frequency of occurrence of each type of label information in the label information set, where the label information set includes the label information corresponding to each sample under the classification task;
[0234] Determine a correlation parameter between any two types of label information among multiple types of label information;
[0235] Based on the occurrence frequency and relevance parameters, the tag importance of each type of tag information in the multiple types of tag information is determined.
[0236] 202. Determine a target classification task corresponding to the content to be classified from at least one classification task.
[0237] 203. Perform feature interaction processing on the content to be classified and each label information in the target information sequence to obtain feature interaction information of each label information in the target information sequence, wherein the target information sequence is composed of label information in the information sequence under the target classification task.
[0238] In some embodiments, before performing feature interaction processing on the content to be classified and each tag information in the target information sequence to obtain feature interaction information of each tag information in the target information sequence, the process further includes:
[0239] Determine candidate label information matching the content to be classified from the information sequence under the target classification task, and sort the label information in the information sequence according to label importance;
[0240] Based on the ranking position of the candidate label information in the information sequence under the target classification task, the candidate label information is sorted to obtain the target information sequence;
[0241] Perform feature interaction processing on the content to be classified and each label information in the target information sequence to obtain feature interaction information of each label information in the target information sequence, including:
[0242] Based on the sorting position of the label information in the target information sequence, feature interaction processing is performed on the content to be classified and each label information in the target information sequence to obtain feature interaction information of each label information in the target information sequence.
[0243] In some embodiments, determining candidate tag information matching the content to be classified from the information sequence under the target classification task includes:
[0244] Determine preliminary label information matching the content to be classified from the information sequence under the target classification task;
[0245] Perform label matching evaluation on the preliminary label information and the content to be classified to obtain a label evaluation value corresponding to the preliminary label information;
[0246] According to the label evaluation value, candidate label information is determined from the preliminary label information.
[0247] Based on the ranking position of the candidate label information in the information sequence under the target classification task, the candidate label information is sorted to obtain the target information sequence.
[0248] In some embodiments, feature interaction processing is performed on the content to be classified and each tag information in the target information sequence to obtain feature interaction information of each tag information in the target information sequence, including:
[0249] Through the large language model, feature interaction processing is performed on the content to be classified and each label information in the target information sequence to obtain feature interaction information of each label information in the target information sequence.
[0250] In some embodiments, in order to avoid the problem of backtracking and regenerating sequences due to inaccurate predictions in traditional speculative sampling, this method ensures the accuracy of the generation process and reduces the waste of computing resources caused by incorrect predictions;
[0251] Through the large language model, feature interaction processing is performed on the content to be classified and each label information in the target information sequence to obtain feature interaction information of each label information in the target information sequence, including:
[0252] Perform splicing processing on the content to be classified and the target information sequence to obtain spliced content;
[0253] The feature interaction information of each label information in the target information sequence is obtained by performing feature interaction processing on the concatenated content through a large language model.
[0254] In some embodiments, in order to enable the large language model to understand the meaning of these label information based on the existing context and make subsequent predictions based on them. This approach ensures that the label information is processed at the last stage of generation, thereby maximizing the impact of the label information on the generation results;
[0255] The content to be classified and the target preset label information sequence are spliced to obtain spliced content, including:
[0256] The target preset label information sequence is concatenated at the end of the content to be classified to obtain the concatenated content.
[0257] In some embodiments, the information sequence under at least one classification task is integrated at the input of the large language model.
[0258] In some embodiments, candidate tag information matching the content to be classified is determined from the information sequence under the target classification task, and the tag information in the information sequence is sorted according to the tag importance, including:
[0259] Through the approximate model, the preliminary label information matching the content to be classified is determined from the information sequence under the target classification task;
[0260] Through the target model, the preliminary label information and the content to be classified are evaluated for label matching to obtain the label evaluation value corresponding to the preliminary label information;
[0261] Determine candidate label information from preliminary label information according to the label evaluation value;
[0262] Based on the ranking position of the candidate label information in the information sequence under the target classification task, the candidate label information is sorted to obtain the target information sequence.
[0263] like Figure 2b and 2c As shown in Figure 1, by preliminarily screening the information sequence under the target classification task, the optimized target information sequence can be obtained, thereby increasing the calculation speed to 6.86 times the original. Compared with the information sequence under the target classification task, the cost of the target information sequence participating in the classification process is shown in Table 1:
[0264] Graphics Processing Unit Machines A10 T4 Cost of service original 1600ms 3000ms 7,000 yuan / month This application 300ms 500ms 1,200 yuan / month
[0265] Table 1
[0266] This application not only significantly improves the reasoning speed of large language models in classification and label generation tasks, but also improves the accuracy and efficiency of reasoning by precisely controlling the input target information sequence. The implementation of this method is particularly important for commercial applications that require fast and accurate label information, such as online content management, real-time recommendation systems, etc.
[0267] In some embodiments, determining preliminary label information matching the content to be classified from the information sequence under the target classification task includes:
[0268] Through the approximate model, the preliminary label information matching the content to be classified is determined from the information sequence under the target classification task;
[0269] Perform label matching evaluation on the preliminary label information and the content to be classified to obtain the label evaluation value corresponding to the preliminary label information, including:
[0270] Through the target model, the preliminary label information and the content to be classified are evaluated for label matching to obtain the label evaluation value corresponding to the preliminary label information.
[0271] 204. Based on the feature interaction information of each tag information in the target information sequence, perform reasoning analysis on each tag information in the target information sequence to determine the matching degree between the content to be classified and each tag information in the target information sequence.
[0272] 205. According to the matching degree, determine the target label information corresponding to the content to be classified from each label information of the target information sequence.
[0273] In some embodiments, the tag information includes tag content and an initial determination result corresponding to the tag content, and the matching degree between the content to be classified and the tag information represents the confidence of the initial determination result of the tag content in the tag information;
[0274] According to the matching degree, the target label information corresponding to the content to be classified is determined from each label information of the target information sequence, including:
[0275] According to the confidence level, the initial determination result corresponding to each label content in the target information sequence is updated to obtain the updated determination result corresponding to each label content in the target information sequence;
[0276] Based on the update determination result corresponding to each label content in the target information sequence, the target label information corresponding to the content to be classified is determined.
[0277] In some embodiments, determining target tag information corresponding to the content to be classified based on the update determination result corresponding to each tag content in the target information sequence includes:
[0278] Determine valid label content from the label content of the target information sequence based on the update determination result corresponding to each label content in the target information sequence;
[0279] According to the valid label content and the update determination result corresponding to the valid label content, the target label information corresponding to the content to be classified is determined.
[0280] In some embodiments, the initial determination result corresponding to each tag content in the target information sequence is updated according to the confidence level to obtain the updated determination result corresponding to each tag content in the target information sequence, including:
[0281] When the confidence level of the initial determination result of the tag content is not less than the first preset confidence level, taking the initial determination result corresponding to the tag content as the updated determination result;
[0282] When the confidence level of the initial determination result of the tag content is not greater than the second preset confidence level, the initial determination result corresponding to the tag content is inverted, and the processing result is determined as the updated determination result;
[0283] When the confidence of the initial determination result of the tag content is greater than the second preset confidence and the confidence of the initial determination result of the tag content is less than the first preset confidence, the initial determination result corresponding to the tag content is adjusted to an updated determination result with an invalid result.
[0284] like Figure 2d As shown, when the target preset label information sequence includes label content 1, no, label content 2, no, based on the confidence of the initial determination result of each label content in the label information, the target label information corresponding to the content to be classified can be obtained.
[0285] In some embodiments, after determining the target tag information corresponding to the content to be classified from each tag information of the target information sequence according to the matching degree, the method further includes:
[0286] Based on the sorting position of the target tag information in the target information sequence, the target tag information corresponding to the content to be classified is sorted to obtain a sorted target tag information sequence corresponding to the content to be classified, and the tag information in the target information sequence is sorted according to the tag importance.
[0287] In some embodiments, after determining the target tag information corresponding to the content to be classified from each tag information of the target information sequence according to the matching degree, the method further includes:
[0288] Perform label duplication detection on the target label information corresponding to the classified content;
[0289] When duplicate target label information is detected, the duplicate target label information is deduplicated to obtain deduplicated target label information.
[0290] 206. Output target label information corresponding to the content to be classified.
[0291] In some embodiments, the effect of the present application, including reasoning speed and accuracy, is evaluated through feedback from actual application scenarios, and the generation strategy and model parameters of the information sequence are adjusted according to the evaluation results to further optimize the performance.
[0292] In some embodiments, it is ensured that the application can flexibly adapt to data of different scales and various application scenarios and maintain good scalability.
[0293] This application proposes an improved Large Language Model (LLM) reasoning method, which is particularly suitable for label classification tasks. In the traditional LLM reasoning process, the large language model needs to generate each semantic unit (token) serially, that is, the generation of each new token depends on the previously generated token sequence. This serial reasoning method leads to a slow reasoning speed, especially when processing long sequences.
[0294] The core innovation of this application is that by pre-identifying and integrating possible information sequences, the step-by-step derivation process in the traditional serial reasoning model is bypassed, so that classification can be performed quickly without relying on lengthy reasoning steps. Specifically, the method of this application includes the following steps:
[0295] 1) Pre-identify possible tag information tokens: Before reasoning, pre-identify possible tag information tokens based on the characteristics of the classification task and classification requirements. This step can be achieved by analyzing historical data and using domain knowledge.
[0296] Since the preset tag information tokens are carefully selected based on historical data analysis and input from domain experts, the relevance and accuracy of the input are guaranteed. Therefore, the large language model can more accurately generate tags or classification results that are consistent with the actual application scenario during the reasoning process, reducing the possibility of misjudgment.
[0297] 2) Construct a preset token sequence: Construct the pre-identified tag information tokens into a preset token sequence according to a certain logic or priority order, that is, the preset tag information sequence.
[0298] 3) One-time reasoning generation: Using the improved LLM, the entire preset token sequence is directly used as input for one-time reasoning. In this way, all label information tokens are processed at the same time, which significantly improves the reasoning speed.
[0299] 4) Output result processing: Based on the inference output, necessary post-processing is performed to ensure the accuracy and usability of the results.
[0300] The technical advantages of this application are mainly reflected in:
[0301] Improved efficiency: By reducing the sequential dependencies in reasoning, the reasoning speed is significantly accelerated, especially when processing large amounts of data.
[0302] Strong adaptability: This method is not only suitable for specific label classification tasks, but can also adjust the generation strategy of preset label information tokens according to different application scenarios, with good versatility and flexibility.
[0303] Reduce resource consumption: One-time reasoning reduces repeated calculations, reduces the demand for computing resources, and helps save costs. In traditional reasoning methods, the model may require multiple iterations to reach the final result, and each iteration consumes computing resources. This application reduces the number of iterations in the reasoning process and directly outputs the final result, thereby effectively reducing the demand for computing resources and saving operating costs.
[0304] In summary, the present invention provides an efficient and flexible LLM reasoning method, which is particularly suitable for processing label classification tasks that require fast response, and has important practical value and broad application prospects.
[0305] This application significantly improves the reasoning efficiency and accuracy of label classification and label generation tasks based on the LLM model through an innovative method. Compared with the existing speculative sampling technology, this application has the following significant advantages:
[0306] Improved accuracy: In label classification tasks, since all possible label information tokens can be known in advance, this application significantly reduces the time consumption in the traditional serial reasoning process by directly splicing these predefined label information tokens to the end of the input sequence, and realizes one-time fast reasoning. This method not only optimizes the reasoning process, but also reduces the consumption of computing resources, thereby avoiding the problem of backtracking and regenerating sequences due to inaccurate predictions in traditional speculative sampling. This method ensures the accuracy of the generation process and reduces the waste of computing resources caused by incorrect predictions.
[0307] In addition, this one-time reasoning method avoids the generation and reliance on label information tokens one by one, thereby greatly improving the overall processing speed, especially in a big data environment.
[0308] Simplify the reasoning process: This application does not rely on complex control logic to manage the parallel generated sequence, but adopts a simple and direct approach, that is, pre-setting possible tag information tokens, and then directly generating the final result in a decoding process. This method simplifies the entire reasoning process, reduces the complexity of implementation, and also reduces the demand for high-performance computing resources.
[0309] Improved reasoning speed: By avoiding unnecessary backtracking and multiple decoding processes, this application can quickly obtain the final result in a single reasoning. This is especially important for real-time application scenarios that need to process large amounts of data, and can significantly improve the system's response speed and processing capabilities.
[0310] In summary, this application provides a fast and accurate reasoning method optimized for label classification tasks, which solves the efficiency and accuracy problems existing in the prior art and has high practical value and broad application prospects.
[0311] On the product side, the technical solution of this application is mainly used for the acceleration of reasoning of large language models (LLM), especially for classification, label and tag generation tasks. Through the technology of this application, the efficiency of processing these classification tasks can be significantly improved, especially in application scenarios that require fast response.
[0312] In actual product implementation, this technical solution can be integrated into various LLM-based systems, such as automatic content tag generation, intelligent classification tools, and other applications that require tag recognition. For example, in an e-commerce platform, this application can be used to quickly generate product tags, thereby improving the efficiency of search and recommendation systems; in a content management system, appropriate tags can be quickly assigned to articles or media content to optimize content organization and retrieval.
[0313] In addition, the implementation of this application does not require major modifications to the existing large language model architecture. It only requires adding a predefined token generation and splicing mechanism on the basis of the existing model. Therefore, the deployment and subsequent maintenance of the model are simplified. This makes the technical solution easy to implement on different systems and platforms, lowering the technical threshold. This strong compatibility feature allows the present invention to be easily deployed in a variety of commercial applications without large-scale technical transformation.
[0314] In summary, this application provides an efficient and economical solution for accelerating the reasoning process of large language models in classification, labeling and token generation tasks, which has broad market application potential and significant commercial value.
[0315] In order to better implement the above method, the embodiment of the present application also provides a content reasoning device, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.
[0316] For example, in this embodiment, the method of the embodiment of the present application will be described in detail by taking the specific integration of the content inference device into an electronic device as an example.
[0317] For example, Figure 3 As shown, the content reasoning device may include an information determination unit 301, a task determination unit 302, an information processing unit 303, a content matching unit 304, a reasoning determination unit 305, and a reasoning output unit 306, as follows:
[0318] (i) Information determination unit 301.
[0319] The information determination unit 301 is used to determine the content to be inferred and at least one information sequence. Different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task.
[0320] In some embodiments, before determining the content to be inferred and at least one information sequence, the device further includes a sample acquisition unit, an inference result determination unit, and an information sequence setting unit:
[0321] A sample acquisition unit, used to acquire a sample content set and at least one reasoning task, wherein the sample content set includes a plurality of samples;
[0322] An inference result determination unit, for performing inference analysis on each sample in the sample content set for each inference task, to obtain a sample inference result corresponding to each sample under the inference task, wherein the sample inference result is composed of at least one content information unit;
[0323] The information sequence setting unit is used to combine the content information units in the sample reasoning result corresponding to each sample under the reasoning task to obtain the information sequence under the reasoning task.
[0324] In some embodiments, the information sequence setting unit is used to:
[0325] Classify the content information units in the sample reasoning results corresponding to each sample under the reasoning task to obtain multiple categories of content information units;
[0326] Determining the content importance of each type of content information unit among the multiple types of content information units;
[0327] According to the importance of the content, multiple types of content information units are sorted to obtain a sorted information sequence.
[0328] In some embodiments, the information sequence setting unit is used to:
[0329] Determine the occurrence frequency of each type of content information unit in the content information unit set, where the content information unit set includes the content information unit in the sample reasoning result corresponding to each sample under the reasoning task;
[0330] Determine a correlation parameter between any two types of content information units among the multiple types of content information units;
[0331] Based on the occurrence frequency and the relevance parameter, the content importance of each type of content information unit in the plurality of types of content information units is determined.
[0332] (ii) Task determination unit 302.
[0333] The task determining unit 302 is used to determine a target reasoning task corresponding to the content to be reasoned from at least one reasoning task.
[0334] (iii) Information processing unit 303.
[0335] The information processing unit 303 is used to perform feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence. The target information sequence is composed of the content information units in the information sequence under the target reasoning task.
[0336] In some embodiments, before performing feature interaction processing on each content information unit in the inference content and the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, the apparatus further includes a sequence determination unit:
[0337] A sequence determination unit is used to infer candidate content information units that match the content to be inferred from the information sequence under the target reasoning task, and the content information units in the information sequence are sorted according to the content importance; based on the sorting position of the candidate content information units in the information sequence under the target reasoning task, the candidate content information units are sorted to obtain the target information sequence;
[0338] The information processing unit is used to perform feature interaction processing on the inference content and each content information unit in the target information sequence based on the sorting position of the content information unit in the target information sequence, so as to obtain feature interaction information of each content information unit in the target information sequence.
[0339] In some embodiments, the sequence determination unit includes a unit matching subunit, a unit evaluation subunit, and a unit screening subunit:
[0340] The unit matching subunit is used to infer the preliminary content information unit that matches the content to be inferred from the information sequence under the target reasoning task;
[0341] The unit evaluation subunit is used to perform unit matching evaluation on the preliminary content information unit and the content to be inferred, and obtain a unit evaluation value corresponding to the preliminary content information unit;
[0342] The unit screening subunit is used to infer candidate content information units from preliminary content information units according to unit evaluation values.
[0343] (iv) Content matching unit 304.
[0344] The content matching unit 304 is used to perform reasoning and analysis on each content information unit in the target information sequence based on the feature interaction information of each content information unit in the target information sequence, and determine the matching degree between the content to be inferred and each content information unit in the target information sequence.
[0345] (V) Inference and determination unit 305.
[0346] The inference determination unit 305 is used to determine the inference result corresponding to the content to be inferred from each content information unit of the target information sequence according to the matching degree.
[0347] In some embodiments, the content information unit includes unit content and an initial determination result corresponding to the unit content, and the matching degree between the content to be inferred and the content information unit represents the confidence of the initial determination result of the unit content in the content information unit;
[0348] The reasoning determination unit includes a determination update subunit and a reasoning determination subunit:
[0349] A determination updating subunit is used to update the initial determination result corresponding to each content information unit in the target information sequence according to the confidence level, and obtain an updated determination result corresponding to each unit content in the target information sequence;
[0350] The reasoning determination subunit is used to determine the reasoning result corresponding to the content to be inferred based on the update judgment result corresponding to the content of each unit in the target information sequence.
[0351] In some embodiments, the determination update subunit is configured to:
[0352] Determine valid unit contents from the unit contents of the target information sequence based on update determination results corresponding to the unit contents in the target information sequence;
[0353] According to the valid unit content and the update determination result corresponding to the valid unit content, the inference result corresponding to the content to be inferred is determined.
[0354] In some embodiments, the determination update subunit is configured to:
[0355] When the confidence level of the initial determination result of the unit content is not less than a first preset confidence level, taking the initial determination result corresponding to the unit content as an updated determination result;
[0356] When the confidence level of the initial determination result of the unit content is not greater than a second preset confidence level, the initial determination result corresponding to the unit content is inverted and the processing result is determined as an updated determination result;
[0357] When the confidence of the initial determination result of the unit content is greater than the second preset confidence and the confidence of the initial determination result of the unit content is less than the first preset confidence, the initial determination result corresponding to the unit content is adjusted to an updated determination result with an invalid result.
[0358] (vi) Inference output unit 306.
[0359] The reasoning output unit 306 is used to output the reasoning result corresponding to the content to be reasoned.
[0360] In some embodiments, the inference result includes at least one content information unit; an inference output unit, configured to:
[0361] Based on the ranking position of each content information unit in the inference result in the target information sequence, the content information units in the inference result corresponding to the content to be inferred are sorted to obtain the sorted inference result corresponding to the content to be inferred, and the content information units in the sorted inference result are sorted according to the content importance;
[0362] Output the reasoning results after sorting corresponding to the content to be reasoned.
[0363] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0364] As can be seen from the above, the content inference device of this embodiment is determined by the information determination unit, the content to be inferred, and at least one information sequence, different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task; the task determination unit determines the target reasoning task corresponding to the content to be inferred from at least one reasoning task; the information processing unit performs feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, and the target information sequence is composed of content information units in the information sequence under the target reasoning task; the content matching unit performs reasoning analysis processing on each content information unit in the target information sequence based on the feature interaction information of each content information unit in the target information sequence to determine the matching degree between the content to be inferred and each content information unit in the target information sequence; the reasoning determination unit determines the reasoning result corresponding to the content to be inferred from each content information unit in the target information sequence according to the matching degree; and the reasoning output unit outputs the reasoning result corresponding to the content to be inferred.
[0365] Therefore, the embodiment of the present application can effectively reduce irrelevant calculations, avoid invalid reasoning in a huge information space, and thus reduce redundant reasoning steps. Therefore, the parallel reasoning strategy of the present application can not only significantly improve the reasoning speed and efficiency, but also reduce the consumption of computing resources.
[0366] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.
[0367] In some embodiments, the content inference device may also be integrated into multiple electronic devices. For example, the content inference device may be integrated into multiple servers, and the content processing method of the present application may be implemented by multiple servers.
[0368] In this embodiment, the electronic device of this embodiment is a server as an example for detailed description, for example, Figure 4 As shown, it shows a schematic diagram of the structure of the server involved in the embodiment of the present application, specifically:
[0369] The server may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4The server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0370] The processor 401 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server. By running or executing software programs and / or modules stored in the memory 402, and calling the content stored in the memory 402, the processor 401 performs various functions and processes the content of the server. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0371] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and content processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a content storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the content storage area may store content created according to the use of the server, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0372] The server also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 may be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, power consumption, and other functions. The power supply 403 may also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0373] The server may further include an input module 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0374] The server may further include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The server may perform short-range wireless transmission through the wireless module of the communication module 405, thereby providing wireless broadband Internet access for the user. For example, the communication module 405 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0375] Although not shown, the server may also include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the server will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby implementing the steps in the methods of the embodiments of the present application.
[0376] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0377] As can be seen from the above, the present application can avoid invalid reasoning in a huge information space, thereby reducing redundant reasoning steps. Therefore, the parallel reasoning strategy of the present application can not only significantly improve the reasoning speed and efficiency, but also reduce the consumption of computing resources.
[0378] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0379] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any content processing method provided in the embodiment of the present application. For example, the instructions can execute the following steps:
[0380] Determine the content to be inferred and at least one information sequence, where different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task;
[0381] Determine a target reasoning task corresponding to the content to be reasoned from at least one reasoning task;
[0382] Performing feature interaction processing on each content information unit in the inference content and the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, wherein the target information sequence is composed of the content information units in the information sequence under the target inference task;
[0383] Based on the feature interaction information of each content information unit in the target information sequence, reasoning and analyzing each content information unit in the target information sequence to determine the matching degree between the content to be inferred and each content information unit in the target information sequence;
[0384] According to the matching degree, the inference result corresponding to the content to be inferred is determined from each content information unit of the target information sequence;
[0385] Output the inference result corresponding to the content to be inferred.
[0386] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0387] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including a computer program / instruction, the computer program / instruction being stored in a computer-readable storage medium. A processor of an electronic device reads the computer program / instruction from the computer-readable storage medium, and the processor executes the computer program / instruction, so that the electronic device executes the method provided in various optional implementations of the content processing provided in the above embodiments.
[0388] Since the instructions stored in the storage medium can execute the steps in any content reasoning method provided in the embodiments of the present application, the beneficial effects that can be achieved by any content reasoning method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0389] The above is a detailed introduction to a content reasoning method, device, electronic device, storage medium and program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A content reasoning method, characterized in that: include: Determine the content to be inferred and at least one information sequence, where different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task; Determining a target reasoning task corresponding to the content to be reasoned from at least one reasoning task; Performing feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, wherein the target information sequence is composed of content information units in the information sequence under the target reasoning task; Based on the feature interaction information of each content information unit in the target information sequence, performing reasoning analysis on each content information unit in the target information sequence to determine the matching degree between the content to be inferred and each content information unit in the target information sequence; According to the matching degree, determining the inference result corresponding to the content to be inferred from each content information unit of the target information sequence; Output the reasoning result corresponding to the content to be inferred.
2. The content inference method according to claim 1, characterized in that: Before performing feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence, the method further includes: Inferring candidate content information units that match the content to be inferred from the information sequence under the target reasoning task, wherein the content information units in the information sequence are sorted according to content importance; Based on the sorting position of the candidate content information unit in the information sequence under the target reasoning task, sorting the candidate content information unit to obtain the target information sequence; The performing feature interaction processing on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence includes: Based on the sorting position of the content information unit in the target information sequence, feature interaction processing is performed on the content to be inferred and each content information unit in the target information sequence to obtain feature interaction information of each content information unit in the target information sequence.
3. The content inference method according to claim 2, characterized in that: The step of inferring a candidate content information unit matching the content to be inferred from the information sequence under the target inference task includes: Inferring a preliminary content information unit matching the content to be inferred from the information sequence under the target reasoning task; Performing unit matching evaluation on the preliminary content information unit and the content to be inferred to obtain a unit evaluation value corresponding to the preliminary content information unit; Based on the unit evaluation values, candidate content information units are inferred from the preliminary content information units.
4. The content inference method according to claim 1, characterized in that: The content information unit includes unit content and an initial determination result corresponding to the unit content, and the matching degree between the content to be inferred and the content information unit represents the confidence of the initial determination result of the unit content in the content information unit; The step of determining, according to the matching degree, the inference result corresponding to the content to be inferred from each content information unit of the target information sequence includes: According to the confidence level, an initial determination result corresponding to each content information unit in the target information sequence is updated to obtain an updated determination result corresponding to each unit content in the target information sequence; Based on the update determination results corresponding to the content of each unit in the target information sequence, the inference result corresponding to the content to be inferred is determined.
5. The content inference method according to claim 4, characterized in that: The determining, based on the update determination result corresponding to each unit content in the target information sequence, the inference result corresponding to the content to be inferred includes: Determining valid unit contents from the unit contents of the target information sequence based on update determination results corresponding to the unit contents in the target information sequence; According to the valid unit content and the update determination result corresponding to the valid unit content, the inference result corresponding to the content to be inferred is determined.
6. The content inference method according to claim 4, characterized in that: The updating process of the initial determination result corresponding to each content information unit in the target information sequence according to the confidence level to obtain the updated determination result corresponding to each unit content in the target information sequence includes: When the confidence level of the initial determination result of the unit content is not less than a first preset confidence level, taking the initial determination result corresponding to the unit content as an updated determination result; When the confidence level of the initial determination result of the unit content is not greater than a second preset confidence level, the initial determination result corresponding to the unit content is inverted and the processing result is determined as an updated determination result; When the confidence of the initial determination result of the unit content is greater than the second preset confidence and the confidence of the initial determination result of the unit content is less than the first preset confidence, the initial determination result corresponding to the unit content is adjusted to an updated determination result with an invalid result.
7. The content inference method according to claim 1, characterized in that: Before determining the content to be inferred and at least one information sequence, the method further includes: Acquire a sample content set and at least one reasoning task, wherein the sample content set includes a plurality of samples; For each reasoning task, perform reasoning analysis on each sample in the sample content set to obtain a sample reasoning result corresponding to each sample under the reasoning task, wherein the sample reasoning result is composed of at least one content information unit; The content information units in the sample reasoning result corresponding to each sample under the reasoning task are combined to obtain an information sequence under the reasoning task.
8. The content inference method according to claim 7, characterized in that: The combining of the content information units in the sample reasoning result corresponding to each sample under the reasoning task to obtain the information sequence under the reasoning task includes: Classifying the content information units in the sample reasoning result corresponding to each sample under the reasoning task to obtain multiple categories of content information units; Determining the content importance of each type of content information unit in the plurality of types of content information units; According to the content importance, the multiple types of content information units are sorted to obtain a sorted information sequence.
9. The content inference method according to claim 8, characterized in that: The determining the content importance of each type of content information unit in the multiple types of content information units includes: Determine the occurrence frequency of each type of content information unit in a content information unit set, wherein the content information unit set includes content information units in a sample reasoning result corresponding to each sample under the reasoning task; Determining a correlation parameter between any two types of content information units among the multiple types of content information units; Based on the occurrence frequency and the relevance parameter, the content importance of each type of content information unit in the multiple types of content information units is determined.
10. The content inference method according to claim 1, characterized in that: The inference result includes at least one content information unit; the outputting the inference result corresponding to the content to be inferred includes: Based on the sorting position of each content information unit in the inference result in the target information sequence, the content information units in the inference result are sorted to obtain the sorted inference result corresponding to the content to be inferred, and the content information units in the sorted inference result are sorted according to the content importance; Output the reasoning result after sorting corresponding to the content to be inferred.
11. A content inference device, characterized in that: include: An information determination unit, used to determine the content to be inferred and at least one information sequence, where different information sequences correspond to different reasoning tasks, and each information sequence includes at least one content information unit under the corresponding reasoning task; A task determination unit, configured to determine a target reasoning task corresponding to the content to be reasoned from at least one reasoning task; An information processing unit, configured to perform feature interaction processing on the content to be inferred and each content information unit in a target information sequence to obtain feature interaction information of each content information unit in the target information sequence, wherein the target information sequence is composed of content information units in the information sequence under the target reasoning task; A content matching unit, configured to perform reasoning and analysis on each content information unit in the target information sequence based on feature interaction information of each content information unit in the target information sequence, and determine a matching degree between the content to be inferred and each content information unit in the target information sequence; An inference determination unit, configured to determine, according to the matching degree, an inference result corresponding to the content to be inferred from each content information unit of the target information sequence; The reasoning output unit is used to output the reasoning result corresponding to the content to be reasoned.
12. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the content inference method as claimed in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the content inference method according to any one of claims 1 to 10.
14. A computer program product comprising a plurality of instructions, characterized in that: When the instructions are executed by a processor, the steps in the content inference method described in any one of claims 1 to 10 are implemented.