Figure generation method, system and equipment and storage medium

By introducing the method of standard-free data and multi-loss value calculation, the problem of insufficient diversity in image generation of Stable Diffusion model is solved, and the accuracy and diversity of literary pictures are improved.

CN120495437APending Publication Date: 2025-08-15UNICOM WOYUEDU TECH CULTURE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510417303.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing Stable Diffusion model lacks constraints on diversity in image generation, resulting in a straight decline in the generation effect when the training data is insufficient, which cannot effectively improve the diversity of the image.

Method used

By introducing standard-free data, using probability values ​​and preset thresholds to filter text, combining multiple loss values ​​to calculate the total loss value, updating the literary graph model, and achieving improved balance and accuracy of feature space.

Benefits of technology

The accuracy and diversity of literary pictures are improved, and the image generation effect is improved by comprehensively updating the model in multiple aspects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495437A_ABST
    Figure CN120495437A_ABST
Patent Text Reader

Abstract

The invention discloses a text graph method, system and device and a storage medium, and the method comprises the steps: inputting a first text, a first text conversion image and a second text into a preset initial text graph model, obtaining a first probability value, and determining a second text conversion image according to the first probability value; calculating a second probability value according to the first probability value and the second text conversion image, and screening the second text according to the second probability value and a preset threshold to obtain a third text; calculating a first loss value and a second loss value according to the third text and the initial text generation graph model; according to the first probability value and the first text, calculating a third loss value and a fourth loss value through an initial text generation graph model; and calculating the total loss value, updating according to the total loss value to obtain the trained text generation graph model, and inputting the to-be-converted text into the trained text generation graph model to obtain the text conversion image, so that unmarked data can be introduced, the balance of the feature space is realized, and the accuracy of the text generation graph is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to culture graphs, and in particular to a culture graph method, system, device and storage medium. Background Art

[0002] Text-to-image conversion is an important research area in the field of image-to-text conversion. Text-to-image conversion refers to the generation of corresponding images based on text. The Stable Diffusion model is one of the key models for text-to-image conversion in related technologies. It can be used to generate images based on text descriptions. A key evaluation metric for image generation tasks is the diversity of the generated data; the more diverse the generated data, the better the results.

[0003] However, the current Stable Diffusion loss function mainly constrains the realism of the generated images, but does not constrain the diversity of the images. The diversity of image generation mainly comes from the huge amount of training data. Insufficient training data will cause the image generation effect to plummet. Summary of the Invention

[0004] The present invention aims to at least solve the technical problems existing in the prior art. To this end, the present invention proposes a method, system, device and storage medium for generating a vinculum graph, which can introduce unlabeled data, achieve feature space balance, and improve the accuracy of the vinculum graph.

[0005] A first aspect of the present invention provides a method for generating a cultural image, comprising the following steps:

[0006] Get the text to be converted;

[0007] Input the text to be converted into a trained text-to-graph model to obtain a corresponding text-to-graph image output by the text-to-graph model; wherein the training process of the text-to-graph model includes:

[0008] Acquire a training data set, wherein the training data set includes a first text, a second text, and a first text-converted image converted from the first text;

[0009] Inputting the first text, the second text, and the first text-converted image into a preset initial text-graph model to obtain a first probability value, and determining a second text-converted image corresponding to the second text based on the first probability value;

[0010] Calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text;

[0011] Calculating a first loss value and a second loss value according to the third text and the initial text graph model;

[0012] Calculating a third loss value and a fourth loss value by using the initial text graph model according to the first probability value and the first text;

[0013] A total loss value is calculated according to the first loss value, the second loss value, the third loss value, and the fourth loss value, and the initial Vincent graph model is updated according to the total loss value until the total loss value reaches a preset value, thereby obtaining a trained Vincent graph model.

[0014] The control method according to the embodiment of the present invention has at least the following beneficial effects:

[0015] The method obtains the text to be converted; inputs the text to be converted into a trained text-graph model to obtain the corresponding text-conversion image output by the text-graph model; wherein the training process of the text-graph model includes: obtaining a training data set, wherein the training data set includes a first text, a second text and a first text-conversion image converted from the first text; inputs the first text, the first text-conversion image and the second text into a preset initial text-graph model to obtain a first probability value, and determines the second text-conversion image corresponding to the second text according to the first probability value; the method achieves the balance of the feature space by introducing unlabeled data, calculates the second probability value according to the first probability value and the second text-conversion image, and calculates the second probability value according to the second probability value. The second text is filtered by the preset threshold to obtain the third text; the first loss value and the second loss value are calculated according to the third text and the initial text graph model; the model is trained by labeled data, and then the unlabeled data is filtered by the trained model and the preset threshold, thereby improving the accuracy of the data; the third loss value and the fourth loss value are calculated by the initial text graph model according to the first probability value and the first text; the total loss value is calculated according to the first loss value, the second loss value, the third loss value and the fourth loss value, and the initial text graph model is updated according to the total loss value until the total loss value reaches the preset value, thereby obtaining the trained text graph model, and the training model is updated by comprehensively updating the loss values from multiple aspects, thereby improving the accuracy of the text graph.

[0016] According to some embodiments of the present invention, calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text includes:

[0017] Obtaining the first image label corresponding to the second text-converted image, the total number of label categories of the first text-converted image, the maximum number of samples belonging to the same label category among all label categories, and the minimum number of samples belonging to the same label category among all label categories;

[0018] Calculating an imbalance ratio according to the maximum sample size and the minimum sample size;

[0019] The second probability value is calculated according to the imbalance ratio and the first probability value using the following formula:

[0020]

[0021] in, is the second probability value of the i-th text-converted image in the second text-converted image, p i is the first probability value of the i-th text-converted image in the second text-converted image, μ is the imbalance ratio, N is the total number of label categories of the first text-converted image, K is the label category number of the sample to which the first image label corresponding to the i-th text-converted image in the second text-converted image belongs after sorting by the number of samples belonging to the same label category in the second text-converted image;

[0022] All texts whose second probability value corresponding to the second text is greater than the preset threshold are screened to obtain the third text.

[0023] According to some embodiments of the present invention, calculating the first loss value and the second loss value based on the third text and the initial text graph model includes:

[0024] Performing text enhancement on the third text using a first preset enhancement method to obtain a first enhanced text, wherein the first preset enhancement method is at least one of synonym replacement, random insertion, random swap, random deletion, random noise injection, and keyboard error injection;

[0025] Performing text enhancement on the third text using a second preset enhancement method to obtain a second enhanced text, wherein the second preset enhancement method includes at least one of generating new text based on a language model and introducing external data;

[0026] Inputting the first enhanced text into the initial text-graph model to obtain a first enhanced probability value; inputting the second enhanced text into the initial text-graph model to obtain a second enhanced probability value;

[0027] The first loss value and the second loss value are calculated according to the first enhancement probability value and the second enhancement probability value.

[0028] According to some embodiments of the present invention, calculating the first loss value and the second loss value according to the first enhanced probability value and the second enhanced probability value includes:

[0029] The first loss value is calculated according to the first enhancement probability value and the second enhancement probability value using the following formula:

[0030]

[0031] Among them, L CL(o) is the first loss value of the oth text of the third text, is the first enhanced probability value of the oth text of the third text, is the second enhanced probability value of the oth text of the third text, is the first enhanced probability value of the hth text of the third text, and H is the total number of third texts;

[0032] The second loss value is calculated according to the first enhancement probability value and the second enhancement probability value using the following formula:

[0033]

[0034] Among them, L con(o) is the second loss value of the o-th text of the third text.

[0035] According to some embodiments of the present invention, calculating a fourth loss value using the initial text graph model according to the first probability value and the first text includes:

[0036] Filtering the first text according to a preset ratio to obtain a fourth text;

[0037] Performing text enhancement on the fourth text using the first preset enhancement method to obtain a third enhanced text;

[0038] Performing text enhancement on the fourth text using the second preset enhancement method to obtain a fourth enhanced text;

[0039] Inputting the third enhanced text into the initial text graph model to obtain a third enhanced probability value; inputting the fourth enhanced text into the initial text graph model to obtain a fourth enhanced probability value;

[0040] The fourth loss value is calculated according to the third enhancement probability value and the fourth enhancement probability value.

[0041] According to some embodiments of the present invention, the fourth loss value is calculated by the following formula:

[0042]

[0043] Among them, L t-dist(e) is the fourth loss value of the e-th text of the fourth text, is the third enhanced probability value of the e-th text of the fourth text, is the fourth enhanced probability value of the e-th text of the fourth text, for The Euclidean norm of , for The Euclidean norm of .

[0044] According to some embodiments of the present invention, the third loss value is calculated by the following formula:

[0045]

[0046] Among them, L CE(i) is the third loss value of the i-th text of the first text, N is the total number of label categories of the first text conversion image, y ij is the true label of the i-th text of the first text on the j-th label category, p ij It is the first probability value of the i-th text of the first text in the j-th label category.

[0047] A second aspect of the present invention provides a culture graph system, the culture graph system comprising:

[0048] A data acquisition module is used to obtain the text to be converted;

[0049] The model training module is used to input the text to be converted into a trained text-to-graph model to obtain the corresponding text-to-graph image output by the text-to-graph model; wherein the training process of the text-to-graph model includes:

[0050] Acquire a training data set, wherein the training data set includes a first text, a second text, and a first text-converted image converted from the first text;

[0051] Inputting the first text, the second text, and the first text-converted image into a preset initial text-graph model to obtain a first probability value, and determining a second text-converted image corresponding to the second text based on the first probability value;

[0052] Calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text;

[0053] Calculating a first loss value and a second loss value according to the third text and the initial text graph model;

[0054] Calculating a third loss value and a fourth loss value by using the initial text graph model according to the first probability value and the first text;

[0055] A total loss value is calculated according to the first loss value, the second loss value, the third loss value, and the fourth loss value, and the initial Vincent graph model is updated according to the total loss value until the total loss value reaches a preset value, thereby obtaining a trained Vincent graph model.

[0056] The system obtains the text to be converted; inputs the text to be converted into a trained text-graph model to obtain the corresponding text-conversion image output by the text-graph model; wherein the training process of the text-graph model includes: obtaining a training data set, wherein the training data set includes a first text, a second text and a first text-conversion image converted from the first text; inputs the first text, the first text-conversion image and the second text into a preset initial text-graph model to obtain a first probability value, and determines the second text-conversion image corresponding to the second text according to the first probability value; the method achieves the balance of the feature space by introducing unlabeled data, calculates the second probability value according to the first probability value and the second text-conversion image, and calculates the second probability value according to the second probability value. The second text is filtered by the preset threshold to obtain the third text; the first loss value and the second loss value are calculated according to the third text and the initial text graph model; the model is trained by labeled data, and then the unlabeled data is filtered by the trained model and the preset threshold, thereby improving the accuracy of the data; the third loss value and the fourth loss value are calculated by the initial text graph model according to the first probability value and the first text; the total loss value is calculated according to the first loss value, the second loss value, the third loss value and the fourth loss value, and the initial text graph model is updated according to the total loss value until the total loss value reaches the preset value, thereby obtaining the trained text graph model, and the training model is updated by comprehensively updating the loss values from multiple aspects, thereby improving the accuracy of the text graph.

[0057] According to a third aspect of the present invention, a Vincent diagram electronic device is provided, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to perform the above-mentioned Vincent diagram method.

[0058] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned text image method.

[0059] It should be noted that the beneficial effects between the second to fourth aspects of the present invention and the prior art are the same as the beneficial effects between the above-mentioned cultural graph system and the prior art, and will not be described in detail here.

[0060] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:

[0062] Figure 1 is a flow chart of a text graph method according to an embodiment of the present invention;

[0063] Figure 2 It is a structural diagram of an embodiment of the Wensheng graph system provided by this application;

[0064] Figure 3 It is a structural diagram of an embodiment of the electronic device provided by this application. DETAILED DESCRIPTION

[0065] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0066] In the description of the present invention, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0067] In the description of the present invention, it should be understood that descriptions involving orientation, such as the orientation or positional relationship indicated by up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0068] In the description of the present invention, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0069] Text-to-image conversion is an important research area in the field of image-to-text conversion. Text-to-image conversion refers to the generation of corresponding images based on text. The Stable Diffusion model is one of the key models for text-to-image conversion in related technologies. It can be used to generate images based on text descriptions. A key evaluation metric for image generation tasks is the diversity of the generated data; the more diverse the generated data, the better the results.

[0070] However, the current Stable Diffusion loss function mainly constrains the realism of the generated images, but does not constrain the diversity of the images. The diversity of image generation mainly comes from the huge amount of training data. Insufficient training data will cause the image generation effect to plummet.

[0071] In order to solve the above technical defects, the embodiments of the present application provide a text-based image method, system, device and storage medium.

[0072] See Figure 1 , is a flow chart of a method for generating a text graph according to an embodiment of the present application, which is applied to an electronic device, which may be a server, etc. Figure 1 As shown, the text-generated graph method includes:

[0073] Step S101: Obtain the text to be converted;

[0074] Step S102: Input the text to be converted into the trained text-to-graph model to obtain the corresponding text-to-graph image output by the text-to-graph model. The training process of the text-to-graph model includes:

[0075] Acquire a training data set, wherein the training data set includes a first text, a second text, and a first text-converted image converted from the first text;

[0076] Inputting the first text, the first text-converted image, and the second text into a preset initial text-generated graph model to obtain a first probability value, and determining a second text-converted image corresponding to the second text based on the first probability value;

[0077] Calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text;

[0078] Calculating a first loss value and a second loss value according to the third text and the initial text graph model;

[0079] Calculate a third loss value and a fourth loss value according to the first probability value and the first text through the initial text graph model;

[0080] A total loss value is calculated according to the first loss value, the second loss value, the third loss value, and the fourth loss value, and the initial Vincent graph model is updated according to the total loss value until the total loss value reaches a preset value, thereby obtaining a trained Vincent graph model.

[0081] The method obtains the text to be converted; inputs the text to be converted into a trained text-graph model to obtain the corresponding text-conversion image output by the text-graph model; wherein the training process of the text-graph model includes: obtaining a training data set, wherein the training data set includes a first text, a second text and a first text-conversion image converted from the first text; inputs the first text, the first text-conversion image and the second text into a preset initial text-graph model to obtain a first probability value, and determines the second text-conversion image corresponding to the second text according to the first probability value; the method achieves the balance of the feature space by introducing unlabeled data, calculates the second probability value according to the first probability value and the second text-conversion image, and calculates the second probability value according to the second probability value. The second text is filtered by the preset threshold to obtain the third text; the first loss value and the second loss value are calculated according to the third text and the initial text graph model; the model is trained by labeled data, and then the unlabeled data is filtered by the trained model and the preset threshold, thereby improving the accuracy of the data; the third loss value and the fourth loss value are calculated by the initial text graph model according to the first probability value and the first text; the total loss value is calculated according to the first loss value, the second loss value, the third loss value and the fourth loss value, and the initial text graph model is updated according to the total loss value until the total loss value reaches the preset value, thereby obtaining the trained text graph model, and the training model is updated by comprehensively updating the loss values from multiple aspects, thereby improving the accuracy of the text graph.

[0082] Specifically, in some embodiments, the initial text graph model is updated according to the total loss value, and when the number of iterations reaches a preset number, a trained image classification model is obtained.

[0083] Specifically, in some embodiments, in the fields of machine learning and deep learning, it is often necessary to calculate and optimize the model's loss value. The loss value is an indicator that measures the difference between the model's predicted value and the actual value. The total loss value can be obtained by adding up the individual loss values according to certain weights.

[0084] The total loss value can be calculated based on the first loss value, the second loss value, the third loss value and the fourth loss value by the following formula:

[0085] Total loss value = w1×first loss value + w2×second loss value + w3×third loss value + w4×fourth loss value

[0086] Among them, w1 is the weight corresponding to the first loss value, w2 is the weight corresponding to the second loss value, w3 is the weight corresponding to the third loss value, and w4 is the weight corresponding to the fourth loss value.

[0087] Specifically, in some embodiments, weights may be set based on the importance of each loss value. If all loss values are equally important, the weights may all be set to 1. Once the total loss value is calculated, the back propagation algorithm may be used to update the model parameters.

[0088] Specifically, in some embodiments, when calculating the total loss value, weights are used to determine the importance of each individual loss value in the total loss. The selection of weights depends on a variety of factors, including:

[0089] The magnitude of each loss value: If the magnitudes of different loss values vary greatly, weights can be used to balance their impact.

[0090] Importance of individual loss values: Certain loss values may have a greater impact on model performance and thus can be given higher weights.

[0091] Experimentation and experience: Experiment to determine which weight combinations lead to the best model performance.

[0092] Specifically, in some embodiments, the labeled data is sorted in descending order by the number of categories, and then all the labeled and unlabeled data are divided into multiple batches. In each batch, the labeled and unlabeled data are input into the model, and the model calculates these data to obtain preliminary predictions.

[0093] Specifically, in some embodiments, the baseline network used by the Wensheng graph model is a wide residual network (WRN), which performs feature extraction and preliminary prediction on the input samples. WRN is different from the traditional ResNet, and WRN has made significant improvements in network structure. Specifically, the baseline model WRN improves the capacity and performance of the model by increasing the width of the network (that is, the number of channels in each layer), where each residual block contains two convolutional layers. Compared with traditional deep neural networks such as ResNet, WRN has a wider network structure and uses more convolution kernels in the convolution layer in each residual block, increasing the representation capacity of each layer. This change gives the Wensheng graph model more degrees of freedom in learning features and can capture more and more complex features.

[0094] The baseline model WRN uses residual blocks for more frequent jump connections compared to ResNet. The baseline network WRN has jump connections in each residual block, allowing information to flow more freely in the network, making gradients propagate more easily, and helping to alleviate the gradient disappearance problem.

[0095] In some embodiments, in step S102, calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text includes:

[0096] Step S201: Obtain the first image label corresponding to the second text-converted image, the total number of label categories of the first text-converted image, the maximum number of samples belonging to the same label category among all label categories, and the minimum number of samples belonging to the same label category among all label categories;

[0097] Step S202: Calculate the imbalance ratio based on the maximum and minimum sample quantities;

[0098] Step S203: Calculate a second probability value according to the imbalance ratio and the first probability value using the following formula:

[0099]

[0100] in, is the second probability value of the i-th text-converted image in the second text-converted image, p i is the first probability value of the i-th text-converted image in the second text-converted image, μ is the imbalance ratio, N is the total number of label categories of the first text-converted image, K is the label category number of the sample to which the first image label corresponding to the i-th text-converted image in the second text-converted image belongs after sorting by the number of samples belonging to the same label category in the second text-converted image;

[0101] Step S204: Filter all texts whose second probability values corresponding to the second text are greater than a preset threshold to obtain a third text.

[0102] Specifically, the imbalance ratio can be calculated by comparing the maximum sample size with the minimum sample size. The imbalance ratio is usually defined as the ratio between the maximum sample size and the minimum sample size. The calculation formula is as follows:

[0103] Imbalance ratio = maximum sample size ÷ minimum sample size.

[0104] Specifically, in some embodiments, the first image label corresponding to the second text-to-image is obtained in step S201. In a text dataset, each text-to-image conversion has a unique identifier. A record with the identifier "second text-to-image" is found, and its corresponding label is obtained.

[0105] Obtaining the total number of label categories of the first text-converted image may include counting the number of all unique labels when each text-converted image has one label.

[0106] To obtain the maximum number of samples belonging to the same label category among all label categories, you can calculate the number of times each label appears and find the label category with the largest number of occurrences.

[0107] Obtaining the minimum number of samples belonging to the same label category among all label categories can be done by calculating the number of occurrences for each label and finding the label category with the least number of occurrences.

[0108] Specifically, in some embodiments, filtering all texts whose second probability values corresponding to the second text are greater than a preset threshold in the above-mentioned step S204 to obtain the third text can be obtained by filtering all texts whose second probability values corresponding to the second text are greater than a preset threshold through a list derivation to obtain the third text.

[0109] Specifically, in some embodiments, by inputting the first predicted value of the unlabeled data into the adaptive rebalancing contrastive learning module, more high-quality unlabeled data biased towards the tail class is screened out.

[0110] Specifically, the unlabeled texts in a batch are counted and sorted in descending order according to the number of categories. The category number of the sorted samples is recorded as K. The unlabeled data prediction value p is adaptively adjusted inversely according to the imbalance ratio μ of the original text data distribution. i get Adjusted forecast value Screening is performed to select samples with values above a preset threshold from the unlabeled data and add them to the training set. By rebalancing the data set in a completely opposite way to the distribution of the original text dataset, the prediction value of the tail class is adaptively increased. The probability that unlabeled data from the tail class will be selected for model training. The adaptive rebalancing contrastive learning module selects high-quality unlabeled data that is biased towards the tail class for training, adaptively increasing the number of samples in the model training process and alleviating the data imbalance problem.

[0111] In some embodiments, calculating the first loss value and the second loss value according to the third text and the initial text graph model in step S102 includes:

[0112] Step S301: performing text enhancement on the third text using a first preset enhancement method to obtain a first enhanced text, wherein the first preset enhancement method is at least one of synonym replacement, random insertion, random swap, random deletion, random noise injection, and keyboard error injection;

[0113] Step S302: performing text enhancement on the third text using a second preset enhancement method to obtain a second enhanced text, wherein the second preset enhancement method includes at least one of generating new text based on a language model and introducing external data;

[0114] Step S303: Input the first enhanced text into the initial text-graph model to obtain a first enhanced probability value; input the second enhanced text into the initial text-graph model to obtain a second enhanced probability value;

[0115] Step S304: Calculate a first loss value and a second loss value according to the first enhanced probability value and the second enhanced probability value.

[0116] Specifically, in some embodiments, synonym replacement may be performed by randomly extracting n words from a sentence without considering stopwords, and then randomly extracting synonyms from a synonym dictionary to replace them.

[0117] Specifically, in some embodiments, random insertion may be to randomly extract a word without considering stopwords, and then randomly select one from a set of synonyms of the word and insert it into a random position in the original sentence.

[0118] Specifically, in some embodiments, random swapping may involve randomly selecting two words in a sentence and swapping their positions.

[0119] Specifically, in some embodiments, the random deletion may be to randomly delete each word in the sentence with a probability p.

[0120] Specifically, in some embodiments, random noise injection can be performed by injecting noise into text to generate new text. For example, spelling errors can be added programmatically or by using a mapping of common spelling errors; or rules can be used to transform the original sentence to generate a paraphrase.

[0121] Specifically, in some embodiments, the keyboard error injection may be a QWERTY keyboard error injection, where the QWERTY keyboard error injection simulates common errors that occur when typing on a QWERTY keyboard layout due to the close proximity between keys.

[0122] Specifically, in some embodiments, the first preset enhancement method may also be noise based on unigram frequency distribution, where the noise based on unigram frequency distribution is replaced with words sampled from the unigram frequency distribution. This frequency is basically the number of times each word appears in the training corpus.

[0123] Specifically, in some embodiments, the second preset enhancement method may be feature-based enhancement, which uses a language model or word embedding to generate new text. The second preset enhancement method may also be a language model-based method.

[0124] Specifically, in some embodiments, the language model-based method can be a masked language model, which uses pre-trained models such as BERT and Roberta to partially mask the original sentence, and then allows the model to predict the masked part to obtain a new sentence.

[0125] Specifically, in some embodiments, the second preset enhancement method may also be a translation-based method.

[0126] Specifically, in some embodiments, the translation-based method can be to translate the text into another language and then translate it back. At the same time, it can be translated into multiple languages to obtain multiple back-translation samples.

[0127] Specifically, in some embodiments, the second preset enhancement method may also be a method based on external knowledge.

[0128] Specifically, in some embodiments, the external knowledge-based method may be to introduce external data, such as WordNet or Chinese synonyms and antonyms dictionary, to perform synonym or near-anonym replacement.

[0129] Specifically, in some embodiments, the second preset enhancement method may also utilize a regular expression or a text matching algorithm.

[0130] Specifically, in some embodiments, punctuation marks, HTML tags, and special characters may be removed using regular expressions or text matching algorithms.

[0131] Specifically, in some embodiments, the second preset enhancement method may also be stem extraction and lemma restoration.

[0132] Specifically, in some embodiments, stemming and lemmatization can utilize a stemming algorithm to restore words to their base form, thereby reducing data dimensionality. Lemmatization can restore different forms of words to their base form, thereby improving data consistency.

[0133] Specifically, in step S301, the third text is enhanced by a first preset enhancement method to obtain a first enhanced text, wherein the first preset enhancement method is at least one of synonym replacement, random insertion, random exchange, random deletion, random noise injection and keyboard error injection. The third text can be enhanced by synonym replacement to obtain the first enhanced text, or the third text can be enhanced by synonym replacement and random insertion to obtain the first enhanced text, or the third text can be enhanced by random insertion, random exchange and random deletion to obtain the first enhanced text.

[0134] Specifically, in step S302, the third text is enhanced by a second preset enhancement method to obtain a second enhanced text, wherein the second preset enhancement method includes at least one of generating new text based on a language model and introducing external data. The second enhanced text can be enhanced by a method of generating new text based on a language model to obtain a second enhanced text, or the third text can be enhanced by a method of introducing external data to obtain a second enhanced text, or the third text can be enhanced by a method of generating new text based on a language model and introducing external data to obtain a second enhanced text.

[0135] Specifically, in step S302, the third text is enhanced by a second preset enhancement method to obtain the second enhanced text. Alternatively, the third text is enhanced by stem extraction and morphological restoration to obtain the second enhanced text.

[0136] Specifically, in step S304, calculating the first loss value and the second loss value according to the first enhanced probability value and the second enhanced probability value can be performed by calculating the first loss value and the second loss value through mean square error according to the first enhanced probability value and the second enhanced probability value, or by calculating the first loss value and the second loss value through binary cross entropy loss according to the first enhanced probability value and the second enhanced probability value, or by calculating the first loss value through binary cross entropy loss according to the first enhanced probability value and the second enhanced probability value, and calculating the second loss value through mean square error according to the first enhanced probability value and the second enhanced probability value.

[0137] By calculating the first loss value, this embodiment maximizes the consistency of positive sample pairs generated by the same unlabeled data in the feature space, thereby shortening the distance between positive sample pairs in the feature space. Simultaneously, by minimizing the consistency of negative samples generated by other unlabeled data, they can be pushed further apart in the feature space, effectively widening the distance between different categories and improving the classification performance and robustness of the model.

[0138] In some embodiments, calculating the first loss value and the second loss value according to the first enhanced probability value and the second enhanced probability value in step S304 includes:

[0139] Step S401: Calculate a first loss value according to the first enhanced probability value and the second enhanced probability value using the following formula:

[0140]

[0141] Among them, L CL(o) is the first loss value of the oth text of the third text, is the first enhanced probability value of the oth text of the third text, is the second enhanced probability value of the oth text of the third text, is the first enhanced probability value of the hth text of the third text, and H is the total number of third texts;

[0142] Step S402: Calculate the second loss value according to the first enhanced probability value and the second enhanced probability value using the following formula:

[0143]

[0144] Among them, L con(o) is the second loss value of the o-th text of the third text.

[0145] Specifically, this embodiment calculates the consistency loss L con(o) , complete the consistency estimation. From this process, we can constrain and filter out high-confidence unlabeled texts and reduce the interference of noise data on the model. con(o) By estimating the consistency of different enhanced texts of the same sample, we can continuously narrow the distance between the positive sample pairs during the model training process, improve the feature compactness of the feature space, and enhance the classification accuracy.

[0146] In some embodiments, calculating the fourth loss value in step S102 according to the first probability value and the first text using the initial text graph model includes:

[0147] Step S501: Filter the first text according to a preset ratio to obtain a fourth text;

[0148] Step S502: performing text enhancement on the fourth text using a first preset enhancement method to obtain a third enhanced text;

[0149] Step S503: performing text enhancement on the fourth text using the second preset enhancement method to obtain a fourth enhanced text;

[0150] Step S504: input the third enhanced text into the initial text-graph model to obtain a third enhanced probability value; input the fourth enhanced text into the initial text-graph model to obtain a fourth enhanced probability value;

[0151] Step S505: Calculate a fourth loss value according to the third enhanced probability value and the fourth enhanced probability value.

[0152] Specifically, in S501 , the first text is filtered according to a preset ratio to obtain the fourth text. This can be done by filtering the first text according to a preset ratio of text type numbers or randomly filtering the first text according to the total number of texts to obtain the fourth text.

[0153] Specifically, in step S502, the fourth text is enhanced by the first preset enhancement method to obtain the third enhanced text. The fourth text can be enhanced by synonym replacement to obtain the third enhanced text, or the fourth text can be enhanced by synonym replacement and random insertion to obtain the third enhanced text, or the fourth text can be enhanced by random insertion, random exchange and random deletion to obtain the third enhanced text.

[0154] Specifically, in step S503, the fourth text is enhanced by the second preset enhancement method to obtain the fourth enhanced text. The fourth text can be enhanced by a method of generating new text based on a language model to obtain the fourth enhanced text, or the fourth text can be enhanced by a method of introducing external data to obtain the fourth enhanced text, or the fourth text can be enhanced by a method of generating new text based on a language model and introducing external data to obtain the fourth enhanced text.

[0155] Specifically, in step S503, the fourth text is enhanced by the second preset enhancement method to obtain the fourth enhanced text. Alternatively, the fourth text is enhanced by stem extraction and morphological restoration to obtain the fourth enhanced text.

[0156] Specifically, in step S304, calculating the first loss value and the second loss value according to the first enhanced probability value and the second enhanced probability value can be performed by calculating the first loss value and the second loss value according to the first enhanced probability value and the second enhanced probability value through the mean absolute error, or by calculating the first loss value and the second loss value according to the first enhanced probability value and the second enhanced probability value through multi-category cross entropy loss, or by calculating the first loss value according to the first enhanced probability value and the second enhanced probability value through multi-category cross entropy loss, and calculating the second loss value according to the first enhanced probability value and the second enhanced probability value through the mean absolute error.

[0157] Specifically, this embodiment inputs the first text into the tail distance module to screen out the fourth text, and expands the feature boundary of the tail class by calculating the tail distance, thereby alleviating the squeezing of the tail class feature space.

[0158] In some embodiments, in step S505, the fourth loss value is calculated using the following formula:

[0159]

[0160] Among them, L t-dist(e) is the fourth loss value of the e-th text of the fourth text, is the third enhanced probability value of the e-th text of the fourth text, is the fourth enhanced probability value of the e-th text of the fourth text, for The Euclidean norm of , for The Euclidean norm of .

[0161] In some embodiments, in step S102, the third loss value is calculated using the following formula:

[0162]

[0163] Among them, L CE(i) is the third loss value of the i-th text of the first text, N is the total number of label categories of the first text conversion image, y ij is the true label of the i-th text of the first text on the j-th label category, p ij It is the first probability value of the i-th text of the first text in the j-th label category.

[0164] Specifically, to facilitate understanding by those skilled in the art, a set of best embodiments are provided below:

[0165] 1. Data Acquisition

[0166] Get the text to be converted.

[0167] A training data set is obtained, wherein the training data set includes a first text, a second text, and a first text-converted image converted from the first text.

[0168] 2. Model training:

[0169] The first text, the first text conversion image and the second text are input into a preset initial text-graph model to obtain a first probability value, and the second text conversion image corresponding to the second text is determined according to the first probability value.

[0170] The second probability value is calculated based on the first probability value and the second text conversion image, and the second text is filtered based on the second probability value and a preset threshold to obtain a third text, which is specifically:

[0171] Obtain the first image label corresponding to the second text-converted image, the total number of label categories of the first text-converted image, the maximum number of samples belonging to the same label category among all label categories, and the minimum number of samples belonging to the same label category among all label categories.

[0172] The imbalance ratio is calculated based on the maximum sample size and the minimum sample size.

[0173] The second probability value is calculated according to the imbalance ratio and the first probability value using the following formula:

[0174]

[0175] in, is the second probability value of the i-th text-converted image in the second text-converted image, p i is the first probability value of the i-th text-converted image in the second text-converted image, μ is the imbalance ratio, N is the total number of label categories of the first text-converted image, and K is the label category number of the first image label corresponding to the i-th text-converted image in the second text-converted image after sorting the samples in the first text-converted image according to the number of samples belonging to the same label category.

[0176] All texts whose second probability values corresponding to the second text are greater than a preset threshold are screened to obtain a third text.

[0177] The first loss value and the second loss value are calculated based on the third text and the initial text graph model, specifically:

[0178] The third text is enhanced by a first preset enhancement method to obtain a first enhanced text, wherein the first preset enhancement method is at least one of synonym replacement, random insertion, random swap, random deletion, random noise injection and keyboard error injection.

[0179] The third text is enhanced by a second preset enhancement method to obtain a second enhanced text, wherein the second preset enhancement method includes at least one of generating new text based on a language model and introducing external data.

[0180] The first enhanced text is input into the initial text-graph model to obtain a first enhanced probability value; the second enhanced text is input into the initial text-graph model to obtain a second enhanced probability value.

[0181] The first loss value and the second loss value are calculated according to the first enhanced probability value and the second enhanced probability value, specifically:

[0182] The first loss value is calculated according to the first enhanced probability value and the second enhanced probability value using the following formula:

[0183]

[0184] Among them, L CL(o) is the first loss value of the oth text of the third text, is the first enhanced probability value of the oth text of the third text, is the second enhanced probability value of the oth text of the third text, is the first enhanced probability value of the hth text of the third text, and H is the total number of third texts;

[0185] The second loss value is calculated according to the first enhanced probability value and the second enhanced probability value using the following formula:

[0186]

[0187] Among them, L con(o) is the second loss value of the o-th text of the third text.

[0188] The third loss value and the fourth loss value are calculated by the initial text graph model according to the first probability value and the first text, specifically:

[0189] The third loss value is calculated by the following formula:

[0190]

[0191] Among them, L CE(i) is the third loss value of the i-th text of the first text, N is the total number of label categories of the first text conversion image, y ij is the true label of the i-th text of the first text on the j-th label category, p ij It is the first probability value of the i-th text of the first text in the j-th label category.

[0192] The first text is filtered according to a preset ratio to obtain a fourth text.

[0193] The fourth text is enhanced by using the first preset enhancement method to obtain a third enhanced text.

[0194] The fourth text is enhanced by using the second preset enhancement method to obtain a fourth enhanced text.

[0195] The third enhanced text is input into the initial text graph model to obtain a third enhanced probability value.

[0196] The fourth enhanced text is input into the initial text-graph model to obtain a fourth enhanced probability value.

[0197] The fourth loss value is calculated according to the third enhanced probability value and the fourth enhanced probability value, specifically:

[0198] The fourth loss value is calculated by the following formula:

[0199]

[0200] Among them, L t-dist(e) is the fourth loss value of the e-th text of the fourth text, is the third enhanced probability value of the e-th text of the fourth text, is the fourth enhanced probability value of the e-th text of the fourth text, for The Euclidean norm of , for The Euclidean norm of .

[0201] A total loss value is calculated according to the first loss value, the second loss value, the third loss value, and the fourth loss value, and the initial Vincent graph model is updated according to the total loss value until the total loss value reaches a preset value, thereby obtaining a trained Vincent graph model.

[0202] 3. Text conversion:

[0203] The text to be converted is input into the trained text-to-graph model to obtain the corresponding text-to-graph image output by the text-to-graph model.

[0204] In addition, refer to Figure 2 One embodiment of the present invention provides a cultural graph system, including a data acquisition module 1100 and a model training module 1200, wherein:

[0205] The data acquisition module 1100 is used to obtain the text to be converted;

[0206] The model training module 1200 is used to input the text to be converted into the trained text-to-graph model and obtain the corresponding text-to-graph image output by the text-to-graph model. The training process of the text-to-graph model includes:

[0207] Acquire a training data set, wherein the training data set includes a first text, a second text, and a first text-converted image converted from the first text;

[0208] Inputting the first text, the first text-converted image, and the second text into a preset initial text-generated graph model to obtain a first probability value, and determining a second text-converted image corresponding to the second text based on the first probability value;

[0209] Calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text;

[0210] Calculating a first loss value and a second loss value according to the third text and the initial text graph model;

[0211] Calculate a third loss value and a fourth loss value according to the first probability value and the first text through the initial text graph model;

[0212] A total loss value is calculated according to the first loss value, the second loss value, the third loss value, and the fourth loss value, and the initial Vincent graph model is updated according to the total loss value until the total loss value reaches a preset value, thereby obtaining a trained Vincent graph model.

[0213] The system obtains the text to be converted; inputs the text to be converted into a trained text-graph model to obtain the corresponding text-conversion image output by the text-graph model; wherein the training process of the text-graph model includes: obtaining a training data set, wherein the training data set includes a first text, a second text and a first text-conversion image converted from the first text; inputs the first text, the first text-conversion image and the second text into a preset initial text-graph model to obtain a first probability value, and determines the second text-conversion image corresponding to the second text according to the first probability value; the method achieves the balance of the feature space by introducing unlabeled data, calculates the second probability value according to the first probability value and the second text-conversion image, and calculates the second probability value according to the second probability value. The second text is filtered by the preset threshold to obtain the third text; the first loss value and the second loss value are calculated according to the third text and the initial text graph model; the model is trained by labeled data, and then the unlabeled data is filtered by the trained model and the preset threshold, thereby improving the accuracy of the data; the third loss value and the fourth loss value are calculated by the initial text graph model according to the first probability value and the first text; the total loss value is calculated according to the first loss value, the second loss value, the third loss value and the fourth loss value, and the initial text graph model is updated according to the total loss value until the total loss value reaches the preset value, thereby obtaining the trained text graph model, and the training model is updated by comprehensively updating the loss values from multiple aspects, thereby improving the accuracy of the text graph.

[0214] It should be noted that this system embodiment and the above-mentioned method embodiment are based on the same inventive concept, so the relevant content of the above-mentioned method embodiment is also applicable to this system embodiment and will not be repeated here.

[0215] Figure 3 A schematic diagram of the hardware structure of the Wensheng graph provided in an embodiment of the present application is shown.

[0216] The Wenshengtu device may include a processor 301 and a memory 302 storing computer program instructions.

[0217] Specifically, the processor 301 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0218] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 302 may include removable or non-removable (or fixed) media. Where appropriate, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.

[0219] In some embodiments, the memory 302 may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0220] The processor 301 reads and executes computer program instructions stored in the memory 302 to implement any one of the above-mentioned methods for creating a text map.

[0221] In one example, the Wenshengtu device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301 , the memory 302 , and the communication interface 303 are connected via a bus 310 and communicate with each other.

[0222] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0223] Bus 310 includes hardware, software or both, couples the parts of the graphic device to each other. For example, and not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0224] The Wenshengtu device can execute the Wenshengtu method in the embodiment of the present application based on the three-dimensional design model, thereby realizing the combination of Figure 1 and Figure 2 Described are the Vincent graph method and system.

[0225] In addition, in conjunction with the Vincent diagram method in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the Vincent diagram methods in the above embodiments is implemented.

[0226] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0227] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0228] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0229] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0230] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.

Claims

1. A Vincent graph method, characterized in that: The Wensheng diagram method includes: Get the text to be converted; Input the text to be converted into a trained text-to-graph model to obtain a corresponding text-to-graph image output by the text-to-graph model; wherein the training process of the text-to-graph model includes: Acquire a training data set, wherein the training data set includes a first text, a second text, and a first text-converted image converted from the first text; Inputting the first text, the second text, and the first text-converted image into a preset initial text-graph model to obtain a first probability value, and determining a second text-converted image corresponding to the second text based on the first probability value; Calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text; Calculating a first loss value based on the third text using a first preset enhancement method and the initial text graph model; calculating a second loss value based on the third text using a second preset enhancement method and the initial text graph model; Inputting the first text into the initial text graph model to calculate a third loss value; calculating a fourth loss value based on the first text using the first preset enhancement method, the second preset enhancement method, and the initial text graph model; The initial Vincent graph model is updated according to the first loss value, the second loss value, the third loss value, and the fourth loss value to obtain a trained Vincent graph model.

2. The method according to claim 1, wherein: The step of calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text includes: Obtaining the first image label corresponding to the second text-converted image, the total number of label categories of the first text-converted image, the maximum number of samples belonging to the same label category among all label categories, and the minimum number of samples belonging to the same label category among all label categories; Calculating an imbalance ratio according to the maximum sample size and the minimum sample size; The second probability value is calculated according to the imbalance ratio and the first probability value using the following formula: in, is the second probability value of the i-th text-converted image in the second text-converted image, p i is the first probability value of the i-th text-converted image in the second text-converted image, μ is the imbalance ratio, N is the total number of label categories of the first text-converted image, K is the label category number of the sample to which the first image label corresponding to the i-th text-converted image in the second text-converted image belongs after sorting by the number of samples belonging to the same label category in the second text-converted image; All texts whose second probability value corresponding to the second text is greater than the preset threshold are screened to obtain the third text.

3. The method according to claim 1, wherein: calculating a first loss value according to the third text by using a first preset enhancement method and the initial text graph model; Calculating a second loss value according to the third text using a second preset enhancement method and the initial text graph model includes: Performing text enhancement on the third text using a first preset enhancement method to obtain a first enhanced text, wherein the first preset enhancement method is at least one of synonym replacement, random insertion, random swap, random deletion, random noise injection, and keyboard error injection; Performing text enhancement on the third text using a second preset enhancement method to obtain a second enhanced text, wherein the second preset enhancement method includes at least one of generating new text based on a language model and introducing external data; Inputting the first enhanced text into the initial text-graph model to obtain a first enhanced probability value; inputting the second enhanced text into the initial text-graph model to obtain a second enhanced probability value; The first loss value and the second loss value are calculated according to the first enhancement probability value and the second enhancement probability value.

4. The method according to claim 3, wherein: The calculating the first loss value and the second loss value according to the first enhanced probability value and the second enhanced probability value includes: The first loss value is calculated according to the first enhancement probability value and the second enhancement probability value using the following formula: Among them, L CL(o) is the first loss value of the oth text of the third text, is the first enhanced probability value of the oth text of the third text, is the second enhanced probability value of the oth text of the third text, is the first enhanced probability value of the hth text of the third text, and H is the total number of third texts; The second loss value is calculated according to the first enhancement probability value and the second enhancement probability value using the following formula: Among them, L con(o) is the second loss value of the o-th text of the third text.

5. The method according to claim 3, wherein: The calculating a fourth loss value according to the first text by using the first preset enhancement method, the second preset enhancement method, and the initial text graph model includes: Filtering the first text according to a preset ratio to obtain a fourth text; Performing text enhancement on the fourth text using the first preset enhancement method to obtain a third enhanced text; Performing text enhancement on the fourth text using the second preset enhancement method to obtain a fourth enhanced text; Inputting the third enhanced text into the initial text graph model to obtain a third enhanced probability value; inputting the fourth enhanced text into the initial text graph model to obtain a fourth enhanced probability value; The fourth loss value is calculated according to the third enhancement probability value and the fourth enhancement probability value.

6. The method according to claim 3, characterized in that: The fourth loss value is calculated by the following formula: Among them, L t-dist(e) is the fourth loss value of the e-th text of the fourth text, is the third enhanced probability value of the e-th text of the fourth text, is the fourth enhanced probability value of the e-th text of the fourth text, for The Euclidean norm of , for The Euclidean norm of .

7. The method according to claim 1, wherein: The third loss value is calculated by the following formula: Among them, L CE(i) is the third loss value of the i-th text of the first text, N is the total number of label categories of the first text conversion image, y ij is the true label of the i-th text of the first text on the j-th label category, p ij It is the first probability value of the i-th text of the first text in the j-th label category.

8. A Wensheng graph system, characterized in that: The Wensheng graph system includes: A data acquisition module is used to obtain the text to be converted; The model training module is used to input the text to be converted into a trained text-to-graph model to obtain the corresponding text-to-graph image output by the text-to-graph model; wherein the training process of the text-to-graph model includes: Acquire a training data set, wherein the training data set includes a first text, a second text, and a first text-converted image converted from the first text; Inputting the first text, the second text, and the first text-converted image into a preset initial text-graph model to obtain a first probability value, and determining a second text-converted image corresponding to the second text based on the first probability value; Calculating a second probability value based on the first probability value and the second text conversion image, and filtering the second text based on the second probability value and a preset threshold to obtain a third text; Calculating a first loss value based on the third text using a first preset enhancement method and the initial text graph model; calculating a second loss value based on the third text using a second preset enhancement method and the initial text graph model; Inputting the first text into the initial text graph model to calculate a third loss value; calculating a fourth loss value based on the first text using the first preset enhancement method, the second preset enhancement method, and the initial text graph model; The initial Vincent graph model is updated according to the first loss value, the second loss value, the third loss value, and the fourth loss value to obtain a trained Vincent graph model.

9. A Wensheng map device, characterized in that: The device comprises at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to perform a Vincent diagram method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the Vincent diagram method according to any one of claims 1 to 7.