Denoising algorithm generation method and device based on large language model
Through a large language model, the initial denoising algorithm code of the social network is cross-operated and mutated, and the updated code population is generated, which solves the problem that traditional denoising algorithms cannot adaptively handle changes in social network structure and improves the accuracy of denoising processing.
Patent Information
- Application Number
- CN202510212090.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-07-04
AI Technical Summary
The existing traditional noise denoising algorithm cannot effectively and adaptively handle the noise caused by changes in social network structure, affecting the efficiency of content recommendation and information dissemination.
The large language model is used to perform cross-operation and mutation operations on multiple initial denoising algorithm codes of social networks, generate updated code populations, and perform network denoising processing through target denoising algorithm codes.
It improves the accuracy of social network denoising processing and solves the problem that traditional denoising algorithms cannot adaptively process the changed social network noise.
Smart Images

Figure CN120256744A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technologies, and particularly to a method and apparatus for generating a denoising algorithm based on a large language model. Background Art
[0002] In the current operation of Internet enterprise social platforms, content recommendation and user portrait construction rely on social networks. However, due to the limited accuracy of data collection and the limitations of social network reconstruction algorithms, social networks are often interfered by network noise. Specifically, network noise distorts the community structure characteristics of social networks, resulting in incorrect division of real communities or wrongly clustering unrelated users together. This not only affects the accuracy of content recommendation in social networks, but also reduces the efficiency of information dissemination, hinders the circulation of information among user groups, and further affects the effects of marketing activities and public opinion dissemination. Therefore, for social networks, effectively removing network noise is of crucial importance.
[0003] In the prior art, traditional denoising algorithms, such as network deconvolution techniques and network enhancement methods, are used to implement noise processing for social networks. Specifically, network deconvolution techniques eliminate network noise by suppressing indirect associations, while network enhancement methods clear network noise by means of strengthening local connections and the like.
[0004] However, using existing technologies, network deconvolution methods often overly weaken key connections across communities, while network enhancement methods may amplify false interactions within communities, which reduces the accuracy of denoising social networks. In addition, when the network structure of a social network changes due to a hot event, traditional denoising algorithms cannot adaptively perform effective noise processing on the changed social network. Summary of the Invention
[0005] Based on this, it is necessary to provide a method and apparatus for generating a denoising algorithm based on a large language model for the above technical problems.
[0006] In a first aspect, an embodiment of the present invention provides a method for generating a denoising algorithm based on a large language model, the method including:
[0007] Obtain an initial code population corresponding to the social network, where the initial code population includes a plurality of initial denoising algorithm codes corresponding to the social network;
[0008] When it is determined that the target denoising algorithm code of the social network does not exist in the plurality of initial denoising algorithm codes, use a large language model to perform crossover operations and mutation operations on the plurality of initial denoising algorithm codes to obtain an updated code population;
[0009] Update the initial code population according to the updated code population to obtain a target code population, where the target code population includes multiple denoising algorithm codes;
[0010] Determine the target denoising algorithm code corresponding to the social network among the multiple denoising algorithm codes.
[0011] In one embodiment, the obtaining the initial code population corresponding to the social network includes:
[0012] For the social network, determine the corpus for generating denoising algorithm codes corresponding to the network attributes;
[0013] Use the large language model to generate the initial code population corresponding to the social network according to the corpus for generating denoising algorithm codes.
[0014] In one embodiment, before determining that the target denoising algorithm code of the social network does not exist among the multiple initial denoising algorithm codes, it further includes:
[0015] Successively use the multiple initial denoising algorithm codes to perform denoising processing on the social network, and respectively obtain the first denoised social networks corresponding to the initial denoising algorithm codes;
[0016] According to a preset adaptive function, calculate the adaptive values of each of the first denoised social networks and a preset noise-free network;
[0017] According to the adaptive value and the preset adaptive value, determine whether the target denoising algorithm code of the social network exists among the multiple initial denoising algorithm codes.
[0018] In one embodiment, the using the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population includes:
[0019] Obtain a code generation corpus, where the code generation corpus is used for crossover operations and mutation operations;
[0020] Use the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes according to the code generation corpus to obtain an updated code population.
[0021] In one embodiment, the code generation corpus includes: a first code generation corpus corresponding to the crossover operation and a second code generation corpus corresponding to the mutation operation. The using the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes according to the code generation corpus to obtain an updated code population includes:
[0022] Using the large language model, generate a corpus according to the first code, and perform at least one crossover operation on multiple initial denoising algorithm codes to obtain an initial updated code population, where the initial updated code population includes multiple initial updated denoising algorithm codes, and the multiple initial updated denoising algorithm codes are composed of multiple initial denoising algorithm codes and at least one denoising algorithm code obtained by performing a crossover operation;
[0023] Using the large language model, generate a corpus according to the second code, and perform a mutation operation on multiple initial updated denoising algorithm codes to obtain an updated code population.
[0024] In one embodiment, the step of using the large language model to generate a corpus according to the first code and performing at least one crossover operation on multiple initial denoising algorithm codes to obtain an initial updated code population includes:
[0025] Randomly obtain a judgment probability value, where the judgment probability value is used to determine whether to perform a crossover operation;
[0026] When the judgment probability value is greater than a preset target value, use the large language model to generate a corpus according to the first code, perform a crossover operation on multiple initial denoising algorithm codes to obtain a denoising algorithm code after the crossover operation, and return to execute the step of randomly obtaining a judgment probability value until the judgment probability value is not greater than the preset target value, and end the crossover operation on multiple initial denoising algorithm codes;
[0027] According to at least one denoising algorithm code after the crossover operation and multiple initial denoising algorithm codes, obtain an initial updated code population.
[0028] In one embodiment, the step of using the large language model to generate a corpus according to the first code and performing a crossover operation on multiple initial denoising algorithm codes to obtain a denoising algorithm code after the crossover operation includes:
[0029] Randomly obtain two initial denoising algorithm codes from multiple initial denoising algorithm codes;
[0030] Generate a corpus according to the first code, and use the large language model to perform a crossover operation on the two initial denoising algorithm codes to obtain a denoising algorithm code after the crossover operation.
[0031] In one embodiment, the step of determining the target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes includes:
[0032] Successively use the multiple denoising algorithm codes to perform denoising processing on the social network to obtain a second denoised social network corresponding to each denoising algorithm code;
[0033] Calculate the adaptation values of each of the second denoised social networks and the preset noise-free network according to a preset adaptation function;
[0034] Determine the target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes according to the adaptation value and the preset adaptation value.
[0035] In one embodiment, the method further includes:
[0036] According to the adaptation value and the preset adaptation value, when it is determined that there is no target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes, and according to the preset number of iterations, when it is determined that the preset number of iterations has not been reached, return to execute using the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population until the target denoising algorithm code corresponding to the social network is determined among the multiple denoising algorithm codes.
[0037] In a second aspect, an embodiment of the present invention provides a denoising algorithm generation device based on a large language model, which is applied to a social network and includes:
[0038] An initial code population acquisition module, configured to acquire an initial code population corresponding to the social network, where the initial code population includes multiple initial denoising algorithm codes corresponding to the social network;
[0039] An updated code population acquisition module, configured to use the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population when it is determined that there is no target denoising algorithm code of the social network among the multiple initial denoising algorithm codes;
[0040] A target code population acquisition module, configured to update the initial code population according to the updated code population to obtain a target code population, where the target code population includes multiple denoising algorithm codes;
[0041] A target denoising algorithm code determination module, configured to determine the target denoising algorithm code corresponding to the social network among the multiple denoising algorithm codes.
[0042] The technical solution provided by the embodiment of the present invention has the following advantages compared with the prior art:
[0043] A method for generating a denoising algorithm based on a large language model provided by an embodiment of the present invention is applied to a social network. By obtaining a plurality of initial denoising algorithm codes corresponding to the social network, when it is determined that the target denoising algorithm code of the social network does not exist in the plurality of initial denoising algorithm codes, the large language model is used to perform crossover operations and mutation operations on the plurality of initial denoising algorithm codes to obtain an updated code population. According to the updated code population, the initial code population is updated. Further, the target denoising algorithm code corresponding to the social network is determined among the plurality of denoising algorithm codes, and the social network is subjected to network denoising processing through the target denoising algorithm code, which improves the accuracy of denoising processing of the social network. Moreover, the target denoising algorithm code is determined by performing crossover operations and mutation operations on the social network, thus solving the problem that traditional denoising algorithms cannot adaptively perform effective noise processing on the changed social network. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0046] Figure 1 It is a flowchart showing a method for generating a denoising algorithm based on a large language model provided by an embodiment of the present invention;
[0047] Figure 2 It is a structural diagram showing a device for generating a denoising algorithm based on a large language model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] In order to be able to more clearly understand the above objects, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, without conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.
[0049] Many specific details are set forth in the following description in order to fully understand the present invention, but the present invention can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present invention, rather than all the embodiments.
[0050] In the current operation of Internet enterprise social platforms, content recommendation and user profile construction rely on social networks. However, due to the limited accuracy of data collection and the limitations of social network reconstruction algorithms, social networks are often interfered by network noise. Specifically, network noise distorts the community structure characteristics of social networks, leading to incorrect division of real communities or wrongly clustering unrelated users together. This not only affects the accuracy of content recommendation in social networks, but also reduces the efficiency of information dissemination, hinders the circulation of information among user groups, and further affects the effectiveness of marketing activities and public opinion dissemination. Therefore, for social networks, effectively removing network noise is of crucial importance.
[0051] In the prior art, traditional denoising algorithms, such as network deconvolution techniques and network enhancement methods, are used to achieve noise processing of social networks. Specifically, network deconvolution techniques eliminate network noise by suppressing indirect associations, while network enhancement methods clear network noise by means such as strengthening local connections.
[0052] However, using existing technologies, network deconvolution methods often overly weaken the key connections across communities, while network enhancement methods may amplify the false interactions within communities, which reduces the accuracy of social network denoising. In addition, when the network structure of a social network changes due to a hot event, traditional denoising algorithms cannot adaptively perform effective noise processing on the changed social network.
[0053] Therefore, the present invention provides a method for generating a denoising algorithm based on a large language model, which is applied to a social network. By obtaining multiple initial denoising algorithm codes corresponding to the social network, when it is determined that the target denoising algorithm code of the social network does not exist in the multiple initial denoising algorithm codes, using the large language model, cross-operation and mutation operation are performed on the multiple initial denoising algorithm codes to obtain an updated code population. According to the updated code population, the initial code population is updated. Further, the target denoising algorithm code corresponding to the social network is determined among the multiple denoising algorithm codes, and the social network is subjected to network denoising processing through the target denoising algorithm code, which improves the accuracy of denoising processing of the social network, and the target denoising algorithm code is determined by performing cross-operation and mutation operation on the social network, thereby solving the problem that traditional denoising algorithms cannot adaptively perform effective noise processing on the changed social network.
[0054] In one embodiment, as Figure 1 shown, Figure 1 is a schematic flowchart of a method for generating a denoising algorithm based on a large language model provided by an embodiment of the present invention. The denoising algorithm generation based on the large language model is applied to a social network, and specifically includes the following steps:
[0055] S10: Obtain the initial code population corresponding to the social network.
[0056] Among them, the initial code population includes multiple initial denoising algorithm codes corresponding to the social network. The initial denoising algorithm code consists of a basic description of the denoising algorithm idea, the specific code of the denoising algorithm, and the performance metrics of the denoising algorithm. Exemplarily, for the initial denoising algorithm code 1, it includes: the basic description of the initial denoising algorithm idea "algorithm": "The algorithm iteratively applies a Gaussian filter to the noisy adjacency... of the network.", the specific code of the initial denoising algorithm "code": "import numpy as np... return denoised_adj", and the performance metrics of the initial denoising algorithm "objective": 0.04495. However, it is not limited to this. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0057] Specifically, for the social network, obtain the initial code population corresponding to the social network.
[0058] Optionally, based on the above embodiments, in some embodiments of the present invention, one implementation manner of S10 can be:
[0059] S101: For the social network, determine the corpus for generating the denoising algorithm code corresponding to the network attributes.
[0060] Among them, the network attributes refer to the current network structure of the social network, or the network type, etc. The corpus for generating the denoising algorithm code refers to words and sentences used to instruct the large language model to generate the initial code population corresponding to the social network. Exemplarily, the corpus for generating the denoising algorithm code can be "For a noisy adjacency matrix, develop a network noise denoising algorithm to significantly improve its performance in downstream tasks related to social networks." However, it is not limited to this. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0061] Specifically, for the social network, determine the network attributes corresponding to the social network, so as to obtain the corpus for generating the denoising algorithm code corresponding to the network attributes.
[0062] S101: Use the large language model to generate the initial code population corresponding to the social network according to the corpus for generating the denoising algorithm code.
[0063] Among them, the large language model refers to a deep learning model trained with a large amount of text data, enabling the model to generate natural language text or understand the meaning of language text. The large language model can provide in-depth knowledge and language production on various topics through training on a huge dataset. The core idea of the large language model is to learn the patterns and structures of natural language through large-scale unsupervised training, and to simulate the human language cognition and generation process to a certain extent.
[0064] Specifically, the denoising algorithm code generation corpus is input into the large language model, and the large language model is used to generate multiple initial denoising algorithm codes corresponding to the social network, so as to obtain an initial code population.
[0065] Exemplarily, the preset number of initial denoising algorithm codes included in the initial code population is set to 8. That is, the denoising algorithm code generation corpus "For an adjacency matrix containing noise, develop a network noise denoising algorithm to significantly improve its performance in downstream tasks related to social networks." is input into the large language model, and the large language model is used to generate 8 initial denoising algorithm codes corresponding to the social network. An initial code population is composed of the 8 initial denoising algorithm codes, but it is not limited to this. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0066] S11: When it is determined that there is no target denoising algorithm code for the social network among the multiple initial denoising algorithm codes, use the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population.
[0067] Among them, the target denoising algorithm code refers to that after using multiple initial denoising algorithm codes to perform network noise denoising processing on the social network, a denoised social network is obtained. By calculating the adaptive value between the denoised social network and the noise-free social network, when the adaptive value meets the conditions of the preset adaptive value, the current initial denoising algorithm code is determined as the target denoising algorithm code for the current social network.
[0068] The above-mentioned crossover operation refers to an operation performed on the specific codes included in the multiple initial denoising algorithm codes. By using the crossover operation, the specific codes with poor performance can learn from the specific codes with better performance. Exemplarily, for two initial denoising algorithm codes, during the execution of the crossover operation, the initial denoising algorithm code with poor performance, that is, the initial denoising algorithm code with insignificant effect in social network noise removal, will learn from the initial denoising algorithm code with better effect and make self-improvement. The above-mentioned mutation operation refers to mutating the specific codes, including local rewriting or introducing innovative mathematical concepts, so as to improve the accuracy of the denoising algorithm in dealing with social network noise.
[0069] Specifically, for multiple initial denoising algorithm codes, when it is determined that there is no target denoising algorithm code for the social network among the multiple initial denoising algorithm codes, the large language model is used to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population.
[0070] Optionally, based on the above embodiments, in some embodiments of the present invention, before executing S11, it further includes:
[0071] The social network is sequentially denoised using multiple initial denoising algorithm codes, and the first denoised social networks corresponding to the initial denoising algorithm codes are respectively obtained.
[0072] According to a preset adaptive function, the adaptive values of each first denoised social network and the preset noise-free network are calculated.
[0073] Among them, the preset adaptive function refers to a function set for obtaining the adaptive value between the first denoised social network after denoising processing and the preset noise-free network. This preset adaptive function can be, for example, a preset adaptive function for calculating the mean variance, a preset adaptive function for calculating the correlation degree, a preset adaptive function for calculating the accuracy, but is not limited thereto. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0074] According to the adaptive value and the preset adaptive value, it is determined whether there is a target denoising algorithm code for the social network among the multiple initial denoising algorithm codes.
[0075] Among them, the preset adaptive value is used to determine whether there is a target denoising algorithm code for the social network among the multiple initial denoising algorithm codes.
[0076] Specifically, for multiple initial denoising algorithm codes, the social network is sequentially denoised using each initial denoising algorithm code to obtain the first denoised social network corresponding to each initial denoising algorithm code. According to the preset adaptive function set in advance, the adaptive values of each first denoised social network and the preset noise-free network are calculated, and the adaptive value is compared with the preset adaptive value to determine whether there is a target denoising algorithm code for the social network among the multiple initial denoising algorithm codes.
[0077] It should be noted that for the comparison relationship between the preset adaptive value and the adaptive value, it can be determined according to the function expression meaning corresponding to the specific preset adaptive function.
[0078] Exemplarily, when the preset adaptive function is the preset adaptive function for calculating the average variance, calculate the adaptive average variance value of the first denoised social network and the preset noise-free network, compare the adaptive average variance value with the preset adaptive value, and when it is determined that the adaptive average variance value is less than the preset adaptive value, determine the initial denoising algorithm code corresponding to the current first denoised social network as the target denoising algorithm code of the social network. However, this is not limited to this. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0079] It should be noted that according to the adaptive value and the preset adaptive value, when it is determined that there are multiple initial target denoising algorithm codes among the multiple initial denoising algorithm codes, the initial target denoising algorithm code with the smallest adaptive value among the multiple initial target denoising algorithm codes is used as the final target denoising algorithm code.
[0080] S12: Update the initial code population according to the updated code population to obtain the target code population.
[0081] Among them, the target code population includes multiple denoising algorithm codes.
[0082] Optionally, on the basis of the above embodiments, in some embodiments of the present invention, one implementation manner of S12 is: successively perform network denoising processing on the social network through multiple denoising algorithm codes to obtain the corresponding denoised social networks respectively, calculate the adaptive values of each denoised social network and the preset noise-free network according to the preset adaptive function set in advance, compare the adaptive values with the preset adaptive value, determine the replaced initial denoising algorithm code among the multiple initial denoising algorithm codes, and then use the denoising algorithm code obtained through the crossover operation and the mutation operation to replace the replaced initial denoising algorithm code.
[0083] It should be noted that a preset number of denoising algorithm codes is set for the target code population, that is, the target code population includes the preset number of denoising algorithm codes, and this preset number is the same as the number of multiple initial denoising algorithm codes included in the initial code population. Exemplarily, continuing the above embodiments, this preset number can be 8, for example, but not limited to this. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0084] S13: Determine the target denoising algorithm code corresponding to the social network among the multiple denoising algorithm codes.
[0085] Specifically, after obtaining the multiple denoising algorithm codes, determine the target denoising algorithm code corresponding to the social network among the multiple denoising algorithm codes.
[0086] Optionally, on the basis of the above embodiments, in some embodiments of the present invention, one implementation manner of S13 can be:
[0087] S131: Denoise the social network successively using multiple denoising algorithm codes to obtain the second denoised social network corresponding to each denoising algorithm code.
[0088] S132: Calculate the adaptation values of each second denoised social network and the preset noise-free network according to the preset adaptation function.
[0089] S133: Determine the target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes according to the adaptation value and the preset adaptation value.
[0090] Specifically, for multiple denoising algorithm codes, denoise the social network successively using each denoising algorithm code to obtain the second denoised social network corresponding to each denoising algorithm code. Calculate the adaptation values of each second denoised social network and the preset noise-free network according to the preset adaptation function, compare the adaptation value with the preset adaptation value, and determine the target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes.
[0091] In this way, the denoising algorithm generation method based on the large language model provided in this embodiment is applied to the social network. By obtaining multiple initial denoising algorithm codes corresponding to the social network, when it is determined that the target denoising algorithm code of the social network does not exist among the multiple initial denoising algorithm codes, the large language model is used to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population. According to the updated code population, the initial code population is updated. Further, the target denoising algorithm code corresponding to the social network is determined among multiple denoising algorithm codes, and the social network is denoised through the target denoising algorithm code, which improves the accuracy of denoising the social network. Moreover, the target denoising algorithm code is determined by performing crossover operations and mutation operations on the social network, thus solving the problem that traditional denoising algorithms cannot adaptively perform effective noise processing on the changed social network.
[0092] Optionally, based on the above embodiment, in some embodiments of the present invention, one implementation manner of S11 may be:
[0093] S111: Obtain code generation corpus.
[0094] Among them, the code generation corpus is used for crossover operations and mutation operations. The code generation corpus includes: the first code generation corpus corresponding to the crossover operation and the second code generation corpus corresponding to the mutation operation.
[0095] Exemplarily, the first code generation corpus corresponding to the crossover operation can be, for example: "Generate a new denoising algorithm based on the functions of the specific codes of two denoising algorithms", or "Combine the specific codes of these two denoising algorithms to generate a new code segment", but not limited to this. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation. The second code generation corpus corresponding to the mutation operation can be, for example: "Make minor modifications to the specific code of the denoising algorithm to improve its performance", "Try to add a new denoising strategy to the specific code of the denoising algorithm". But not limited to this. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0096] S112: Use a large language model to generate a code corpus according to the code generation corpus, perform crossover operations and mutation operations on multiple initial denoising algorithm codes, and obtain an updated code population.
[0097] Specifically, for multiple initial denoising algorithm codes, obtain the code generation corpus for performing crossover operations and mutation operations, input the code generation corpus into the large language model, and use the large language model to perform crossover operations and mutation operations on multiple initial denoising algorithm codes to obtain an updated code population.
[0098] Optionally, on the basis of the above embodiments, in some embodiments of the present invention, one implementation manner of S112 can be:
[0099] S21: Use a large language model to perform at least one crossover operation on multiple initial denoising algorithm codes according to the first code generation corpus to obtain an initial updated code population.
[0100] Among them, the initial updated code population includes multiple initial updated denoising algorithm codes, and the multiple initial updated denoising algorithm codes are composed of multiple initial denoising algorithm codes and at least one denoising algorithm code obtained by performing crossover operations.
[0101] Specifically, for multiple initial denoising algorithm codes, obtain the first code generation corpus for performing crossover operations, input the first code generation corpus into the large language model, and use the large language model to perform at least one crossover operation on multiple initial denoising algorithm codes to obtain an initial updated code population.
[0102] Optionally, on the basis of the above embodiments, in some embodiments of the present invention, one implementation manner of S21 can be:
[0103] S211: Randomly obtain a judgment probability value.
[0104] Among them, the judgment probability value is used to determine whether to perform the crossover operation. This probability value can be, for example, 0.4, but is not limited thereto. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0105] S212: When the judgment probability value is greater than the preset target value, use the large language model to generate a corpus according to the first code, perform a crossover operation on multiple initial denoising algorithm codes, obtain a denoising algorithm code after the crossover operation, return to execute and randomly obtain the judgment probability value until the judgment probability value is not greater than the preset target value, and end the crossover operation on multiple initial denoising algorithm codes.
[0106] Among them, the preset target value is a value set to determine whether to continue the crossover operation on multiple initial denoising algorithm codes. This preset target value can be, for example, 0.5, but is not limited thereto. The present invention does not specifically limit it, and those skilled in the art can set it according to the actual situation.
[0107] Specifically, compare the randomly obtained judgment probability value with the preset target value set in advance. When it is determined that the probability value is greater than the preset target value, input the first code-generated corpus into the large language model, use the large language model to perform a crossover operation on multiple initial denoising algorithm codes, obtain a denoising algorithm code after the crossover operation, return to continue obtaining the judgment probability value. When the judgment probability value is still greater than the preset target value, input the first code-generated corpus into the large language model, use the large language model to perform a crossover operation on multiple initial denoising algorithm codes, obtain a denoising algorithm code after the crossover operation. On the contrary, when it is determined that the probability value is not greater than the preset target value, end the crossover operation on multiple initial denoising algorithm codes.
[0108] Optionally, on the basis of the above embodiments, in some embodiments of the present invention, one implementation manner of S212 can be:
[0109] S2121: Randomly obtain two initial denoising algorithm codes from multiple initial denoising algorithm codes.
[0110] S2122: According to the first code-generated corpus, use the large language model to perform a crossover operation on the two initial denoising algorithm codes, and obtain a denoising algorithm code after the crossover operation.
[0111] Specifically, for multiple initial denoising algorithm codes, randomly obtain two initial denoising algorithm codes from the multiple initial denoising algorithm codes, input the first code-generated corpus into the large language model, and use the large language model to perform a crossover operation on the two initial denoising algorithm codes to obtain a denoising algorithm code after the crossover operation.
[0112] Exemplarily, following the above embodiments, a probability value of 0.4 is randomly obtained. The probability value of 0.4 is compared with a preset target value of 0.5. When it is determined that the probability value of 0.4 is less than the preset target value of 0.5, the initial denoising algorithm code 1 and the initial denoising algorithm code 2 are randomly obtained from multiple initial denoising algorithm codes. The first code generation corpus is input into the large language model, and the large language model is used to perform a crossover operation on the initial denoising algorithm code 1 and the initial denoising algorithm code 2 to obtain a denoising algorithm code 1 after the crossover operation. Then, it returns to continue obtaining a probability value of 0.3. When it is determined that the probability value of 0.3 is less than the preset target value of 0.5, the initial denoising algorithm code 3 and the initial denoising algorithm code 4 are randomly obtained from multiple initial denoising algorithm codes. The first code generation corpus is input into the large language model, and the large language model is used to perform a crossover operation on the initial denoising algorithm code 3 and the initial denoising algorithm code 4 to obtain a denoising algorithm code 2 after the crossover operation. When it returns to randomly obtain a probability value of 0.6 and it is determined that the probability value of 0.6 is not less than the preset target value of 0.5, the crossover operation on multiple initial denoising algorithm codes is ended.
[0113] In this way, the denoising algorithm generation method based on the large language model provided by the present invention continuously uses the large language model to generate a corpus according to the first code, and performs a crossover operation on multiple initial denoising algorithm codes to obtain a denoising algorithm code after the crossover operation. By using the crossover operation in this way, the specific code corresponding to the initial denoising algorithm code with poor performance can draw on the specific code corresponding to the initial denoising algorithm code with better performance. Thereby, the accuracy of network noise denoising processing of the social network by the target denoising algorithm code is improved.
[0114] S213: Obtain an initial updated code population according to at least one denoising algorithm code after the crossover operation and multiple initial denoising algorithm codes.
[0115] Specifically, after obtaining at least one denoising algorithm code after the crossover operation, an initial updated code population is formed according to at least one denoising algorithm code after the crossover operation and multiple initial denoising algorithm codes.
[0116] S22: Use the large language model to generate a corpus according to the second code, and perform a mutation operation on multiple initial updated denoising algorithm codes to obtain an updated code population.
[0117] Specifically, for multiple initial denoising algorithm codes, the second code generation corpus for performing the mutation operation is obtained, the second code generation corpus is input into the large language model, and the large language model is used to perform a mutation operation on multiple initial denoising algorithm codes to obtain an updated code population.
[0118] Optionally, based on the above embodiments, in some embodiments of the present invention, according to the adaptive value and the preset adaptive value, when it is determined that there is no target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes, and according to the preset number of iterations, when it is determined that the preset number of iterations has not been reached, return to execute using the large language model to perform crossover operations and mutation operations on multiple initial denoising algorithm codes to obtain an updated code population until a target denoising algorithm code corresponding to the social network is determined among multiple denoising algorithm codes.
[0119] Among them, the preset number of iterations is used to determine the number of operations of using the large language model to perform crossover operations and mutation operations on multiple initial denoising algorithm codes.
[0120] Specifically, when it is determined that there is no target denoising algorithm code corresponding to the social network among the multiple denoising algorithm codes included in the updated code population, and according to the preset number of iterations, it is judged whether the preset number of iterations has been reached. If not, return to execute using the large language model to perform crossover operations and mutation operations on multiple initial denoising algorithm codes to obtain an updated code population until a target denoising algorithm code corresponding to the social network is determined among multiple denoising algorithm codes.
[0121] It should be understood that although Figure 1 the steps in the flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figure 1 at least a part of the steps in
[0122] In one embodiment, as Figure 2 shown, a denoising algorithm generation device based on a large language model is provided, which is applied to a social network and includes: an initial code population acquisition module 10, an updated code population acquisition module 11, a target code population acquisition module 12, and a target denoising algorithm code determination module 13.
[0123] Among them, the initial code population acquisition module 10 is used to acquire the initial code population corresponding to the social network, where the initial code population includes multiple initial denoising algorithm codes corresponding to the social network;
[0124] The updated code population acquisition module 11 is used to, when it is determined that the target denoising algorithm code of the social network does not exist in the multiple initial denoising algorithm codes, use a large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population;
[0125] The target code population acquisition module 12 is used to update the initial code population according to the updated code population to obtain a target code population, where the target code population includes multiple denoising algorithm codes;
[0126] The target denoising algorithm code determination module 13 is used to determine the target denoising algorithm code corresponding to the social network among the multiple denoising algorithm codes.
[0127] In the above embodiment, the initial code population acquisition module is used to obtain multiple initial denoising algorithm codes corresponding to the social network. When the updated code population acquisition module determines that the target denoising algorithm code of the social network does not exist in the multiple initial denoising algorithm codes, it uses a large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population. The target code population acquisition module updates the initial code population according to the updated code population to obtain a target code population including multiple denoising algorithm codes. The target denoising algorithm code module is used to determine the target denoising algorithm code corresponding to the social network among the multiple denoising algorithm codes. The network denoising process of the social network is performed by this target denoising algorithm code, which improves the accuracy of the denoising process of the social network, and the target denoising algorithm code is determined by performing crossover operations and mutation operations on the social network, thus solving the problem that traditional denoising algorithms cannot adaptively perform effective noise processing on the changed social network.
[0128] For the specific limitations of the denoising algorithm generation device based on the large language model, reference can be made to the limitations on the denoising algorithm generation method based on the large language model in the above text, which will not be elaborated here. Each module in the above server can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form so that the processor can call and execute the operations corresponding to the above modules.
[0129] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM), etc.
[0130] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0131] The above-described embodiments merely represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent should be subject to the appended claims.
Claims
1. A method for generating a denoising algorithm based on a large language model, characterized in that, Applied to a social network, including: Obtain an initial code population corresponding to the social network, where the initial code population includes multiple initial denoising algorithm codes corresponding to the social network; When it is determined that the target denoising algorithm code of the social network does not exist among the multiple initial denoising algorithm codes, use a large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population; Update the initial code population according to the updated code population to obtain a target code population, where the target code population includes multiple denoising algorithm codes; Determine the target denoising algorithm code corresponding to the social network among the multiple denoising algorithm codes.
2. The method according to claim 1, wherein The obtaining the initial code population corresponding to the social network includes: For the social network, determine a corpus for generating denoising algorithm codes corresponding to the network attributes; Use the large language model to generate the initial code population corresponding to the social network according to the corpus for generating denoising algorithm codes.
3. The method according to claim 1, characterized in that, Before the step of determining that the target denoising algorithm code of the social network does not exist among the multiple initial denoising algorithm codes, further includes: Successively use multiple initial denoising algorithm codes to perform denoising processing on the social network, and respectively obtain a first denoised social network corresponding to the initial denoising algorithm code; Calculate the adaptation values of each of the first denoised social networks and a preset noise-free network according to a preset adaptation function; Determine whether the target denoising algorithm code of the social network exists among the multiple initial denoising algorithm codes according to the adaptation value and a preset adaptation value.
4. The method according to claim 1, characterized in that The using the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes to obtain an updated code population includes: Obtain a code generation corpus, where the code generation corpus is used for crossover operations and mutation operations; Use the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes according to the code generation corpus to obtain an updated code population.
5. The method according to claim 4, wherein The code generation corpus includes: a first code generation corpus corresponding to the crossover operation and a second code generation corpus corresponding to the mutation operation. The using the large language model to perform crossover operations and mutation operations on the multiple initial denoising algorithm codes according to the code generation corpus to obtain an updated code population includes: Use the large language model to perform at least one crossover operation on the multiple initial denoising algorithm codes according to the first code generation corpus to obtain an initial updated code population, where the initial updated code population includes multiple initial updated denoising algorithm codes, and the multiple initial updated denoising algorithm codes are composed of multiple initial denoising algorithm codes and at least one denoising algorithm code obtained by the crossover operation; Use the large language model to perform mutation operations on the multiple initial updated denoising algorithm codes according to the second code generation corpus to obtain an updated code population.
6. The method according to claim 5, wherein The using the large language model to perform at least one crossover operation on the multiple initial denoising algorithm codes according to the first code generation corpus to obtain an initial updated code population includes: Randomly obtain a judgment probability value, where the judgment probability value is used to determine whether to perform a crossover operation; When the judgment probability value is greater than a preset target value, use the large language model to generate a corpus according to the first code, perform a crossover operation on multiple initial denoising algorithm codes, obtain a denoising algorithm code after the crossover operation, and return to execute randomly obtaining the judgment probability value until the judgment probability value is not greater than the preset target value, and end the crossover operation on multiple initial denoising algorithm codes; Obtain an initial updated code population according to at least one denoising algorithm code after the crossover operation and multiple initial denoising algorithm codes.
7. The method according to claim 6, characterized in that, The step of using the large language model to generate a corpus according to the first code and perform a crossover operation on multiple initial denoising algorithm codes to obtain a denoising algorithm code after the crossover operation includes: Randomly obtain two initial denoising algorithm codes from multiple initial denoising algorithm codes; Generate a corpus according to the first code, and use the large language model to perform a crossover operation on the two initial denoising algorithm codes to obtain a denoising algorithm code after the crossover operation.
8. The method according to claim 1, wherein The step of determining the target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes includes: Successively use the multiple denoising algorithm codes to perform denoising processing on the social network to obtain a second denoised social network corresponding to each denoising algorithm code; Calculate the adaptive value of each second denoised social network and a preset noise-free network according to a preset adaptive function; Determine the target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes according to the adaptive value and a preset adaptive value.
9. The method according to claim 8, wherein The method further includes: According to the adaptive value and a preset adaptive value, when it is determined that there is no target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes, and when it is determined that the preset iteration number has not been reached according to the preset iteration number, return to execute using the large language model to perform a crossover operation and a mutation operation on the multiple initial denoising algorithm codes to obtain an updated code population until the target denoising algorithm code corresponding to the social network is determined among multiple denoising algorithm codes.
10. A denoising algorithm generation device based on a large language model, characterized in that, Applied to a social network, it includes: An initial code population acquisition module, configured to acquire an initial code population corresponding to the social network, where the initial code population includes multiple initial denoising algorithm codes corresponding to the social network; An updated code population acquisition module, configured to use the large language model to perform a crossover operation and a mutation operation on the multiple initial denoising algorithm codes to obtain an updated code population when it is determined that there is no target denoising algorithm code of the social network among the multiple initial denoising algorithm codes; A target code population acquisition module, configured to update the initial code population according to the updated code population to obtain a target code population, where the target code population includes multiple denoising algorithm codes; A target denoising algorithm code determination module, configured to determine the target denoising algorithm code corresponding to the social network among multiple denoising algorithm codes.