Method and device for automatically generating analogical corpora through computing power of intelligent computing center

Through the method of automatically generating analog corpus from the computing power of the intelligent computing center, the joint execution process of large language model, reward model and strategy model is used to solve the problem of low quality of training corpus in the existing technology, and achieve higher quality analog corpus generation, which improves the model's cognitive ability and analogy reasoning ability.

CN119940545APending Publication Date: 2025-05-06DATACANVAS LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510031304.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing intelligent computing centers used to train large language models have low corpus quality, resulting in poor cognitive abilities of the trained model.

Method used

Through the method of automatically generating analog corpus through the computing power of the intelligent computing center, the joint execution process of large language model, reward model and strategy model is used to generate candidate stories with analogy relationships with reference stories, and continuously adjust them through optimization actions until the end condition is met.

Benefits of technology

The quality of the generated analogical corpus is improved, thereby improving the cognitive and analogical reasoning capabilities of the large language models used for training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940545A_ABST
    Figure CN119940545A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for automatically generating an analogy corpus through computing power of an intelligent computing center. The method comprises the following steps: S1, inputting a reference story into a large language model to obtain candidate stories with an analogy relationship; s2, inputting the reference stories and the candidate stories into a reward model to obtain unreasonable plots and / or analogy relationships of the candidate stories; obtaining a missing, redundant and / or irrelevant analogy relationship; taking the unreasonable plot and / or the obtained analogy relation as an evaluation problem; s3, inputting the reference stories, the candidate stories and the evaluation problems into the strategy model to obtain optimization actions on the candidate stories; selecting an evaluation problem corresponding to the optimization action; s4, inputting the reference stories, the candidate stories and evaluation questions corresponding to the optimization actions into a large language model to obtain the candidate stories; s5, if the end condition is not met, repeatedly executing the steps S2 to S4; and S6, if an end condition is satisfied, obtaining a candidate story output by the large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the fields of computing power infrastructure and artificial intelligence technology, and in particular, to a method and device for automatically generating analogy corpus through the computing power of an intelligent computing center. Background Art

[0002] With the development of artificial intelligence technology and computing power technology, the concept of intelligent computing center has emerged. "Intelligent computing center" refers to the use of large-scale heterogeneous computing power resources, including general computing power and intelligent computing power, mainly for artificial intelligence applications (such as artificial intelligence deep learning model (such as large language model) development, model training and model reasoning and other scenarios) to provide the required computing power, data and algorithms. Intelligent computing center covers facilities, hardware, software, and can provide full-stack capabilities from bottom-level computing power to top-level application enablement.

[0003] When training a large language model, the existing intelligent computing center needs to input a large amount of corpus into the large language model. The large language model learns the semantic relationship of the corpus and uses it to complete specific tasks. At present, corpus with analogical relationships can be generated by inputting reference corpus into the large language model. However, the analogical reasoning ability of the current large language model is weak and difficult to compare with the analogical reasoning ability of humans. Therefore, the quality of the generated corpus is not high, resulting in poor cognitive ability of the large language model trained with these corpora. Summary of the invention

[0004] The embodiments of the present invention provide a method and device for automatically generating analogy corpus through the computing power of an intelligent computing center, which is used to solve the problem that the corpus quality used by the existing intelligent computing center for training large language models is not high, resulting in poor cognitive ability of the large language models trained with these corpora.

[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0006] In a first aspect, an embodiment of the present invention provides a method for automatically generating analogy corpus by using the computing power of an intelligent computing center, comprising:

[0007] Step S1: inputting a first prompt word including a reference story into a large language model to obtain a candidate story having an analogy relationship with the reference story;

[0008] Step S2: inputting the second prompt words including the reference story and the candidate story into the reward model to obtain the unreasonable plot of the candidate story and / or the analogy relationship between the reference story and the candidate story; obtaining missing, redundant and / or irrelevant analogy relationships from the analogy relationships output by the reward model; and taking the unreasonable plot of the candidate story and / or the missing, redundant and / or irrelevant analogy relationships as evaluation questions;

[0009] Step S3: inputting the third prompt word including the reference story, the candidate story and the evaluation question into the strategy model to obtain an optimization action for the candidate story; and selecting the evaluation question corresponding to the optimization action;

[0010] Step S4: inputting the reference story, the candidate story and the fourth prompt word of the evaluation question corresponding to the optimization action into the large language model to obtain a new candidate story;

[0011] Step S5: determining whether an end condition is satisfied; if the end condition is not satisfied, updating the second prompt word according to the new candidate story, and repeating steps S2 to S4;

[0012] Step S6: If the end condition is met, the candidate story finally output by the large language model is obtained as the analogy corpus.

[0013] Optionally, the candidate stories having an analogy relationship with the reference story include stories that are dissimilar in entities but similar in higher-order relationships and at least partially in first-order relationships to the reference story.

[0014] Optionally, the second prompt word also includes:

[0015] The first prompt information is used to instruct the reward model to identify unreasonable plots in the candidate story in the second prompt word, and the unreasonable plots include at least one of the following:

[0016] Plots in the story where the cause and effect relationships are incorrect;

[0017] The setting in the story goes against common sense;

[0018] Plots where the behavior is inconsistent with the character's identity.

[0019] Optional,

[0020] The second prompt word also includes:

[0021] The second instruction information is used to instruct the reward model to determine the analogy relationship between the reference story and the candidate story according to the following steps:

[0022] Extracting the story outline of the reference story and the story outline of the candidate story in the second prompt word;

[0023] The story outline of the reference story and the story outline of the candidate story are analogically mapped to obtain an analogy relationship between the reference story and the candidate story.

[0024] Optionally, the third prompt word further includes: third prompt information, used to prompt the strategy model to select an optimization action from multiple optimization actions to be selected according to the evaluation problem, and the optimization actions to be selected include at least one of the following:

[0025] Optimize the plot;

[0026] Optimize analogy relationships;

[0027] Finish the creation.

[0028] Optionally, the end condition includes one of the following:

[0029] The large language model outputs a preset number of candidate stories;

[0030] The optimization action of inputting the fourth prompt word of the large language model is to end the creation.

[0031] In a second aspect, an embodiment of the present invention provides a device for automatically generating analogy corpus through the computing power of an intelligent computing center, including:

[0032] A first processing module, configured to input a first prompt word including a reference story into a large language model to obtain a candidate story having an analogy relationship with the reference story;

[0033] A second processing module is used to input the second prompt words including the reference story and the candidate story into the reward model to obtain the unreasonable plot of the candidate story and / or the analogy relationship between the reference story and the candidate story; obtain missing, redundant and / or irrelevant analogy relationships from the analogy relationships output by the reward model; and use the unreasonable plot of the candidate story and / or the missing, redundant and / or irrelevant analogy relationships as evaluation issues;

[0034] A third processing module is used to input a third prompt word including the reference story, the candidate story and the evaluation question into a strategy model to obtain an optimization action for the candidate story; and select the evaluation question corresponding to the optimization action;

[0035] A fourth processing module, configured to input a fourth prompt word including the reference story, the candidate story and the evaluation question corresponding to the optimization action into the large language model to obtain a new candidate story;

[0036] a fifth processing module, configured to determine whether an end condition is met, and if the end condition is not met, update the second prompt word according to the new candidate story, and trigger the second processing module, the third processing module and the fourth processing module to be repeatedly executed;

[0037] The sixth processing module is used to obtain the candidate story finally output by the large language model as the analogy corpus if the end condition is met.

[0038] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method for automatically generating analogy corpus through the computing power of an intelligent computing center as described in the first aspect above.

[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for automatically generating analogy corpus through the computing power of an intelligent computing center as described in the first aspect above are implemented.

[0040] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the method for automatically generating analogy corpus through the computing power of an intelligent computing center as described in the first aspect above.

[0041] In an embodiment of the present invention, a large language model, a reward model, and a strategy model running in an intelligent computing center jointly execute a process of generating analogy corpus, wherein a candidate story having an analogy relationship with a reference story is generated by the large language model, and the candidate story generated by the large language model is evaluated by the reward model to obtain unreasonable plots of the candidate story, and / or the analogy relationship between the reference story and the candidate story; missing, redundant, and / or irrelevant analogy relationships are obtained from the analogy relationships output by the reward model, and are combined with the unreasonable plots of the candidate story to form an evaluation problem, and an optimization action for the candidate story is determined according to the evaluation problem by the strategy model; an evaluation problem corresponding to the optimization action output by the strategy model is selected; and then the optimization action is evaluated according to the optimization action and the evaluation problem by the large language model. The candidate stories are optimized, and the above-mentioned evaluation, determination of optimization actions and optimization steps are repeatedly performed until the end conditions are met, and the candidate stories finally output by the large language model are obtained as analogy corpus. In the embodiment of the present invention, the large language model can be used to automatically generate analogy story corpus according to the reference story corpus, without the need to manually write the story corpus, and a reference story can be used to perform the above-mentioned analogy corpus generation process multiple times to obtain multiple candidate stories, thereby greatly reducing the difficulty and cost of obtaining the corpus. In addition, since the candidate stories generated by the large language model can be adjusted multiple times during the generation process of an analogy corpus, the quality of the candidate stories finally generated is higher, thereby improving the cognitive ability and analogy reasoning ability of the large language model trained with these corpora. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0043] Figure 1 One of the flowcharts of the method for automatically generating analogy corpus by using the computing power of an intelligent computing center according to an embodiment of the present invention;

[0044] Figure 2 This is a second flow chart of a method for automatically generating analogy corpus through the computing power of an intelligent computing center according to an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of the structure of an apparatus for automatically generating analogy corpus through the computing power of an intelligent computing center according to an embodiment of the present invention;

[0046] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] First, the technical terms involved in the present invention are briefly explained below.

[0049] The "computing power" mentioned in the present invention is the ability of computer equipment or computing / data center to process information. It is the ability of computer hardware and software to work together to execute certain computing requirements. It is the computing power to achieve target result output by processing information data. It is a new type of productivity that integrates information computing power, network carrying capacity, and data storage capacity. It mainly provides services to the society through computing power infrastructure.

[0050] The "computing power" (Computational Power, CP) described in the present invention is the ability of a data center server to process data and output results. It is a comprehensive indicator to measure the computing power of a data center, including general computing power, super computing power and intelligent computing power. The commonly used unit of measurement is the number of floating point operations performed per second (FLOPS: Floating Point Operations Per Second, 1EFLOPS = 10^18FLOPS). The larger the value, the stronger the comprehensive computing power. According to calculations, 1EFLOPS is approximately the computing power output of 5 Tianhe-2A or 500,000 mainstream server CPUs or 2 million mainstream notebooks. The calculation formula is: CP = CP 通用 +CP 智能 +CP 超级 .

[0051] The "Network Power" (NP) described in the present invention is a manifestation of the data transmission capability of computing facilities, including comprehensive capabilities such as network architecture, network bandwidth, transmission latency, intelligent management and scheduling, etc. The carrying capacity involves network transmission within and between data centers, and is a comprehensive indicator for measuring network transmission scheduling capabilities. In the embodiment of the present invention, the carrying capacity uses the memory bandwidth.

[0052] The "Storage Power" (SP) described in the present invention is the comprehensive ability of a data center in terms of data storage capacity, performance, safety and reliability, and green and low-carbon. It is a comprehensive indicator for measuring the data storage capacity of a data center, including external storage devices such as storage arrays and server built-in storage devices. The commonly used unit of measurement for storage capacity is exabyte (EB, 1EB = 2^60bytes), and the commonly used unit of measurement for performance is the number of reads and writes per second per unit capacity (IOPS / TB, Input / Output Operations Per Second / TB). The disaster recovery ratio is an important manifestation of safety and reliability.

[0053] The "computing power infrastructure" described in the present invention is a new type of information infrastructure that integrates information computing power, network carrying capacity, and data storage capacity. It can realize centralized computing, storage, transmission and application of information, and presents characteristics such as diversity and ubiquity, intelligence and agility, security and reliability, and green and low-carbon.

[0054] The “computing power” mentioned in the present invention includes general computing power, intelligent computing power and super computing power.

[0055] The “general computing power” mentioned in the present invention refers to the computing power provided by servers based on CPU (Central Processing Unit) chips, which is used to support basic general computing such as cloud computing and edge computing.

[0056] The "intelligent computing power" described in the present invention is a computing platform for large-scale deployment of special chips such as GPU (Graphics Processing Unit), FPGA (Field Programmable Gate Array), ASIC (Application Specific Integrated Circuit) for various innovative applications of artificial intelligence, such as natural language processing and machine vision.

[0057] The "super computing power" mentioned in the present invention is mainly the computing power provided by high-performance computing clusters such as supercomputers. It utilizes the centralized computing resources of multiple computer systems working in parallel and uses a dedicated operating system to handle extremely complex or data-intensive problems. It is mainly used for calculations in cutting-edge scientific fields, such as planetary simulation, drug molecule design, and gene analysis.

[0058] The "intelligent computing center" described in the present invention refers to a facility that provides the required computing power, data and algorithms for artificial intelligence applications (such as artificial intelligence deep learning model development, model training and model reasoning scenarios) by using large-scale heterogeneous computing power resources, including general computing power (CPU: Central Processing Unit) and intelligent computing power (GPU: Graphics Processing Unit, FPGA: Field Programmable Gate Array, ASIC: Application Specific Integrated Circuit, etc.). The intelligent computing center covers facilities, hardware, and software, and can provide full-stack capabilities from bottom-level computing power to top-level application enablement.

[0059] The "computing resources" mentioned in the present invention refer to the technologies and facilities with information calculation, transmission, storage and application capabilities required for the development of the digital society, including but not limited to computing resources such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), network resources such as switches and routers, storage resources such as storage arrays and distributed storage, security resources such as firewalls and intrusion detection systems, as well as supporting and guarantee resources such as wind, fire, water and electricity.

[0060] The “large language model” mentioned in the present invention refers to a large language model (LLM), which is a language model with a large parameter scale. It is designed to understand and generate human language. It is trained with a large amount of text data and can perform a wide range of tasks including text summarization, translation, sentiment analysis, etc.

[0061] In the field of linguistics and natural language processing, the "corpus" mentioned in the present invention refers to text or voice data used for language research, analysis, teaching or technology development. In natural language processing (NLP), corpus is used to train machine learning models, such as language models, text classifiers, sentiment analyzers, etc. These models learn the statistical laws and patterns of language by analyzing a large amount of corpus, so that they can perform various language processing tasks, such as text generation, translation, summarization, question answering, etc.

[0062] The "reward model" described in the present invention refers to a model used to describe and calculate the reward value of behavior in reinforcement learning. In reinforcement learning, an agent obtains a certain reward value by continuously interacting with the environment. The reward model can describe and calculate the reward value obtained by the agent in each interaction, and based on these reward values, the agent can learn how to make better decisions, thereby obtaining a higher cumulative reward value.

[0063] The “Policy Model” described in the present invention refers to a model used to select actions according to the current state and predetermined rules in reinforcement learning.

[0064] To solve the problem that the corpus quality used by the existing intelligent computing center to train large language models is not high, resulting in poor cognitive ability of large language models trained with these corpora, please refer to Figure 1 , an embodiment of the present invention provides a method for automatically generating analogy corpus by using the computing power of an intelligent computing center, comprising:

[0065] Step S1: inputting a first prompt word including a reference story into a large language model to obtain a candidate story having an analogy relationship with the reference story;

[0066] In the embodiment of the present invention, the reference story may include a fable, a fairy tale, a myth, etc. For example, please refer to Figure 2 The reference story may include the following content: On a cold winter night, a farmer picked up a frozen poisonous snake on the roadside. He felt sorry for the snake, so he hugged the snake in his arms to keep it warm. When the snake woke up, it bit the farmer's chest hard, causing him to die of poisoning. Before the farmer died, he said: "I actually saved a poor poisonous snake, and I deserve this retribution!"

[0067] In some embodiments, optionally, the first prompt word may include, in addition to the content of the reference story, the role of the large language model. For example, the first prompt word includes: "Role: You are a famous fable writer who is deeply loved by readers. You are creating a candidate story with an analogy relationship and a reasonable plot based on a given reference story."

[0068] In some embodiments, optionally, the first prompt word may also include instruction information instructing the large language model to perform an action, for example, the instruction information may be "Please conceive a new story that forms an analogy with the fable given below" and the like.

[0069] In some embodiments, optionally, the first prompt word may also include output restriction conditions such as the maximum number of words in the output candidate story.

[0070] In some embodiments, optionally, the candidate stories having an analogy relationship with the reference story include stories that are dissimilar to the entities (including objects and characters) of the reference story, but are similar in high-order relationships and at least partially in first-order relationships. The candidate stories may also be referred to as true analogy stories (True AnalogyStory).

[0071] Among them, the main difference between first-order relations and higher-order relations lies in the degree of quantification and the expressive power of the logical system.

[0072] First-order relations, also often called monadic relations, involve the connection between two objects. In logic, first-order logic introduces quantifiers, such as the universal quantifier (inverted A) and the existential quantifier (inverted E), as well as first-order predicates, individual variables, and individual constants. This enables first-order logic to quantify elements in the individual domain, that is, to express properties about individuals and relations between individuals.

[0073] Higher-order relations involve more objects or more complex degrees of quantification. For example, in discrete mathematics, we can study higher-order relations such as ternary and quaternary, which can be obtained by generalizing binary (i.e. first-order) relations. In logic, higher-order logic has correspondingly stronger expressive power and can handle more complex logical structures and reasoning.

[0074] like Figure 2 As shown, the candidate stories generated by the large language model may include the following: A hungry eagle was trapped on a small island. It saw a poor mouse busy looking for food. The eagle felt sorry for the mouse and helped it find food. As the mouse became stronger, it began to peck at the eagle's feathers until it pecked out the eagle's eyes.

[0075] Step S2: inputting the second prompt words including the reference story and the candidate story into the reward model to obtain the unreasonable plot of the candidate story and / or the analogy relationship between the reference story and the candidate story; obtaining missing, redundant and / or irrelevant analogy relationships from the analogy relationships output by the reward model; and taking the unreasonable plot of the candidate story and / or the missing, redundant and / or irrelevant analogy relationships as evaluation questions;

[0076] In the embodiment of the present invention, the reward model is also a large language model, which is used to evaluate the unreasonable plot of the candidate story in the second prompt word according to the input second prompt word, and determine the analogy relationship between the reference story and the candidate story.

[0077] In some embodiments, optionally, the second prompt word may include, in addition to the reference story and the candidate story, further include:

[0078] The first prompt information is used to instruct the reward model to identify unreasonable plots in the candidate story in the second prompt word, and the unreasonable plots include at least one of the following:

[0079] Plots in the story where the cause and effect relationships are incorrect;

[0080] The setting in the story goes against common sense;

[0081] Plots where the behavior is inconsistent with the character's identity.

[0082] In some embodiments, optionally, the second prompt word may also include output examples and output restrictions, etc. For example, the output restrictions may include: please output in json format, the issue key in json corresponds to the unreasonable plot description; the suggestion key corresponds to the modification suggestion; the level key corresponds to the unreasonable degree of this plot, which can be "general" or "serious".

[0083] For example, in one embodiment, the second prompt word may include the following content:

[0084] {

[0085] ##story

[0086] {story_content(story content)}

[0087] ##Target

[0088] Please carefully check the unreasonable plots in the story and give suggestions for revision. The unreasonable plots include:

[0089] 1. The plot of the story with incorrect cause and effect relationship

[0090] 2. The setting in the story goes against common sense

[0091] 3. Plots where the behavior is inconsistent with the character's identity

[0092] Note: Fables can contain elements of personification and exaggeration, but this cannot be used as a reason for incorrect causal relationships.

[0093] ## Output example

[0094] Please output in json format. The issue key in json corresponds to the unreasonable situation description; the suggestion key corresponds to the modification suggestion; the level key corresponds to the unreasonable degree of this situation, which can be "normal" or "serious". Output example:

[0095]

[0096] The returned content will be parsed using Python's eval function. Please do not return anything other than json.

[0097] }

[0098] In some embodiments, optionally, the second indication information is used to instruct the reward model to determine the analogy relationship between the reference story and the candidate story according to the following steps:

[0099] Extracting the story outline of the reference story and the story outline of the candidate story in the second prompt word;

[0100] The story outline of the reference story and the story outline of the candidate story are analogically mapped to obtain an analogy relationship between the reference story and the candidate story.

[0101] For example, in one embodiment, the second prompt word may include the following content:

[0102] {

[0103] ##Target

[0104] Please summarize the fable in Chinese. The outline should include the main characters and storyline.

[0105] Please note: The outline is a summary of the story. Please do not summarize the story content or moral.

[0106] ##Format restrictions

[0107] Return one by one in order, example:

[0108] 1.xxx

[0109] 2.xxx ...

[0111] example:

[0112] ##Fable

[0113] Once upon a time, on a cold winter day, a farmer on his way home from the market found a snake on the roadside. The farmer felt sorry for the frozen snake, so he put it in his arms and used his body temperature to revive it. The snake was frightened, and when it fully woke up, it instinctively bit the farmer and killed him. Before he died, the farmer regretted and said sadly, "I wanted to do good deeds, but because of my shallow knowledge, I ruined my life."

[0114] Outline:

[0115] 1.A farmer was returning home from market on a cold winter day.

[0116] 2.The farmer found a frozen snake on the side of the road.

[0117] 3. Out of sympathy, the farmer placed the snake in his arms and used his body temperature to revive it.

[0118] 4. After the snake woke up, it bit the farmer instinctively because of fear.

[0119] 5. The farmer felt regretful after being bitten and lost his life sadly.

[0120] Analogy mapping prompt words:

[0121] ##Reference Stories

[0122] content:

[0123] {reference_story_content(reference story content)}

[0124] Outline:

[0125] {reference_story_outline(reference story outline)}

[0126] ##Candidate Stories

[0127] content:

[0128] {candidate_story_content(candidate story content)}

[0129] Outline:

[0130] {candidate_story_outline(Candidate Story Outline)}

[0131] ##Target

[0132] Please match the outline of the candidate story with the outline of the reference story based on analogy.

[0133] Be careful not to modify the outline content.

[0134] ##Format restrictions

[0135] Please return in json format, with the key base corresponding to the outline in the reference story, target corresponding to the outline in the candidate story, and reason explaining why the two items should correspond. Example:

[0136]

[0137] Step S3: inputting the third prompt word including the reference story, the candidate story and the evaluation question into the strategy model to obtain an optimization action for the candidate story; and selecting the evaluation question corresponding to the optimization action;

[0138] In the embodiment of the present invention, the policy model is also a large language model, which is used to determine the optimization action for the candidate story in the third prompt word according to the input third prompt word.

[0139] In some embodiments, optionally, the third prompt word may further include: the role of the strategy model. For example, the third prompt word includes: "Role: You are a famous fable writer who is well-loved by readers. You are creating a candidate story with an analogy relationship and a reasonable plot based on a given reference story."

[0140] In some embodiments, optionally, the third prompt word further includes: third prompt information, used to prompt the strategy model to select an optimization action from multiple optimization actions to be selected according to the evaluation problem, and the optimization actions to be selected include at least one of the following:

[0141] Optimize the plot;

[0142] Optimize analogy relationships;

[0143] Finish the creation.

[0144] The end of creation means that there is no more content that can be optimized in the candidate story, and the large language model can end the creation process.

[0145] For example, in one embodiment, the third prompt word may include the following content:

[0146] {

[0147] Role: You are a famous fable writer who is well-loved by readers. You are creating a candidate story with analogies and reasonable plots based on a given reference story.

[0148] Reference story:

[0149] {ref_story}

[0150] The story you created:

[0151] {candidate_story}

[0152] Some readers found some problems in the fables you created:

[0153] {The problem of incorrect analogy}

[0154] {Irrational plot issues}

[0155] Please take the most urgent action below to improve your story:

[0156] 1. Optimize the plot

[0157] 2. Optimize analogy relationships

[0158] 3. End the creation

[0159] }

[0160] It should be noted that the strategy model may select one optimization action each time. Of course, in some embodiments, it is not excluded that the strategy model selects multiple optimization actions each time to speed up the generation process of the corpus.

[0161] In the embodiment of the present invention, all the evaluation questions provided in step S3 may be recorded in advance, and according to the optimization action output by the strategy model, the evaluation question corresponding to the optimization action may be selected from the recorded evaluation questions.

[0162] Step S4: inputting the reference story, the candidate story and the fourth prompt word of the evaluation question corresponding to the optimization action into the large language model to obtain a new candidate story;

[0163] In some embodiments, optionally, the fourth prompt word may further include: the role of the large language model. For example, the fourth prompt word includes: "Role: You are a famous fable writer who is well-loved by readers. You are creating a candidate story with an analogy relationship and a reasonable plot based on a given reference story."

[0164] For example, in one embodiment, the fourth prompt word may include the following content:

[0165] {

[0166] Role: You are a famous fable writer who is well-loved by readers. You are creating a candidate story with analogies and reasonable plots based on a given reference story.

[0167] Reference story:

[0168] {ref_story}

[0169] The story you created:

[0170] {candidate_story}

[0171] Questions found by enthusiastic readers:

[0172] {issues}

[0173] Please optimize the story based on the questions raised by readers.

[0174] }

[0175] Step S5: Determine whether the end condition is met. If the end condition is not met, update the second prompt word according to the new candidate story, and repeat steps S2 to S4.

[0176] In some embodiments, optionally, the end condition includes one of the following:

[0177] The large language model outputs a preset number of candidate stories;

[0178] The optimization action of inputting the fourth prompt word of the large language model is to end the creation.

[0179] For example, Figure 2 As shown, Figure 2 In the illustrated embodiment, the large language model (LLM) outputs candidate stories three times (ie, the preset number is 3), and then it is determined that the end condition is met. Figure 2 In the illustrated embodiment, state0, state1, and state2 are the candidate stories output by the large language model three times, respectively. Final state is the candidate story output by the large language model for the last time (i.e., the candidate story output at the end).

[0180] Step S6: If the end condition is met, the candidate story finally output by the large language model is obtained as the analogy corpus.

[0181] In the embodiment of the present invention, the obtained analogy corpus can be put into a training set for training a large language model.

[0182] In an embodiment of the present invention, a large language model, a reward model, and a strategy model running in an intelligent computing center jointly execute a process of generating analogy corpus, wherein a candidate story having an analogy relationship with a reference story is generated by the large language model, and the candidate story generated by the large language model is evaluated by the reward model to obtain unreasonable plots of the candidate story, and / or the analogy relationship between the reference story and the candidate story; missing, redundant, and / or irrelevant analogy relationships are obtained from the analogy relationships output by the reward model, and are combined with the unreasonable plots of the candidate story to form an evaluation problem, and an optimization action for the candidate story is determined according to the evaluation problem by the strategy model; an evaluation problem corresponding to the optimization action output by the strategy model is selected; and then the optimization action is evaluated according to the optimization action and the evaluation problem by the large language model. The candidate stories are optimized, and the above-mentioned evaluation, determination of optimization actions and optimization steps are repeatedly performed until the end conditions are met, and the candidate stories finally output by the large language model are obtained as analogy corpus. In the embodiment of the present invention, the large language model can be used to automatically generate analogy story corpus according to the reference story corpus, without the need to manually write the story corpus, and a reference story can be used to perform the above-mentioned analogy corpus generation process multiple times to obtain multiple candidate stories, thereby greatly reducing the difficulty and cost of obtaining the corpus. In addition, since the candidate stories generated by the large language model can be adjusted multiple times during the generation process of an analogy corpus, the quality of the candidate stories finally generated is higher, thereby improving the cognitive ability and analogy reasoning ability of the large language model trained with these corpora.

[0183] Please refer to Figure 3 The embodiment of the present invention further provides a device for automatically generating analogy corpus through the computing power of an intelligent computing center, characterized in that it includes:

[0184] A first processing module 11 is used to input a first prompt word including a reference story into a large language model to obtain a candidate story having an analogy relationship with the reference story;

[0185] The second processing module 12 is used to input the second prompt words including the reference story and the candidate story into the reward model to obtain the unreasonable plot of the candidate story and / or the analogy relationship between the reference story and the candidate story; obtain the missing, redundant and / or irrelevant analogy relationship from the analogy relationship output by the reward model; and use the unreasonable plot of the candidate story and / or the missing, redundant and / or irrelevant analogy relationship as an evaluation problem;

[0186] The third processing module 13 is used to input the third prompt word including the reference story, the candidate story and the evaluation question into the strategy model to obtain an optimization action for the candidate story; and select the evaluation question corresponding to the optimization action;

[0187] A fourth processing module 14 is used to input the fourth prompt word including the reference story, the candidate story and the evaluation question corresponding to the optimization action into the large language model to obtain a new candidate story;

[0188] The fifth processing module 15 is used to determine whether the end condition is met. If the end condition is not met, the second prompt word is updated according to the new candidate story, and the second processing module, the third processing module and the fourth processing module are triggered to be executed repeatedly;

[0189] The sixth processing module 16 is used to obtain the candidate story finally output by the large language model as the analogy corpus if the end condition is met.

[0190] In some embodiments, optionally, the candidate stories having an analogy relationship with the reference story include: stories that are dissimilar to the reference story in entities but similar in high-order relationships and at least partially in first-order relationships.

[0191] In some embodiments, optionally, the second prompt word further includes:

[0192] The first prompt information is used to instruct the reward model to identify unreasonable plots in the candidate story in the second prompt word, and the unreasonable plots include at least one of the following:

[0193] Plots in the story where the cause and effect relationships are incorrect;

[0194] The setting in the story goes against common sense;

[0195] Plots where the behavior is inconsistent with the character's identity.

[0196] In some embodiments, optionally, the second prompt word further includes:

[0197] The second instruction information is used to instruct the reward model to determine the analogy relationship between the reference story and the candidate story according to the following steps:

[0198] Extracting the story outline of the reference story and the story outline of the candidate story in the second prompt word;

[0199] The story outline of the reference story and the story outline of the candidate story are analogically mapped to obtain an analogy relationship between the reference story and the candidate story.

[0200] In some embodiments, optionally, the third prompt word further includes: third prompt information, which is used to prompt the strategy model to select an optimization action from multiple optimization actions to be selected according to the evaluation question in the third prompt word, and the optimization action to be selected includes at least one of the following:

[0201] Optimize the plot;

[0202] Optimize analogy relationships;

[0203] Finish the creation.

[0204] In some embodiments, optionally, the end condition includes one of the following:

[0205] The large language model outputs a preset number of candidate stories;

[0206] The optimization action of inputting the fourth prompt word of the large language model is to end the creation.

[0207] In an embodiment of the present invention, a large language model, a reward model, and a strategy model running in an intelligent computing center jointly execute a process of generating analogy corpus, wherein a candidate story having an analogy relationship with a reference story is generated by the large language model, and the candidate story generated by the large language model is evaluated by the reward model to obtain unreasonable plots of the candidate story, and / or the analogy relationship between the reference story and the candidate story; missing, redundant, and / or irrelevant analogy relationships are obtained from the analogy relationships output by the reward model, and are combined with the unreasonable plots of the candidate story to form an evaluation problem, and an optimization action for the candidate story is determined according to the evaluation problem by the strategy model; an evaluation problem corresponding to the optimization action output by the strategy model is selected; and then the optimization action is evaluated according to the optimization action and the evaluation problem by the large language model. The candidate stories are optimized, and the above-mentioned evaluation, determination of optimization actions and optimization steps are repeatedly performed until the end conditions are met, and the candidate stories finally output by the large language model are obtained as analogy corpus. In the embodiment of the present invention, the large language model can be used to automatically generate analogy story corpus according to the reference story corpus, without the need to manually write the story corpus, and a reference story can be used to perform the above-mentioned analogy corpus generation process multiple times to obtain multiple candidate stories, thereby greatly reducing the difficulty and cost of obtaining the corpus. In addition, since the candidate stories generated by the large language model can be adjusted multiple times during the generation process of an analogy corpus, the quality of the candidate stories finally generated is higher, thereby improving the cognitive ability and analogy reasoning ability of the large language model trained with these corpora.

[0208] Please refer to Figure 4 The embodiment of the present invention further provides an electronic device 20, including a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the computer program is executed by the processor 21, each process of the method embodiment for automatically generating analogy corpus through the computing power of an intelligent computing center is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0209] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned method embodiment for automatically generating analogy corpus by computing power of an intelligent computing center is implemented, and the same technical effect can be achieved. To avoid repetition, it is not described here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0210] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the method embodiment for automatically generating analogy corpus through the computing power of an intelligent computing center are shown, and can achieve the same technical effect. To avoid repetition, they will not be described here.

[0211] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0212] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0213] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A method for automatically generating analogy corpus by using the computing power of an intelligent computing center, characterized in that: include: Step S1: inputting a first prompt word including a reference story into a large language model to obtain a candidate story having an analogy relationship with the reference story; Step S2: inputting the second prompt words including the reference story and the candidate story into the reward model to obtain the unreasonable plot of the candidate story and / or the analogy relationship between the reference story and the candidate story; Obtaining missing, redundant and / or irrelevant analogical relationships from the analogical relationships output by the reward model; using the unreasonable plot of the candidate story and / or the missing, redundant and / or irrelevant analogical relationships as evaluation issues; Step S3: inputting the third prompt word including the reference story, the candidate story and the evaluation question into the strategy model to obtain an optimization action for the candidate story; selecting the evaluation problem corresponding to the optimization action; Step S4: inputting the reference story, the candidate story and the fourth prompt word of the evaluation question corresponding to the optimization action into the large language model to obtain a new candidate story; Step S5: determining whether an end condition is satisfied; if the end condition is not satisfied, updating the second prompt word according to the new candidate story, and repeating steps S2 to S4; Step S6: If the end condition is met, the candidate story finally output by the large language model is obtained as the analogy corpus.

2. The method according to claim 1, characterized in that The candidate stories having an analogy relationship with the reference story include stories that are dissimilar to the reference story in entities, but similar in higher-order relationships and at least partially in first-order relationships.

3. The method according to claim 1, characterized in that The second prompt word also includes: The first prompt information is used to instruct the reward model to identify unreasonable plots in the candidate story in the second prompt word, and the unreasonable plots include at least one of the following: Plots in the story where the cause and effect relationships are incorrect; The setting in the story goes against common sense; Plots where the behavior is inconsistent with the character's identity.

4. The method according to claim 1 or 3, characterized in that: The second prompt word also includes: The second instruction information is used to instruct the reward model to determine the analogy relationship between the reference story and the candidate story according to the following steps: Extracting the story outline of the reference story and the story outline of the candidate story in the second prompt word; The story outline of the reference story and the story outline of the candidate story are analogically mapped to obtain an analogy relationship between the reference story and the candidate story.

5. The method according to claim 1, characterized in that The third prompt word further includes: third prompt information, which is used to prompt the strategy model to select an optimization action from multiple optimization actions to be selected according to the evaluation question in the third prompt word, and the optimization action to be selected includes at least one of the following: Optimize the plot; Optimize analogy relationships; Finish the creation.

6. The method according to claim 1, characterized in that The end condition includes one of the following: The large language model outputs a preset number of candidate stories; The optimization action of inputting the fourth prompt word of the large language model is to end the creation.

7. A device for automatically generating analogy corpus through the computing power of an intelligent computing center, characterized in that: include: A first processing module, configured to input a first prompt word including a reference story into a large language model to obtain a candidate story having an analogy relationship with the reference story; A second processing module is used to input a second prompt word including the reference story and the candidate story into a reward model to obtain an unreasonable plot of the candidate story and / or an analogy relationship between the reference story and the candidate story; Obtaining missing, redundant and / or irrelevant analogical relationships from the analogical relationships output by the reward model; using the unreasonable plot of the candidate story and / or the missing, redundant and / or irrelevant analogical relationships as evaluation issues; A third processing module, configured to input a third prompt word including the reference story, the candidate story and the evaluation question into a strategy model to obtain an optimization action for the candidate story; selecting the evaluation problem corresponding to the optimization action; A fourth processing module, configured to input a fourth prompt word including the reference story, the candidate story and the evaluation question corresponding to the optimization action into the large language model to obtain a new candidate story; a fifth processing module, configured to determine whether an end condition is met, and if the end condition is not met, update the second prompt word according to the new candidate story, and trigger the second processing module, the third processing module and the fourth processing module to be repeatedly executed; The sixth processing module is used to obtain the candidate story finally output by the large language model as the analogy corpus if the end condition is met.

8. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the method for automatically generating analogy corpus through the computing power of an intelligent computing center as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for automatically generating analogy corpus through the computing power of an intelligent computing center as described in any one of claims 1 to 6.

10. A computer program product, characterized in that It comprises computer instructions, which, when executed by a processor, implement the steps of the method for automatically generating analogy corpus through the computing power of an intelligent computing center as described in any one of claims 1 to 6.