Data generation method and device, electronic equipment, storage medium and computer program product
By using the first preset model in the field of network security technology, the process of processing requirements data is used to describe multiple personality, and the problem of poor quality in data generation has been solved, and high -quality, diversity and high coverage data generation has been realized.
Patent Information
- Application Number
- CN202411894205.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the field of network security technology, due to poor understanding of business roles and insufficient knowledge of propt during data generation, the generated data is poor in diversity, insufficient deviation and poor quality.
By obtaining demand data, the first preset model combines multiple personality description of the personality description of the personnel based on universal personality characteristics to determine the processing requirements to determine the target data. This method is expanded by multiple content expansion to form a personality description with a high degree of richness and coverage, and then generates high -quality target data.
Improve the quality of generating data, provide higher diversity and coverage, and solve the problem of poor quality in data generation.
Smart Images

Figure CN119358680A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data generation method, device, electronic device, storage medium, and computer program product. Background Art
[0002] Data is one of the three key elements in the development of artificial intelligence (AI). As computing power continues to grow, the complexity of model parameters continues to increase, and model effectiveness continues to improve. The importance of data is becoming increasingly prominent. In the field of cybersecurity, large language models combined with prompt technology are often used to address cybersecurity issues. However, during the data generation process, due to factors such as a lack of understanding of business roles and insufficient knowledge of prompts, the generated data suffers from low diversity and bias, resulting in poor data quality. Summary of the Invention
[0003] The embodiments of the present application provide a data generation method, device, electronic device, storage medium, and computer program product that can improve the quality of generated data.
[0004] The technical solution of this application is achieved as follows: The present invention provides a data generation method, including: Obtain demand data; The demand data is processed using a first preset model in combination with a personality description to determine corresponding target data; wherein the personality description is determined based on general personality characteristic information.
[0005] In the above solution, the personality description is determined based on general personality trait information, including: Content expansion is performed on each of the general personality characteristic information to determine the personality description.
[0006] In the above solution, the content expansion for each of the general personality characteristic information to determine the personality description includes: Performing multiple content expansions on each of the general personalities until a predetermined condition is met, and stopping to determine a plurality of personality descriptions belonging to a predetermined technical field; The step of processing the demand data using the first preset model in combination with the personality description to determine the corresponding target data includes: The demand data is processed using a first preset model in combination with a plurality of personality descriptions to determine corresponding target data.
[0007] In the above solution, the predetermined condition includes: expanding twice; performing multiple content expansions on each of the general personality characteristic information until the predetermined condition is met, and determining multiple personality descriptions belonging to a predetermined technical field, including: Performing a first expansion on each piece of the general personality characteristic information to determine an intermediate description belonging to the predetermined technical field; A second expansion is performed on each of the intermediate descriptions to determine a plurality of personality descriptions belonging to the predetermined technical field; wherein the level of detail in the personality description is greater than the level of detail in the corresponding intermediate description.
[0008] In the above solution, the first expansion of each piece of general personality characteristic information to determine an intermediate description belonging to the predetermined technical field includes: Using the second preset model in combination with the first indication information, each of the general personality characteristic information is expanded for the first time to determine each of the intermediate descriptions belonging to the predetermined technical field; wherein the first indication information represents the capability requirements of the first expansion.
[0009] In the above solution, the second expansion is performed on each intermediate description to determine a plurality of personality descriptions belonging to the predetermined technical field, including: Using a second preset model in combination with second indication information, each of the intermediate descriptions is expanded a second time to determine a plurality of personality descriptions belonging to the predetermined technical field; The capability requirements described in the second indication information are greater than those described in the first indication information.
[0010] The present application also provides a data generation device, including: A data acquisition unit, used to acquire required data; A data processing unit is used to process the demand data using a first preset model in combination with a personality description to determine corresponding target data; wherein the personality description is determined based on general personality characteristic information.
[0011] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the steps in the above method when executing the computer program.
[0012] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are implemented.
[0013] A computer program product is also provided in an embodiment of the present application, including a computer program, which implements the steps in the above method when executed by a processor.
[0014] In an embodiment of the present application, demand data is obtained; the demand data is processed using a first preset model in combination with a personality description to determine corresponding target data; wherein the personality description is determined based on general personality trait information. Because the personality description is determined based on general personality trait information, the personality description has high richness and coverage. Consequently, the target data determined by processing the high richness and coverage personality description also has high richness and coverage, thereby providing high-quality target data. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 An optional process diagram of the data generation method provided in the embodiment of the present application Figure 1 ; Figure 2 An optional process diagram of the data generation method provided in the embodiment of the present application Figure 2 ; Figure 3 An optional process diagram of the data generation method provided in the embodiment of the present application Figure 3 ; Figure 4 An optional process diagram of the data generation method provided in the embodiment of the present application Figure 4 ; Figure 5 An optional effect diagram of the data generation method provided in the embodiment of the present application Figure 1 ; Figure 6 An optional process diagram of the data generation method provided in the embodiment of the present application Figure 5 ; Figure 7 An optional effect diagram of the data generation method provided in the embodiment of the present application Figure 2 ; Figure 8 An optional effect diagram of the data generation method provided in the embodiment of the present application Figure 3 ; Figure 9 A schematic diagram of the structure of a data generation device provided in an embodiment of the present application; Figure 10 A schematic diagram of a hardware entity of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions of this application are further elaborated in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0017] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0018] If similar descriptions of "first / second" appear in the application documents, the following explanation is added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0020] Data is one of the three key elements in the development of artificial intelligence technology. As computing power continues to grow, the complexity of model parameters continues to increase, and model effectiveness becomes increasingly effective. The importance of data is becoming increasingly prominent. Intelligent data generation technology has become a research focus in the era of deep learning. Currently, there are three approaches to intelligent data generation technology: The first data generation approach proposes a method called "Attribute Alignment" to control text generation to adapt to target attributes, such as sentiment polarity or specific topics, without changing the parameters of the pre-trained language model. This approach introduces a framework called CGA (Control, Generate, Augment), a scalable framework for multi-attribute text generation. CGA combines adversarial learning, context-aware loss, and a recurrent vocabulary loss strategy to control multiple semantic and syntactic attributes of generated natural English sentences.
[0021] The second scheme proposes a new method called Generation of RealisticTabular data (GReaT), which uses a large model to generate synthetic samples with the characteristics of the original data. The main contributions of GReaT include: 1. A new paradigm is proposed to use large models for modeling and generating real heterogeneous tabular data, connecting tabular and textual data modalities through a text encoding scheme. 2. It supports arbitrary conditioning. When trained on text encodings with random feature sequences, the model inherits the arbitrary conditioning capability of the Large Language Model (LLM), and can model the data distribution of any given feature subset and sample the remaining features. 3. Extensive experimental results are provided, showing that GReaT achieves state-of-the-art generation performance on various datasets. 4. An easy-to-use Python implementation is provided, which can generate data in just three lines of code.
[0022] The third solution proposes a method called Datasets from Instructions (DINO), which uses a large model to create text pairs by providing natural language instructions to provide high-quality sentence embeddings for small models. The DINO method is implemented through the following steps: 1. Use a pre-trained language model to generate text pairs with semantic similarity labels. 2. Use a self-debiasing algorithm to ensure that the generated text pairs not only conform to the given similarity labels but also do not conform to other labels to reduce noise. 3. Use the generated dataset to train a smaller model to improve its performance on multiple semantic text similarity datasets. In addition, the third solution also explores the importance of the self-debiasing algorithm in improving the quality of generated data and conducts a small-scale manual evaluation to evaluate the quality of the generated dataset.
[0023] However, the aforementioned solutions focus more on general data generation and do not provide specific methodologies for data generation in the cybersecurity field. Because data generation solutions in the cybersecurity field require the integration of intelligent data generation technologies and security knowledge graphs, related intelligent data generation technologies in the cybersecurity field are often single-stage solutions. In this field, large language models combined with prompt technology are often used to solve cybersecurity-related issues. However, during the data generation process, due to a lack of understanding of business roles, insufficient prompt knowledge, and poor quality, the generated data lacks diversity and bias, resulting in poor data quality.
[0024] In order to solve the above technical problems, the present application embodiment provides a data generation method, see Figure 1, which is an optional process diagram of the data generation method provided in the embodiment of the present application Figure 1 , will combine Figure 1 The steps shown are explained: S101. Obtain demand data.
[0025] In the embodiment of the present application, the data generating device can obtain the user's demand data on the predetermined technical field through the human-computer interaction device.
[0026] The data generating device may be a server, cloud server, terminal, or mobile terminal with corresponding data processing capabilities. The demand data may be a technical problem that the user is facing in a predetermined technical field. The predetermined technical field may include: network security technology. In other embodiments, the predetermined technical field may also be other technical fields.
[0027] For example, the demand data may include a technical question input by a user through a human-computer interaction device: "Hi, when I was buying football tickets online, I found that I might have encountered a phishing website scam. Can you help me check it out?"
[0028] S102: Process the demand data using a first preset model in combination with a personality description to determine corresponding target data; wherein the personality description is determined based on general personality characteristic information.
[0029] In an embodiment of the present application, after obtaining the demand data, the data generation device inputs the demand data into a first preset model. The various network layers of the first preset model process the demand data in combination with the personality description and the prompt engineering method reference, and output corresponding target data for the demand data. The personality description is determined by expanding the content of a predetermined technical field based on the corresponding general personality characteristic information. Each content expansion is based on the information after the previous expansion.
[0030] The first preset model is used for language in a predetermined technical field. This first preset model can be a domain-wide language model for solving cybersecurity-related issues (including but not limited to detection, analysis, and resolution). Exemplarily, the first preset model can include an LLM model. General personality trait information can include textual descriptions of technical issues, technical details, and technical solutions for various personality types in different technical fields. The general personality trait information can include information corresponding to different personality traits, such as openness, conscientiousness, extroversion, agreeableness, and neuroticism.
[0031] In this embodiment of the present application, before processing the required data, the data generation device may predetermine multiple personality descriptions. The data generation device may obtain multiple pieces of general personality feature information from different fields, and perform multiple content expansions on the multiple pieces of general personality feature information to determine multiple personality descriptions in a predetermined technical field (e.g., the field of network security technology).
[0032] In an embodiment of the present application, after determining multiple personality profiles in the field of cybersecurity technology, the data generation device can generate analysis and judgment data for specific cybersecurity events based on these multiple personality profiles and combined with demand data for integration into downstream tasks (including but not limited to summarizing and providing services to users, model pre-training, model fine-tuning, etc.). After determining multiple personality profiles in the field of cybersecurity technology, the data generation device can also package these multiple personality profiles and the first preset model into a complete service (data generation device) for direct user access. The data generation device can also provide a corresponding platform to allow users to perform necessary editing and modifications to each of the above dimensions.
[0033] In this embodiment of the present application, the data generation device may process the demand data using a first preset model in combination with multiple personality profiles to determine corresponding target data. The target data is then displayed, and the user re-enters the next demand data based on the target data. The data generation device then again processes the next demand data using the first preset model in combination with the multiple personality profiles to obtain the next target data, until the target data generated by the data generation device meets the user's requirements.
[0034] Exemplarily, the process of the data generating device using the first preset model in combination with multiple personality descriptions to process the user's demand data multiple times may include the following: User input demand data 1: "Hi, when I was buying football tickets online, I found that I might have encountered a phishing scam. Can you help me check it out?"
[0035] The data generating device uses the first preset model and combines multiple personality descriptions to process the target data generated by the demand data 1: "Hello, it sounds like you have encountered a network security problem. First, please tell me if you have any request or response messages related to this website so that I can better help you analyze it."
[0036] User-entered demand data 2: "Yes, this is the request message: ***".
[0037] The data generating device uses the first preset model and combines multiple personality descriptions to process the target data generated for the demand data 2: "Okay, let's analyze this request and response message. First, the request message shown here is a malicious Hypertext Transfer Protocol (HTTP) message, and the attack type is Java code injection. Its purpose is vulnerability detection. Judging from the response content in the message, the attacker failed to successfully execute the malicious payload."
[0038] User input requirement data 3: "Can you tell me what the malicious payload in this message is?"
[0039] The data generating device uses the first preset model and combines multiple personality descriptions to process the target data generated for the requirement data 3: "Okay, the malicious payload in the message is: ***. This is a simple arithmetic expression, and its purpose is to detect whether the target server has a Java remote code execution vulnerability by executing this code."
[0040] User input requirement data 4: "What effect will this expression have?" The data generating device uses the first preset model and combines multiple personality descriptions to process the target data generated for the requirement data 4: "If there is a vulnerability in the server, the expression will be executed and the result will be returned in the response body. From the server's response, although the status code is 200, indicating that the request is successful, the response body is an Extensible Markup Language (XML) format content, in which the calculation result expected to be returned by the payload is not found, so it can be inferred that the attack was unsuccessful."
[0041] User input requirement data 5: "How can I prevent this attack?"
[0042] The data generating device uses the first preset model to collect multiple personality descriptions to generate target data for the required data 5: "For this type of attack, the following repair suggestions can be taken: 1. Ensure that the application runs with minimum permissions when executing. In this way, even if an injection attack occurs, the attacker can only obtain limited permissions. 2. When dynamically executing code, avoid directly using user input data. If dynamic code must be executed using user input data, ensure strict validation and filtering of the input."
[0043] In this embodiment of the present application, demand data is obtained; the demand data is processed using a first preset model in combination with a personality description to determine corresponding target data; wherein the personality description is determined based on general personality trait information. Because multiple personality descriptions have a personality description with high richness and coverage, the target data determined by processing the multiple personality descriptions with high richness and coverage also has high richness and coverage, thereby providing high-quality target data.
[0044] See also Figure 2 , which is an optional process diagram of the data generation method provided in the embodiment of the present application Figure 2 , Figure 1 Before S102, the following may also be included: S201, which will be described in conjunction with the steps shown: S201: Expand the content of each piece of general personality characteristic information to determine the personality description.
[0045] In this embodiment of the present application, the data generation device can leverage the summarization and logical reasoning capabilities of a large language model to expand the content of each acquired general personality trait information within a predetermined technical field, thereby determining the personality description within the predetermined technical field. For example, the general personality trait information can be expanded to include technical solutions, technical issues, or technical details within the predetermined technical field.
[0046] In the embodiment of the present application, the LLM model's ability to summarize and logically reason can be utilized to input each universal personality trait information into the LLM model, and the LLM model can be used to expand the content of the universal personality trait information in a predetermined technical field to determine the personality description.
[0047] In this embodiment of the present application, content expansion is performed on each piece of universal personality trait information to determine multiple personality profiles. Thus, since universal personality trait information contains a large amount of multi-dimensional personality information across various technical fields, after content expansion is performed on multiple universal personality trait information, personality profiles in predetermined technical fields can be significantly expanded, resulting in multiple personality profiles with both high richness and coverage. Furthermore, the target data determined by processing these multiple personality profiles with high richness and coverage also has high richness and coverage, thereby providing high-quality target data.
[0048] See also Figure 3 , which is an optional process diagram of the data generation method provided in the embodiment of the present application Figure 3 , Figure 2 S201 in the embodiment can also be implemented through S301, which will be described in conjunction with the steps shown: S301 , performing multiple content expansion on each piece of general personality characteristic information until a predetermined condition is met, and then stopping to determine a plurality of personality descriptions belonging to a predetermined technical field.
[0049] In an embodiment of the present application, the data generation device can obtain multiple universal personality feature information through open source data retrieval, mature data set crawling, or key-value partitioning and designation. The data format of the universal personality feature information is text format. The data generation device can use the summarization and logical reasoning capabilities of the large language model to perform multiple content expansions with fine-grained gradients for each of the universal personality feature information until a predetermined condition is met, and determine the multiple personality descriptions belonging to the predetermined technical field. Performing multiple content expansions with fine-grained gradients may include: performing content expansions of more detailed and more precise technical solutions, technical problems, or technical details on the universal personality feature information in the predetermined technical field.
[0050] The predetermined conditions include: reaching a predetermined number of expansions. The number of expansions can be two or three, and there is no specific limitation on the predetermined number in the embodiments of this application. The predetermined technical field includes: network security technology. Multiple content expansions with increasing fine-grained gradients refer to each expansion of content in a predetermined technical field having more constraints and more expanded content than the previous expansion of content in the predetermined technical field.
[0051] Fine-grainedness refers to the more detailed and precise division and description of objects, events, or concepts. In everyday language, we often use broad terms to describe things, but fine-grainedness requires detailed division. For example, when describing an animal, we should not only specify whether it is a cat, but also specify whether it is a lion, tiger, or cheetah. Fine-grainedness not only involves detailed division of objects, but also emphasizes precise descriptions of objects, including detailed information about their characteristics, attributes, and behaviors. The concept of fine-grainedness is widely used in various fields. In image recognition, fine-grained recognition requires computers to be able to discern subtle differences between different types of objects. In text analysis, fine-grained sentiment analysis can identify specific sentiments and emotional expressions in text. In event analysis, fine-grained event extraction can extract detailed information and structure from events. In short, fine-grainedness is a descriptive approach that pursues detailed and precise descriptions, which can help us gain a deeper understanding and knowledge of things. By dividing things in detail and describing them precisely, we can more accurately grasp the essence and characteristics of things.
[0052] Correspondingly, the using the first preset model in combination with the personality description to process the demand data and determine the corresponding target data includes: using the first preset model in combination with multiple personality descriptions to process the demand data and determine the corresponding target data.
[0053] In the embodiments of the present application, a data generation device collects a large amount of general personality trait information for subsequent generation of multiple personality profiles in predetermined technical fields. The following uses cybersecurity as an example for illustration, but this is of course not limited to the cybersecurity field and can also be applied to other technical fields or usage scenarios. Example: Leveraging the summarization and logical reasoning capabilities of a large language model, this is achieved in two steps. First, using prompt engineering, a large amount of general personality trait information is expanded into an intermediate profile of a "novice cybersecurity engineer." Next, the intermediate profile of "novice cybersecurity engineer" is expanded into a personality profile of a "senior cybersecurity engineer." The data generation device aims to significantly expand the dimension of "cybersecurity expert personality profile" to generate massive amounts of low-cost, high-quality cybersecurity analysis and judgment data in the single-stage question-and-answer field. This, combined with data expansion in other dimensions such as different cybersecurity events, creates a "multiplier effect," addressing the issues of insufficient data richness and coverage faced in manual data generation and helping users efficiently generate data in their target fields.
[0054] In this embodiment, multiple content expansions are performed for each piece of generic personality trait information until a predetermined condition is met, thereby determining multiple personality profiles belonging to a predetermined technical field. This process of forming multiple personality profiles through multiple content expansions reduces the amount of inference computation required for each expansion. This eliminates the problem of illogical personality profiles generated when directly converting generic personality trait information into a personality profile such as "Senior Network Security Engineer" due to the insufficient inference capabilities of existing large language models. The solution in this embodiment can rapidly generate a large number of logically consistent and rich personality profiles.
[0055] See also Figure 4 , which is an optional process diagram of the data generation method provided in the embodiment of the present application Figure 4 , Figure 3 S301 in the embodiment can also be implemented through S401 to S402, which will be described in conjunction with the steps shown: S401: Perform a first expansion on each piece of general personality characteristic information to determine an intermediate description belonging to the predetermined technical field.
[0056] In an embodiment of the present application, the data generation device can use the summarization and logical reasoning capabilities of the large language model to perform a first fine-grained first expansion for each general personality trait information. During the expansion process, the personality description content of each general personality trait information is expanded within a predetermined technical field, and then each intermediate description belonging to the predetermined technical field is determined.
[0057] In an embodiment of the present application, the data generation device can use each network layer in the LLM model to perform a first fine-grained first content expansion for each universal personality feature information. During the expansion process, the personality description content of each universal personality feature information is expanded within a predetermined technical field, and then each intermediate description belonging to the predetermined technical field is determined.
[0058] S402: Perform a second expansion on each intermediate description to determine a plurality of personality descriptions belonging to the predetermined technical field.
[0059] In an embodiment of the present application, the data generation device can use the summarization and logical reasoning capabilities of the large language model to perform a second expansion of the second fine-grained level for each common personality characteristic information. During the expansion process, the personality description content of each intermediate description is expanded within a predetermined technical field, and then each personality description belonging to the predetermined technical field is determined.
[0060] The second granularity is finer than the first granularity, meaning the second expansion of the intermediate description is more detailed and precise than the first expansion of the general personality trait information. The level of detail in the personality description is greater than the level of detail in the corresponding intermediate description. This level of detail can include more detailed descriptions of predetermined technical areas and more in-depth and precise business content.
[0061] In the embodiment of the present application, the data generation device can use the above-mentioned high-quality vertical field (network security technology field) multiple personality descriptions to perform downstream target data generation tasks, thereby providing services to users. The above-mentioned multiple personality descriptions can be combined with the downstream data generation tasks (demand data) through the promptEngineering method to generate massive high-quality target data in a single stage. Figure 5 The user can fill in the demand data in {} corresponding to the demand data, fill in the message targeted by the demand data in {} corresponding to the malicious message, and fill in the response message generated by the user terminal to the malicious message in {} corresponding to the response message. The data generation device can use the first preset model combined with the prompt Engineering method reference of multiple personality descriptions to output the corresponding target data based on the content in the above {}.
[0062] In this embodiment of the present application, a first expansion is performed on each piece of generic personality trait information to determine an intermediate description belonging to the predetermined technical field. A second expansion is then performed on each intermediate description to determine multiple personality descriptions belonging to the predetermined technical field. This process of generating multiple personality descriptions through two expansions reduces the amount of inference computation required for each expansion, thereby eliminating the problem of illogical personality descriptions generated when directly converting generic personality trait information into personality descriptions due to the insufficient inference capabilities of existing large language models. The solution in this embodiment of the present application can rapidly generate a large number of logical and rich personality descriptions.
[0063] See also Figure 6 , which is an optional process diagram of the data generation method provided in the embodiment of the present application Figure 5 , Figure 4 S401 to S402 can also be implemented through S501 to S502, which will be described in conjunction with the steps shown: S501: Utilize the second preset model in combination with the first indication information to perform a first expansion on each of the general personality characteristic information to determine each of the intermediate descriptions belonging to the predetermined technical field.
[0064] In this embodiment of the present application, the data generation device can utilize the summarization and logical reasoning capabilities of the second preset model to perform a first expansion of each piece of general personality trait information using the second preset model in combination with the first fine-grained first indication information. During the expansion process, the second preset model expands the personality description content of each piece of general personality trait information within a predetermined technical field based on the information content in the first indication information, thereby determining each intermediate description belonging to the predetermined technical field. The first indication information represents the capability requirements for the first expansion.
[0065] The first preset model is used for the language of the predetermined technical field, and the second preset model is used for the general language. The second preset model can also be an LLM model. The first indication information can be conditional constraint information during the first expansion.
[0066] For example, combined Figure 7 The second preset model can input each universal personality feature information into the {} corresponding to the character description, and the second preset model expands the content of the predetermined technical field for the universal personality feature information according to the first indication information therein to form a corresponding intermediate description.
[0067] Among them, combined Figure 7 , the first indication information may include: “1. Directly output the expanded character description.
[0068] 2. The problem description you output must be highly granular.
[0069] 2. Just describe the person and the cybersecurity issues they encounter.
[0070] 3. Each character only outputs one sentence to describe the character role. The first half of the sentence is the character type, and the second half is the character description.
[0071] 4. The network security issues encountered by each character should start from the character's description. You need to think divergently and generate a variety of network security issues encountered by the characters, and not be limited to data leakage.
[0072] 5. You only need to output a character" S502: Utilize the second preset model in combination with the second indication information to perform a second expansion on each of the intermediate descriptions to determine a plurality of personality descriptions belonging to the predetermined technical field.
[0073] In an embodiment of the present application, the data generation device can make use of the summarization and logical reasoning capabilities of the second preset model, and use the second preset model in combination with the second fine-grained second indication information to perform a second expansion on each intermediate description. During the expansion process, the second preset model expands the personality description content of each intermediate description within the predetermined technical field in accordance with the information content in the second indication information, and then determines multiple personality descriptions belonging to the predetermined technical field.
[0074] The second instruction information may be conditional constraint information for the second expansion. The second instruction information may contain more conditional constraints than the first instruction information; the second instruction information may describe more capability requirements than the first instruction information. The second instruction information may describe more capability requirements than the first instruction information, including more conditional constraints in the second instruction information, such as thinking ability, computational ability, spatial imagination, reasoning and argumentation ability, data processing ability, and application awareness, for a predetermined technical field.
[0075] For example, combined Figure 8 The second preset model can input each intermediate description into the {} corresponding to the intermediate description of the second indication information, and the second preset model expands the content of the predetermined technical field for the intermediate description according to the second indication information to form a corresponding personality description.
[0076] Among them, combined Figure 8 , the second indication information may include: “1. You only need to output one expert character.
[0077] 2. This person must be an expert in the field of network security, have a deep understanding of network security, and even be able to accurately locate key issues in the message.
[0078] 3. You need to output an expert persona that is highly relevant to the personality description of the character {}, who is good at combining the problems faced by this character in the field of cybersecurity.
[0079] 4. Be careful not to add the character description {} to your output.
[0080] 5. Describe the character in just one sentence. The first half of the sentence is the character type, and the second half is the character description.
[0081] 6. Reference format: {Confirm color type}, {Confirm color description}. You need to replace the content in the curly braces with the corresponding role and description. Other content is not required.
[0082] 7. Don’t use the serial number at the front.
[0083] 8. Don’t just repeat the examples I gave, think outside the box.
[0084] 9. Your description of the character should be very specific and detailed.
[0085] 10. The types of experts should be diverse and balanced. Please think outside the box and don't limit yourself to security engineers, security analysts, or security consultants. In an embodiment of the present application, a second preset model is used in combination with the first indication information to perform a first expansion on each of the general personality trait information to determine each of the intermediate descriptions belonging to the predetermined technical field. A second preset model is used in combination with the second indication information to perform a second expansion on each of the intermediate descriptions to determine multiple personality descriptions belonging to the predetermined technical field. The information content of the second indication information is greater than that of the first indication information; the capability requirements described by the second indication information are greater than those described by the first indication information. In this way, the process of forming multiple personality descriptions through two expansions with increasing fine-grained gradients has a smaller amount of inference calculations during each expansion, thereby eliminating the problem of illogical personality descriptions generated when directly converting general personality trait information into personality descriptions due to insufficient reasoning capabilities of the existing large language model. The solution in the embodiment of the present application can quickly generate a large number of logical and rich personality descriptions.
[0086] See also Figure 9 , which is a structural diagram of the data generation device provided in an embodiment of the present application.
[0087] The embodiment of the present application further provides a data generating device 800 , comprising: a data acquiring unit 801 and a data processing unit 802 .
[0088] The data acquisition unit 801 is used to acquire demand data; The data processing unit 802 is configured to process the demand data using a first preset model in combination with a personality description to determine corresponding target data; wherein the personality description is determined based on general personality characteristic information.
[0089] In the embodiment of the present application, the data acquisition unit 801 in the data generation device 800 is used to expand the content of each of the general personality feature information to determine the personality description In this embodiment of the present application, data processing unit 802 in data generating device 800 is configured to perform multiple content expansions on each piece of general personality trait information until a predetermined condition is met, thereby determining multiple personality profiles belonging to a predetermined technical field. Data processing unit 802 in data generating device 800 is configured to process the required data using a first preset model in combination with the multiple personality profiles to determine corresponding target data.
[0090] In the embodiment of the present application, the predetermined condition includes: expanding twice; the data processing unit 802 in the data generating device 800 is used to perform a first expansion on each piece of the general personality characteristic information to determine an intermediate description belonging to the predetermined technical field; and perform a second expansion on each of the intermediate descriptions to determine multiple personality descriptions belonging to the predetermined technical field; wherein the level of detail in the personality description is greater than the level of detail in the corresponding intermediate description.
[0091] In an embodiment of the present application, the data processing unit 802 in the data generating device 800 is used to use the second preset model in combination with the first indication information to perform a first expansion on each of the general personality characteristic information to determine each of the intermediate descriptions belonging to the predetermined technical field; wherein the first indication information represents the capability requirements of the first expansion.
[0092] In an embodiment of the present application, the data processing unit 802 in the data generating device 800 is used to use a second preset model in combination with second indication information to perform a second expansion on each of the intermediate descriptions to determine multiple personality descriptions belonging to the predetermined technical field; wherein the capability requirements described in the second indication information are more than the capability requirements described in the first indication information.
[0093] It should be noted that in the embodiments of the present application, if the above-mentioned data generation method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a data generation device (which can be a personal computer, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0094] Correspondingly, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method on the data generating device side are implemented.
[0095] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0096] It should be noted that Figure 10 A hardware entity diagram of an electronic device provided in an embodiment of the present application, such as Figure 10 As shown, an embodiment of the present application provides an electronic device 900, including a memory 902 and a processor 901, wherein the memory 902 stores a computer program that can be run on the processor 901, and when the processor 901 executes the program, the steps in the above method are implemented, wherein; The processor 901 generally controls the overall operations of the electronic device 900 .
[0097] The memory 902 is configured to store instructions and applications executable by the processor 901, and can also cache data to be processed or processed by the processor 901 and various modules in the electronic device 900 (for example, image data, audio data, voice communication data and video communication data), which can be implemented by flash memory (FLASH) or random access memory (RAM).
[0098] Correspondingly, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the processor 901 of the electronic device 900 to complete the steps in the method on the data generating device 800 side.
[0099] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0100] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0101] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0102] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0103] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0104] Those skilled in the art will understand that all or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.
[0105] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0106] The above is only an implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A data generation method, characterized in that: include: Obtain demand data; The demand data is processed using a first preset model in combination with a personality description to determine corresponding target data; wherein the personality description is determined based on general personality characteristic information.
2. The data generation method according to claim 1, characterized in that: The personality description is determined based on general personality trait information, including: The content of each of the general personality characteristic information is expanded to determine the personality description.
3. The data generation method according to claim 1 or 2, characterized in that: The step of expanding the content of each of the general personality characteristic information to determine the personality description includes: Expanding the content of each of the general personalities multiple times until a predetermined condition is reached, and then determining a plurality of personality descriptions belonging to a predetermined technical field; The step of processing the demand data by using the first preset model in combination with the personality description to determine the corresponding target data includes: The demand data is processed by using the first preset model in combination with the plurality of personality descriptions to determine corresponding target data.
4. The data generation method according to claim 3, characterized in that: The predetermined condition includes: expanding twice; performing multiple content expansions on each of the general personality characteristic information until the predetermined condition is reached and stopping, and determining multiple personality descriptions belonging to the predetermined technical field, including: Performing a first expansion on each of the general personality characteristic information to determine an intermediate description belonging to the predetermined technical field; A second expansion is performed on each of the intermediate descriptions to determine a plurality of personality descriptions belonging to the predetermined technical field; wherein the level of detail in the personality description is greater than the level of detail in the corresponding intermediate description.
5. The data generation method according to claim 4, characterized in that: The first expansion of each of the general personality characteristic information to determine an intermediate description belonging to the predetermined technical field includes: Using the second preset model in combination with the first indication information, each of the general personality characteristic information is expanded for the first time to determine each of the intermediate descriptions belonging to the predetermined technical field; wherein the first indication information represents the capability requirements of the first expansion.
6. The data generation method according to claim 4, characterized in that: The second expansion is performed on each of the intermediate descriptions to determine a plurality of personality descriptions belonging to the predetermined technical field, including: Using the second preset model in combination with the second indication information, each of the intermediate descriptions is expanded for a second time to determine a plurality of personality descriptions belonging to the predetermined technical field; The capability requirements described in the second indication information are more than those described in the first indication information.
7. A data generating device, characterized in that: include: A data acquisition unit, used for acquiring required data; A data processing unit is used to process the demand data using a first preset model in combination with a personality description to determine corresponding target data; wherein the personality description is determined based on general personality characteristic information.
8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps in the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that The computer program implements the steps of the method according to any one of claims 1 to 6 when executed by a processor.
Citation Information
Patent Citations
LLM-driven industrial network intrusion detection method and response system
CN118381627A
Method and system for constructing extensible and safe role prompt for role-based dialogue
CN118551771A