Training method and device of cloud note generation model and electronic equipment

By collecting and processing user notes, calculating keyword weights, performing feature extraction, and training cloud notes generation models, the problem of cloud notes relying on a large amount of data is solved, the model's learning and prediction capabilities are improved, and more reliable and high-quality Cloud notes generate results.

CN119294556APending Publication Date: 2025-01-10CHINA MOBILE INTERNET CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411340801.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

Cloud notes’ self-generated models rely on a large amount of user input and data, and poor data quality and accuracy can lead to a decline in model learning and prediction capabilities.

Method used

By collecting user notes, obtaining keywords, calculating keyword weights, preprocessing and feature extraction, it is used to train cloud notes to generate models, providing reliable data input, and improving model quality and accuracy.

Benefits of technology

Without relying on a large amount of user input and data, the learning and prediction capabilities of cloud note generation models are improved, and more reliable and satisfactory cloud note generation results are provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294556A_ABST
    Figure CN119294556A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a training method and device for a cloud note generation model and electronic equipment, and the method comprises the steps: collecting note data of a user, and obtaining keywords in the note data; calculating the weight of the obtained keyword; preprocessing the note data according to the weight of the keyword; performing feature extraction on the preprocessed note data; and training a cloud note generation model by taking a feature extraction result as input and the cloud note as output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud technology, and in particular to a training method, device and electronic device for a cloud note generation model. Background Art

[0002] The cloud note self-generation model is a model that automatically generates notes using cloud technology. The model automatically organizes, summarizes and edits notes that meet user needs by analyzing user input and context information. This model can help users quickly organize the information they need, saving a lot of time and energy, and improving work efficiency and quality of life.

[0003] However, the cloud note self-generated model relies on a large amount of user input and data, so the quality and accuracy of the data are crucial to the performance and results of the model. If the data is biased or noisy, it may lead to a decline in the model's learning and prediction capabilities. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a training method, device and electronic device for a cloud note generation model to solve the problems in the prior art.

[0005] To solve the above technical problems, the embodiments of the present invention are implemented as follows: In a first aspect, an embodiment of the present invention provides a method for training a cloud note generation model, comprising: Collecting user's note data and obtaining keywords in the note data; Calculate the weight of the acquired keywords; Preprocessing the note data according to the weight of the keyword; Perform feature extraction on the preprocessed note data; The cloud note generation model is trained with the result of feature extraction as input and cloud notes as output.

[0006] In a second aspect, an embodiment of the present invention provides a training device for a cloud note generation model, comprising: A collection module, used to collect user's note data and obtain keywords in the note data; A calculation module, used to calculate the weight of the acquired keywords; A preprocessing module, used for preprocessing the note data according to the weight of the keyword; The extraction module is used to extract features from the preprocessed note data; The training module is used to train the cloud note generation model using the result of feature extraction as input and the cloud notes as output.

[0007] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the training method for the cloud note generation model provided in the above embodiment.

[0008] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the training method of the cloud note generation model provided in the above embodiment are implemented.

[0009] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the training method for the cloud note generation model provided in the above embodiment.

[0010] It can be seen from the technical solution provided by the above embodiments of the present invention that the embodiments of the present invention collect user's note data, obtain keywords in the note data, calculate the weights of the obtained keywords, preprocess the note data according to the weights of the keywords, perform feature extraction on the preprocessed note data, and train the cloud note generation model with the result of feature extraction as input and cloud notes as output. This preprocessing method can provide reliable data for model training without relying on a large amount of user input and data, and can improve the quality and accuracy of the cloud note generation model, enhance the learning and prediction capabilities of the cloud note generation model, and provide users with more reliable and more satisfactory cloud notes. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0012] Figure 1 A flowchart of a method for training a cloud note generation model provided by an embodiment of the present invention; Figure 2 A flowchart of another method for training a cloud note generation model provided by an embodiment of the present invention; Figure 3 A schematic diagram of a feature extraction process provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a training device for a cloud note generation model provided in an embodiment of the present invention; Figure 5A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0013] Embodiments of the present invention provide a method, device and electronic device for training a cloud note generation model.

[0014] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present invention.

[0015] First, the terms involved in the present invention are explained.

[0016] The training method and device of the cloud note generation model provided in the embodiment of the present invention can be applied to a server in the cloud, which can be an independent server or a server cluster composed of multiple servers, without specific limitation. Through the above method and device, the accuracy of the cloud note generation model can be improved, the learning and prediction capabilities of the cloud note generation model can be enhanced, and users can be provided with more reliable and more satisfactory cloud notes.

[0017] like Figure 1 As shown, an embodiment of the present invention provides a training method for a cloud note generation model, which may include the following steps: S102: Collect the user's note data and obtain keywords in the note data.

[0018] In the embodiment of the present invention, the user's note data may come from a variety of sources, including but not limited to: personal notes, social media, forums, etc. By collecting data from different sources, the scale and diversity of the data can be guaranteed to ensure that the cloud note generation model can learn from multiple perspectives and scenarios.

[0019] Personal notes refer to the information recorded by users in their daily life, work and study, including to-do items, important dates, inspirational ideas or study notes, etc. These notes usually contain the user's personal experience and knowledge, and are therefore an important source of data for building models.

[0020] Among them, user-generated content on social media (such as Weibo, Facebook, Twitter and other platforms) can also be used as a data source for building models. These contents include but are not limited to: user status updates, comments, likes, etc., which usually reflect the user's interests, opinions and emotions. By analyzing social media data, we can understand the user's language habits, topic trends and social relationships, thereby improving the generation ability and personalization of the model.

[0021] Among them, a forum refers to a platform where users discuss and communicate around a specific topic, such as a technical forum, an academic forum, etc. The data in the forum includes users' posts, replies, comments, etc., which are usually highly professional and targeted. By analyzing forum data, we can understand users' professional knowledge and experience in specific fields, as well as their problem-solving methods and thinking processes. These data are very valuable for building self-generated models for specific fields.

[0022] S104: Calculate the weight of the acquired keyword.

[0023] In the embodiment of the present invention, the above step S104 may include: Determine the speed and position of the acquired keywords; calculate the fitness of each keyword based on the similarity between the keywords; calculate the weight of each keyword based on the fitness of each keyword; based on the weight of each keyword, use the optimal algorithm to iteratively calculate the speed and position of the keywords to obtain the expected weight of each keyword.

[0024] S106: Preprocess the note data according to the weight of the keywords.

[0025] In the embodiment of the present invention, the above step S106 may include: Compare the weight of the keyword with the preset threshold; filter the note data, retain the keywords corresponding to the weight higher than the threshold, and discard the keywords corresponding to the weight less than or equal to the threshold.

[0026] S108: Perform feature extraction on the preprocessed note data.

[0027] In the embodiment of the present invention, the above step S108 may include: Use a neural network to extract features from the preprocessed note data to obtain word vectors; calculate the attention weights of the word vectors; normalize the attention weights; calculate the fusion vector based on the word vectors and attention weights, and use the fusion vector as the input of the cloud note generation model.

[0028] S110: Using the result of feature extraction as input and the cloud notes as output, the cloud note generation model is trained.

[0029] The above method provided by the embodiment of the present invention collects the user's note data, obtains the keywords in the note data, calculates the weights of the obtained keywords, preprocesses the note data according to the weights of the keywords, performs feature extraction on the preprocessed note data, and trains the cloud note generation model with the result of the feature extraction as input and the cloud notes as output. This preprocessing method can provide reliable data for model training without relying on a large amount of user input and data, and can improve the quality and accuracy of the cloud note generation model, enhance the learning and prediction capabilities of the cloud note generation model, and provide users with more reliable and more satisfactory cloud notes.

[0030] like Figure 2 As shown, the embodiment of the present invention provides another training method for a cloud note generation model, which may include the following steps: S202: Collect the user's note data and obtain keywords in the note data.

[0031] S204: Determine the speed and position of the acquired keywords.

[0032] In one implementation, initialization parameters may be pre-set, such as the initial speed and position of the keyword, and the number of iterations, etc. The speed and position of the keyword are variables in the iterative calculation process, and are used to obtain the weight of the keyword through iterative calculation.

[0033] S206: Calculate the fitness of each keyword based on the similarity between the keywords.

[0034] In one implementation, the above step S206 may include: The fitness of each keyword is calculated according to the following formula: ; in, Indicates keywords The fitness of , t represents the number of iterations, represents the penalty function, represents the penalty factor, Indicates keywords The vocabulary, Indicates keywords The vocabulary, Indicates keywords The Words and keywords The The similarity of words, Indicates keywords The data length, Indicates keywords The data length, K represents the keyword The total number of words in .

[0035] The above penalty factors can be preset as needed, and the specific values ​​are not limited.

[0036] The fitness of each keyword can be calculated by the above formula. In addition, the individual optimal solution and group optimal solution of fitness can also be calculated by the above formula.

[0037] In the embodiment of the present invention, the individual optimal solution of fitness refers to the solution that can make the objective function reach the optimal value by taking the above formula as the objective function. The group optimal solution of fitness refers to the group optimal solution obtained by averaging the fitness of all keywords after obtaining the fitness of all keywords.

[0038] S208: Calculate the weight of each keyword based on the fitness of each keyword.

[0039] In one implementation, the above step S208 may include: Determine the maximum fitness among the fitness of each keyword, and calculate the average fitness according to the fitness of each keyword; Based on the maximum fitness and average fitness, the weight of each keyword is calculated according to the following formula: ; in, Indicates the weight of the keyword in this iteration, Indicates the preset minimum weight. Indicates the preset maximum weight value, Indicates the fitness of the keyword in this iteration, represents the maximum fitness, represents the average fitness.

[0040] The above minimum weight and maximum weight can be preset as needed, and the specific values ​​are not limited.

[0041] S210: Based on the weight of each keyword, an optimal algorithm is used to iteratively calculate the speed and position of the keyword to obtain the expected weight of each keyword.

[0042] In one implementation, the above step S210 may include: Use the optimal algorithm to calculate the individual optimal solution and group optimal solution of the keyword weight; Based on the individual optimal solution and the group optimal solution, the speed and position of the keyword are iteratively calculated according to the following formula. When the boundary constraint conditions are met or the number of iterations is met, the expected weights of each keyword are obtained: ; ; in, Indicates the speed at which keywords are updated after this iteration. Indicates the updated position of the keyword after this iteration. represents the position in this iteration, represents the speed in this iteration, Indicates the weight of the keyword in this iteration, is the individual learning factor, is the group learning factor, and is a random number between 0 and 1, represents the individual optimal solution of the keyword weight in this iteration, Indicates the group optimal solution for the weights of keywords in this iteration.

[0043] The above individual optimal solution and group optimal solution are calculated using the above fitness calculation formula, which will not be repeated here. The individual learning factor and group learning factor can be pre-set as needed, and the specific values ​​are not limited.

[0044] In an embodiment of the present invention, the above-mentioned boundary constraint condition refers to whether the current keyword being calculated has reached the end of the note data. For example, if the last keyword meets the boundary constraint condition, that is, it has reached the end of the note data, the iterative calculation can be terminated and the expected weights of each keyword can be output.

[0045] In addition, the above iterative calculation process may be repeated multiple times, so as to obtain more accurate and expected weights of each keyword.

[0046] S212: Preprocess the note data according to the weight of the keywords.

[0047] In the embodiment of the present invention, the above preprocessing includes but is not limited to at least one of the following operations: data cleaning, deduplication, word segmentation, labeling, screening, etc. These operations can convert the original data into a form suitable for model training, thereby improving the accuracy and reliability of the model.

[0048] The purpose of data cleaning is to remove noise and irrelevant information in the data to ensure the quality and accuracy of the data. Specific operations may include: checking the consistency of data, processing missing values, outliers, and duplicate values, etc. For example, for text data, stop words, punctuation marks, or special characters may be removed.

[0049] The purpose of deduplication is to remove duplicate records in the data to ensure that each data sample is unique. Word segmentation is the process of dividing continuous text into independent words or symbol sequences. For natural language processing tasks, word segmentation is a necessary preprocessing step. Word segmentation methods include rule-based word segmentation, statistical-based word segmentation, and deep learning word segmentation.

[0050] Among them, labeling is the process of assigning data to specific categories or labels. For classification tasks, labeling is to assign data to predefined categories manually or automatically. The labeled data can be used to train classifiers or for model evaluation. For regression tasks, labeling is usually to score or rate the data according to specific criteria. The labeling process needs to be designed and implemented according to the requirements of the specific task.

[0051] In one implementation, the above step S212 may include: Compare the keyword weight with the preset threshold; The note data is filtered, keywords corresponding to weights above the threshold are retained, and keywords corresponding to weights less than or equal to the threshold are discarded.

[0052] The above preset threshold can be set as needed, and the specific value is not limited.

[0053] This method of filtering note data by keyword weight can provide reliable data for model training without relying on large amounts of user input data, greatly improving the efficiency and accuracy of model training.

[0054] S214: Perform feature extraction on the preprocessed note data.

[0055] In the embodiment of the present invention, feature extraction is a process of extracting meaningful information or attributes from raw data. The extracted features may include at least one of the following: text features, semantic features, context features, etc.

[0056] Among them, text features refer to features extracted from text data, usually based on the bag-of-words model of text, TF-IDF (Term Frequency-Inverse Document Frequency) and other methods. These features can include word frequency, stem extraction, n-gram, etc. Through text features, text data can be converted into numerical vectors so that the model can understand and use them.

[0057] Semantic features refer to features extracted from text-based semantic information. These features are usually extracted using deep learning methods, such as Word2Vec, BERT (Bidirectional Encoder Representations from Transformers), etc. Through these methods, words or phrases can be represented as vectors to capture their semantic information, thereby improving the accuracy and generalization ability of the model.

[0058] Among them, context features refer to the extracted context information related to a specific text. These features can be representations of tags, entities, concepts, or other related information related to the text. Context features can help the model understand the contextual relationship and semantic meaning of the text, and improve the model's generation and understanding capabilities.

[0059] Through feature extraction, the input text can be converted into a vector representation so that the model can understand and use it. Feature extraction is an important step in machine learning and deep learning, and is crucial to improving the performance and effect of the model.

[0060] In addition, feature extraction usually also includes a conversion process, which refers to the process of converting raw data into a form suitable for model training, including but not limited to: data standardization, normalization, encoding and other operations. For example, for classification problems, the category label can be converted into a one-hot encoding form; for numerical data, standardization or normalization can be performed to ensure the scale consistency of the data.

[0061] S216: Using the result of feature extraction as input and the cloud notes as output, the cloud note generation model is trained.

[0062] In the embodiment of the present invention, a machine learning or deep learning model can be used as the initial cloud note generation model, for example, a recurrent neural network (RNN), a long short-term memory network (LSTM), a convolutional neural network (CNN), etc. Select a suitable model for training according to the specific task and data characteristics.

[0063] The results of the feature extraction can be input into a cloud note generation model, and the cloud notes can be output after being processed by the model. After the training is completed, the accuracy of the cloud notes generated by the model can be improved.

[0064] In the embodiment of the present invention, during or after the training process, the cloud note generation model can also be evaluated, and the evaluation can be measured by indicators such as accuracy, recall rate, and F1 value to understand the performance and effect of the cloud note generation model. The evaluation process can collect user feedback on the generated cloud notes, and adjust the feature extraction method, model structure or hyperparameters based on user feedback and generated content to improve the accuracy and diversity of the cloud notes generated by the model.

[0065] Accordingly, the cloud note generation model can be optimized and adjusted according to the evaluation results to improve and perfect the performance of the cloud note generation model.

[0066] In addition, during the training process, the training model can be trained to generate text summaries and summaries based on the cloud notes, and the trained cloud notes generation model can be used to summarize and summarize long articles or meeting minutes, etc., and automatically generate corresponding summaries or summaries, thereby enriching the model's functions. Among them, the process of training to generate text summaries and summaries also includes the step of feature extraction, which can specifically include extracting semantic features of the text, such as using models such as Word2Vec or BERT to represent words or phrases as vectors. Alternatively, the contextual features of the text can be extracted to consider the contextual information of the text, thereby improving the accuracy of the training.

[0067] In the embodiment of the present invention, during or after the training process, user feedback on the generated summaries and summaries can be collected to evaluate the cloud note generation model to understand the performance and effect of the cloud note generation model. Accordingly, the feature extraction method, model structure or hyperparameters can be adjusted according to user feedback and generated content to improve the accuracy and diversity of the summaries and summaries generated by the model.

[0068] The above method provided by the embodiment of the present invention collects the user's note data, obtains the keywords in the note data, calculates the weights of the obtained keywords, preprocesses the note data according to the weights of the keywords, performs feature extraction on the preprocessed note data, and trains the cloud note generation model with the result of the feature extraction as input and the cloud notes as output. This preprocessing method can provide reliable data for model training without relying on a large amount of user input and data, and can improve the quality and accuracy of the cloud note generation model, enhance the learning and prediction capabilities of the cloud note generation model, and provide users with more reliable and more satisfactory cloud notes.

[0069] like Figure 3 FIG. 1 is a flow chart of feature extraction according to an embodiment of the present invention. Figure 3 , step S214 in the above method may specifically include the following steps: S302: Use a neural network to extract features from the preprocessed note data to obtain word vectors.

[0070] In one implementation, the above step S302 may include: Use the neural network to extract features from the preprocessed note data according to the following formula to obtain the word vector : ; ; ; in, Indicates The first word The output word vector of characters, Indicates The hidden state of the forward output of each word, Indicates -1 hidden state of the vocabulary forward output, Indicates The hidden state of the reverse output of each word, Indicates -1 hidden state of the vocabulary reverse output, , They represent the weight matrix, Indicates The first word The input word vector of characters.

[0071] S304: Calculate the attention weight of the word vector.

[0072] The attention weight may be calculated using a variety of algorithms, which are not specifically limited in the embodiments of the present invention.

[0073] S306: Normalize the attention weights.

[0074] In one implementation, the above step S306 may include: The attention weights are normalized according to the following formula: ; in, Indicates The first word The attention weight of each character, is the normalized exponential function, is the total number of characters in the word vector, Indicates the first The attention weights of the characters.

[0075] After calculating the above normalized exponential function, the normalized attention weight can be obtained.

[0076] S308: Based on the word vector and the attention weight, a fusion vector is calculated and used as the input of the cloud note generation model.

[0077] In one implementation, the above step S308 may include: The fusion vector is calculated according to the following formula: ; Where D represents the fusion vector, is the total number of characters in the word vector, Indicates The first word The attention weight of characters (here it means the normalized attention weight), Indicates The first word The output word vector for each character.

[0078] After the above feature extraction process, the input text can be converted into a vector representation so that the cloud note generation model can understand and use it. Feature extraction is an important step in machine learning and deep learning, which can improve the performance and effect of the model.

[0079] The above is a training method for a cloud note generation model provided by an embodiment of the present invention. Based on the same idea, an embodiment of the present invention also provides a training device for a cloud note generation model. Figure 4 As shown, including: The collection module 401 is used to collect the user's note data and obtain keywords in the note data.

[0080] The calculation module 402 is used to calculate the weight of the acquired keyword.

[0081] The preprocessing module 403 is used to preprocess the note data according to the weight of the keyword.

[0082] The extraction module 404 is used to extract features from the preprocessed note data.

[0083] The training module 405 is used to train the cloud note generation model using the result of feature extraction as input and the cloud notes as output.

[0084] In one embodiment, the computing module may be used to: Determine the speed and position of acquired keywords; According to the similarity between keywords, calculate the fitness of each keyword; Calculate the weight of each keyword based on its fitness; Based on the weight of each keyword, an optimal algorithm is used to iteratively calculate the speed and position of the keyword to obtain the expected weight of each keyword.

[0085] In one implementation, the calculation module calculates the fitness of each keyword according to the similarity between the keywords, which may include: The fitness of each keyword is calculated according to the following formula: ; in, Indicates keywords The fitness of , t represents the number of iterations, represents the penalty function, represents the penalty factor, Indicates keywords The vocabulary, Indicates keywords The vocabulary, Indicates keywords The Words and keywords The The similarity of words, Indicates keywords The data length, Indicates keywords The data length, K represents the keyword The total number of words in .

[0086] In one implementation, the calculation module calculates the weight of each keyword based on the fitness of each keyword, which may include: Determine the maximum fitness among the fitness of each keyword, and calculate the average fitness according to the fitness of each keyword; Based on the maximum fitness and average fitness, the weight of each keyword is calculated according to the following formula: ; in, Indicates the weight of the keyword in this iteration, Indicates the preset minimum weight. Indicates the preset maximum weight value, Indicates the fitness of the keyword in this iteration, represents the maximum fitness, represents the average fitness.

[0087] In one implementation, the calculation module uses an optimal algorithm to iteratively calculate the speed and position of the keyword based on the weight of each keyword to obtain the expected weight of each keyword, which may include: Use the optimal algorithm to calculate the individual optimal solution and group optimal solution of the keyword weight; Based on the individual optimal solution and the group optimal solution, the speed and position of the keyword are iteratively calculated according to the following formula. When the boundary constraint conditions are met or the number of iterations is met, the expected weights of each keyword are obtained: ; ; in, Indicates the speed at which keywords are updated after this iteration. Indicates the updated position of the keyword after this iteration. represents the position in this iteration, represents the speed in this iteration, Indicates the weight of the keyword in this iteration, is the individual learning factor, is the group learning factor, and is a random number between 0 and 1, represents the individual optimal solution of the keyword weight in this iteration, Indicates the group optimal solution for the weights of keywords in this iteration.

[0088] In one embodiment, the extraction module can be used to: Use neural network to extract features from preprocessed note data to obtain word vectors; Calculate the attention weight of the word vector; Normalize the attention weights; Based on the word embedding and attention weight, the fusion vector is calculated and used as the input of the cloud note generation model.

[0089] In one implementation, the extraction module uses a neural network to extract features from the preprocessed note data to obtain a word vector, which may include: Use the neural network to extract features from the preprocessed note data according to the following formula to obtain the word vector : ; ; ; in, Indicates The first word The output word vector of characters, Indicates The hidden state of the forward output of each word, Indicates -1 hidden state of the vocabulary forward output, Indicates The hidden state of the reverse output of each word, Indicates -1 hidden state of the vocabulary reverse output, , They represent the weight matrix, Indicates The first word The input word vector of characters.

[0090] In one implementation, the extraction module normalizes the attention weights, which may include: The attention weights are normalized according to the following formula: ; in, Indicates The first word The attention weight of each character, is the normalized exponential function, is the total number of characters in the word vector, Indicates the first The attention weights of the characters.

[0091] In one implementation, the extraction module calculates a fusion vector based on the word vector and the attention weight, which may include: The fusion vector is calculated according to the following formula: ; Where D represents the fusion vector, is the total number of characters in the word vector, Indicates The first word The attention weight of each character, Indicates The first word The output word vector for each character.

[0092] In one embodiment, the preprocessing module can be used to: Compare the keyword weight with the preset threshold; The note data is filtered, keywords corresponding to weights above the threshold are retained, and keywords corresponding to weights less than or equal to the threshold are discarded.

[0093] In an embodiment of the present invention, the above-mentioned device can execute the method provided in any of the above-mentioned method embodiments. For detailed processes, please refer to the description in the method embodiments, which will not be repeated here.

[0094] The above-mentioned device provided by the embodiment of the present invention collects the user's note data, obtains the keywords in the note data, calculates the weights of the obtained keywords, pre-processes the note data according to the weights of the keywords, extracts features from the pre-processed note data, and trains the cloud note generation model with the result of the feature extraction as input and the cloud notes as output. This preprocessing method can provide reliable data for model training without relying on a large amount of user input and data, and can improve the quality and accuracy of the cloud note generation model, enhance the learning and prediction capabilities of the cloud note generation model, and provide users with more reliable and more satisfactory cloud notes.

[0095] Figure 5 The hardware structure diagram of an electronic device for implementing various embodiments of the present invention is shown in FIG. The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

[0096] Among them, the processor 510 is used to collect the user's note data, obtain keywords in the note data, calculate the weights of the obtained keywords, preprocess the note data according to the weights of the keywords, perform feature extraction on the preprocessed note data, and train the cloud note generation model with the result of feature extraction as input and cloud notes as output.

[0097] In addition, the processor 510 is also used to determine the speed and position of the acquired keywords; calculate the fitness of each keyword based on the similarity between the keywords; calculate the weight of each keyword based on the fitness of each keyword; based on the weight of each keyword, use the optimal algorithm to iteratively calculate the speed and position of the keyword to obtain the expected weight of each keyword.

[0098] In addition, the processor 510 is further configured to calculate the fitness of each keyword according to the following formula: ; in, Indicates keywords The fitness of , t represents the number of iterations, represents the penalty function, represents the penalty factor, Indicates keywords The vocabulary, Indicates keywords The vocabulary, Indicates keywords The Words and keywords The The similarity of words, Indicates keywords The data length, Indicates keywords The data length, K represents the keyword The total number of words in .

[0099] In addition, the processor 510 is further configured to determine the maximum fitness among the fitness of each keyword, and calculate the average fitness according to the fitness of each keyword; Based on the maximum fitness and the average fitness, the weight of each keyword is calculated according to the following formula: ; in, Indicates the weight of the keyword in this iteration, Indicates the preset minimum weight. Indicates the preset maximum weight value, Indicates the fitness of the keyword in this iteration, represents the maximum fitness, represents the average fitness.

[0100] In addition, the processor 510 is further configured to use an optimal algorithm to calculate an individual optimal solution and a group optimal solution of the keyword weights; based on the individual optimal solution and the group optimal solution, the speed and position of the keyword are iteratively calculated according to the following formula, and when the boundary constraint condition is satisfied or the number of iterations is satisfied, the weight of each keyword that meets the expectation is obtained: ; ; in, Indicates the speed at which keywords are updated after this iteration. Indicates the updated position of the keyword after this iteration. represents the position in this iteration, represents the speed in this iteration, Indicates the weight of the keyword in this iteration, is the individual learning factor, is the group learning factor, and is a random number between 0 and 1, represents the individual optimal solution of the keyword weight in this iteration, Indicates the group optimal solution for the weights of keywords in this iteration.

[0101] In addition, the processor 510 is also used to use a neural network to perform feature extraction on the preprocessed note data to obtain a word vector; calculate the attention weight of the word vector; normalize the attention weight; calculate a fusion vector based on the word vector and the attention weight, and use the fusion vector as the input of the cloud note generation model.

[0102] In addition, the processor 510 is also used to use a neural network to extract features from the preprocessed note data according to the following formula to obtain a word vector : ; ; ; in, Indicates The first word The output word vector of characters, Indicates The hidden state of the forward output of each word, Indicates -1 hidden state of the vocabulary forward output, Indicates The hidden state of the reverse output of each word, Indicates -1 hidden state of the vocabulary reverse output, , They represent the weight matrix, Indicates The first word The input word vector of characters.

[0103] In addition, the processor 510 is further configured to normalize the attention weight according to the following formula: ; in, Indicates The first word The attention weight of each character, is the normalized exponential function, is the total number of characters in the word vector, Indicates the first The attention weights of the characters.

[0104] In addition, the processor 510 is further configured to calculate the fusion vector according to the following formula: ; Where D represents the fusion vector, is the total number of characters in the word vector, Indicates The first word The attention weight of each character, Indicates The first word The output word vector for each character.

[0105] In addition, the processor 510 is also used to compare the weight of the keyword with a preset threshold; filter the note data, retain the keywords corresponding to the weight higher than the threshold, and discard the keywords corresponding to the weight less than or equal to the threshold.

[0106] An embodiment of the present invention provides an electronic device, which collects user note data, obtains keywords in the note data, calculates weights of the obtained keywords, preprocesses the note data according to the weights of the keywords, performs feature extraction on the preprocessed note data, and trains a cloud note generation model using the feature extraction results as input and cloud notes as output. This preprocessing method can provide reliable data for model training without relying on a large amount of user input and data, and can improve the quality and accuracy of the cloud note generation model, enhance the learning and prediction capabilities of the cloud note generation model, and provide users with more reliable and more satisfactory cloud notes.

[0107] It should be understood that in the embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 510 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 501 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 501 can also communicate with the network and other electronic devices through a wireless communication system.

[0108] The electronic device provides users with wireless broadband Internet access through the network module 502, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0109] The audio output unit 503 can convert the audio data received by the RF unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as sound. Moreover, the audio output unit 503 can also provide audio output related to a specific function performed by the electronic device 500 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, etc.

[0110] The input unit 504 is used to receive audio or video signals. The input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042. The graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 506. The image frame processed by the graphics processor 5041 can be stored in the memory 509 (or other storage medium) or sent via the radio frequency unit 501 or the network module 502. The microphone 5042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 501 in the case of a telephone call mode.

[0111] The electronic device 500 also includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 5061 and / or the backlight when the electronic device 500 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 505 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0112] The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0113] The user input unit 507 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch panel 5071). The touch panel 5071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 510, receives the command sent by the processor 510 and executes it. In addition, the touch panel 5071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 5071, the user input unit 507 may also include other input devices 5072. Specifically, other input devices 5072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.

[0114] Furthermore, the touch panel 5071 may be overlaid on the display panel 5061. When the touch panel 5071 detects a touch operation on or near it, it transmits the information to the processor 510 to determine the type of the touch event. Then, the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Figure 5 In the figure, the touch panel 5071 and the display panel 5061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.

[0115] The interface unit 508 is an interface for connecting an external device to the electronic device 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 500 or may be used to transmit data between the electronic device 500 and an external device.

[0116] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 509 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0117] The processor 510 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 509 and calling data stored in the memory 509, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.

[0118] The electronic device 500 may also include a power source 511 (such as a battery) for supplying power to various components. Preferably, the power source 511 may be logically connected to the processor 510 via a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

[0119] Preferably, an embodiment of the present invention further provides an electronic device, comprising a processor 510, a memory 509, and a computer program stored in the memory 509 and executable on the processor 510. When the computer program is executed by the processor 510, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0120] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0121] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated 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.

[0122] The above-mentioned computer-readable storage medium provided by the embodiment of the present invention collects user's note data, obtains keywords in the note data, calculates the weights of the obtained keywords, pre-processes the note data according to the weights of the keywords, performs feature extraction on the pre-processed note data, and trains the cloud note generation model with the result of feature extraction as input and cloud notes as output. This preprocessing method can provide reliable data for model training without relying on a large amount of user input and data, and can improve the quality and accuracy of the cloud note generation model, enhance the learning and prediction capabilities of the cloud note generation model, and provide users with more reliable and more satisfactory cloud notes.

[0123] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0127] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0128] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0129] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0130] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0131] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A training method for a cloud note generation model, characterized in that: The method comprises: Collecting user's note data and obtaining keywords in the note data; Calculate the weight of the acquired keywords; Preprocessing the note data according to the weight of the keyword; Perform feature extraction on the preprocessed note data; The cloud note generation model is trained with the result of feature extraction as input and cloud notes as output.

2. The method according to claim 1, characterized in that The weight of the keyword obtained by the calculation includes: Determine the speed and position of acquired keywords; According to the similarity between keywords, calculate the fitness of each keyword; Calculate the weight of each keyword based on its fitness; Based on the weight of each keyword, an optimal algorithm is used to iteratively calculate the speed and position of the keyword to obtain the expected weight of each keyword.

3. The method according to claim 2, characterized in that The step of calculating the fitness of each keyword according to the similarity between the keywords includes: The fitness of each keyword is calculated according to the following formula: ; in, Indicates keywords The fitness of , t represents the number of iterations, represents the penalty function, represents the penalty factor, Indicates keywords The vocabulary, Indicates keywords The vocabulary, Indicates keywords The Words and keywords The The similarity of words, Indicates keywords The data length, Indicates keywords The data length, K represents the keyword The total number of words in .

4. The method according to claim 2, characterized in that: The weight of each keyword is calculated based on the fitness of each keyword, including: Determine the maximum fitness among the fitness of each keyword, and calculate the average fitness according to the fitness of each keyword; Based on the maximum fitness and the average fitness, the weight of each keyword is calculated according to the following formula: ; in, Indicates the weight of the keyword in this iteration, Indicates the preset minimum weight. Indicates the preset maximum weight value, Indicates the fitness of the keyword in this iteration, represents the maximum fitness, represents the average fitness.

5. The method according to claim 2, characterized in that: Based on the weight of each keyword, the optimal algorithm is used to iteratively calculate the speed and position of the keyword to obtain the expected weight of each keyword, including: Use the optimal algorithm to calculate the individual optimal solution and group optimal solution of the keyword weight; Based on the individual optimal solution and the group optimal solution, the speed and position of the keyword are iteratively calculated according to the following formula. When the boundary constraint condition is met or the number of iterations is met, the expected weight of each keyword is obtained: ; ; in, Indicates the speed at which keywords are updated after this iteration. Indicates the updated position of the keyword after this iteration. represents the position in this iteration, represents the speed in this iteration, Indicates the weight of the keyword in this iteration, is the individual learning factor, is the group learning factor, and is a random number between 0 and 1, represents the individual optimal solution of the keyword weight in this iteration, Indicates the group optimal solution for the weights of keywords in this iteration.

6. The method according to claim 1, characterized in that The feature extraction of the preprocessed note data includes: Use neural network to extract features from preprocessed note data to obtain word vectors; Calculating the attention weight of the word vector; Normalizing the attention weights; Based on the word vector and the attention weight, a fusion vector is calculated, and the fusion vector is used as an input of the cloud note generation model.

7. The method according to claim 6, characterized in that The use of a neural network to extract features from the preprocessed note data to obtain a word vector includes: Use the neural network to extract features from the preprocessed note data according to the following formula to obtain the word vector : ; ; ; in, Indicates The first word The output word vector of characters, Indicates The hidden state of the forward output of each word, Indicates -1 hidden state of the vocabulary forward output, Indicates The hidden state of the reverse output of each word, Indicates -1 hidden state of the vocabulary reverse output, , They represent the weight matrix, Indicates The first word The input word vector of characters.

8. The method according to claim 6, characterized in that The normalizing the attention weights includes: The attention weight is normalized according to the following formula: ; in, Indicates The first word The attention weight of each character, is the normalized exponential function, is the total number of characters in the word vector, Represents the first The attention weights of the characters.

9. The method according to claim 6, characterized in that The step of calculating a fusion vector based on the word vector and the attention weight includes: The fusion vector is calculated according to the following formula: ; Where D represents the fusion vector, is the total number of characters in the word vector, Indicates The first word The attention weight of each character, Indicates The first word The output word vector for each character.

10. The method according to any one of claims 1 to 9, characterized in that Preprocessing the note data according to the weight of the keyword includes: Comparing the weight of the keyword with a preset threshold; The note data is screened, keywords corresponding to weights higher than the threshold are retained, and keywords corresponding to weights less than or equal to the threshold are discarded.