Topic generation method and device, equipment, storage medium and chip
Through the automatic question setting model based on the question generation model based on the large language model, the problems of low efficiency and high cost of manual question setting in the existing technology are solved, the efficiency and safety of risk prevention and control training are improved, and the flexibility of assessment is enhanced.
Patent Information
- Application Number
- CN202411138899.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-01-07
AI Technical Summary
In the existing risk prevention and control training, manual question setting is large, low efficiency and high cost, and information management leads to poor flexibility in the system intranet.
A question generation model is used to train large language models based on fine-tuning data sets. By obtaining and structured risk pre-control items, a question content with a preset structured format is generated, and a robot process automation technology is used to automatically draw questions instead of manual draw questions. .
It improves the efficiency and safety of risk prevention and control training, reduces labor costs, and increases the flexibility and convenience of assessment.
Smart Images

Figure CN119273501A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a question generation method, device, equipment, storage medium and chip. Background Art
[0002] Risk pre-control tickets are usually a tool used by enterprises or organizations in risk management. It refers to a management method that identifies, evaluates, formulates countermeasures for possible risks in advance, and records them. Through risk pre-control tickets, enterprises or organizations can systematically manage potential risks and ensure that they can respond quickly and effectively when risks occur, thereby reducing losses caused by risks.
[0003] At present, the existing risk prevention training process is as follows: determine the work tasks; the team leader prepares risk prevention tickets based on the work tasks through the Enterprise Resource Planning (ERP) system; the work leader gets the risk prevention tickets and manually generates questions based on the risk prevention tickets; the work leader distributes the risk prevention tickets to the team members for study, and uses the corresponding questions for assessment after study. To ensure work safety, only those who pass the assessment can enter the workplace and start working. In the above process, the work leader needs to collect the prevention tickets and generate questions manually. Usually, the workload of manually generating questions is large, resulting in low work efficiency and high labor costs. Summary of the invention
[0004] In order to overcome the problems existing in the related technologies, the present disclosure provides a question generation method, device, equipment, storage medium and chip to solve the technical problems in the above-mentioned related technologies such as large workload, low work efficiency and high labor cost of manual question setting.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for generating a topic is provided, comprising: Acquiring topic prompt information, wherein the topic prompt information includes at least one pre-control item having a preset structured format; Calling a question generation model to generate a question for the question prompt information to obtain a generated question content; The question generation model is obtained by training and fine-tuning a large language model based on the acquired fine-tuning data set, and the fine-tuning data set includes at least one training prompt information and at least one training question content that appear in pairs; during the fine-tuning process, the basic model parameters of the large language model are kept unchanged, and the low-rank matrix Lora parameters of the large language model are fine-tuned, and the Lora parameters are the rank decomposition matrices corresponding to the attention layer and the feedforward network layer in the large language model.
[0006] In some embodiments, obtaining the topic prompt information includes: Acquire prompt information to be processed, where the prompt information to be processed includes at least one pre-control item; The prompt information to be processed is structured and merged to obtain the topic prompt information.
[0007] In some embodiments, the topic content is topic content having the preset structured format.
[0008] In some embodiments, the method further comprises: Acquire an initial data set, the initial data set comprising at least one pre-control ticket and at least one topic content appearing in pairs, each of the pre-control tickets comprising at least one pre-control item; Preprocessing the pre-controlled tickets and question contents in the initial data set to obtain the fine-tuning data set; The preprocessing includes structuring processing and / or merging processing.
[0009] In some embodiments, the method further comprises: Fine-tune the Lora parameters in the large language model based on the fine-tuning dataset to obtain fine-tuned Lora parameters; Based on the basic model parameters in the large language model and the fine-tuned Lora parameters, forward propagation fine-tuning is performed on the large language model to obtain the fine-tuned question generation model; The basic model parameters are model parameters in the large language model except the Lora parameters.
[0010] In some embodiments, the method further comprises: The pre-control ticket is obtained based on the Robotic Process Automation (RPA) technology, wherein the RPA technology supports manipulating the application to input at least one corresponding pre-control ticket in the user interface.
[0011] In some embodiments, the method further comprises: A test paper is generated based on the generated question content to obtain generated test paper content, wherein the test paper content includes the generated question content.
[0012] According to a second aspect of an embodiment of the present disclosure, there is provided a question generating device, comprising: An acquisition module is configured to acquire topic prompt information, wherein the topic prompt information includes at least one pre-controlled item having a preset structured format; A processing module is configured to call a topic generation model to generate topics for the topic prompt information to obtain generated topic content; The question generation model is obtained by training and fine-tuning a large language model based on the acquired fine-tuning data set, and the fine-tuning data set includes at least one training prompt information and at least one training question content that appear in pairs; during the fine-tuning process, the basic model parameters of the large language model are kept unchanged, and the low-rank matrix Lora parameters of the large language model are fine-tuned, and the Lora parameters are the rank decomposition matrices corresponding to the attention layer and the feedforward network layer in the large language model.
[0013] For the contents not introduced or described in the embodiments of the present disclosure, please refer to the relevant introduction in the aforementioned method embodiments, and the embodiments of the present disclosure are not limited thereto.
[0014] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the above-mentioned question generation method.
[0015] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the question generating method provided in the first aspect of the present disclosure are implemented.
[0016] According to a fifth aspect of an embodiment of the present disclosure, a chip is provided, comprising: a processor and an interface; the processor is used to read instructions to execute the steps of the above-mentioned question generation method.
[0017] The technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: the electronic device obtains question prompt information, the question prompt information includes at least one pre-control item with a preset structured format; the question generation model is called to generate questions for the question prompt information to obtain the generated question content; wherein the question generation model is obtained by training and fine-tuning the large language model based on the obtained fine-tuning data set, and the fine-tuning data set includes at least one training prompt information and at least one training question content that appear in pairs; during the fine-tuning process, the basic model parameters of the large language model are kept unchanged, and the low-rank matrix Lora parameters of the large language model are fine-tuned, and the Lora parameters are the rank decomposition matrices corresponding to the attention layer and the feedforward network layer in the large language model. In this way, the present disclosure can automatically generate questions based on the question generation model, replacing manual question generation, and can avoid technical problems such as large workload, low work efficiency and high labor cost caused by manual question generation. At the same time, it can also improve the safety of risk pre-control training and the efficiency of personnel assessment.
[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0020] Figure 1 It is a flowchart of a method for generating a topic according to an exemplary embodiment.
[0021] Figure 2 The present invention is a flowchart of obtaining question prompt information according to an exemplary embodiment.
[0022] Figure 3 The figure is a schematic diagram of a process of obtaining a fine-tuning data set according to an exemplary embodiment.
[0023] Figure 4 The figure is a flowchart of a model training fine-tuning process according to an exemplary embodiment.
[0024] Figure 5 The figure is a schematic diagram of the structure of a question generating device according to an exemplary embodiment.
[0025] Figure 6 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment.
[0026] Figure 7 The figure is a schematic diagram showing the structure of a chip according to an exemplary embodiment. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0028] It should be noted that all actions of acquiring signals, information or data in the present disclosure are performed with the authorization given by the owner of the corresponding device.
[0029] The risk prevention training process provided by the relevant technology has the following two problems: first, the workload of manual question setting is large, the work efficiency is low, and the labor cost is high. Second, because the information involved is all in the system intranet, personnel need to take the test on the computer in the computer room, which is less flexible.
[0030] To solve the above problems, the present disclosure provides a method, device, equipment, storage medium and chip for generating questions. Figure 1 FIG. 1 is a flow chart of a method for generating a topic according to an exemplary embodiment. Figure 1 The method shown can be applied to electronic devices, which may include but are not limited to smart phones, wearable devices (personal hubs), personal or mobile multimedia players, personal digital assistants, laptop computers, tablet computers, smart books, palmtop computers or other terminal devices with communication functions. Figure 1 The method shown may include the following implementation steps: S101. Acquire topic prompt information, where the topic prompt information includes at least one pre-control item in a preset structured format.
[0031] The above-mentioned topic prompt information in the present disclosure may include one or more pre-controlled items with a preset structured format, and the preset structured format is a format customized by the system according to actual needs, such as json format, etc.
[0032] The present disclosure does not limit the implementation method of obtaining the above-mentioned topic prompt information. For example, the present disclosure can obtain it from other devices (such as terminal devices or servers, etc.) through the network. Figure 2 FIG. 1 is a flow chart showing a method of obtaining topic prompt information according to an exemplary embodiment. Figure 2 The process shown may include the following implementation steps: S201: Obtain prompt information to be processed, where the prompt information to be processed includes at least one pre-control item.
[0033] In the present disclosure, the above-mentioned prompt information to be processed may refer to one or more pre-control items included in the pre-control ticket. Taking the above-mentioned pre-control ticket as a risk pre-control ticket as an example, it may include any one or more combinations of the following pre-control items: risk description, risk category, risk level, risk probability, risk impact, countermeasures, responsible person, monitoring and audit. Among them, the above-mentioned risk description refers to a detailed description of the possible risks. The above-mentioned risk category refers to the classification of risks into different categories according to the nature and source of risks, such as market risk, credit risk and operational risk. The above-mentioned risk level refers to the rating of risks according to the possibility and impact of risks. The above-mentioned risk probability refers to the assessment of the possibility of risk occurrence. The above-mentioned risk impact refers to the analysis of the possible impact after the risk occurs. The above-mentioned countermeasures refer to the formulation of corresponding preventive measures and response plans to reduce the possibility and impact of risks. The above-mentioned responsible person refers to the person in charge and executor of clear risk management. The above-mentioned monitoring and audit refers to the regular monitoring and audit of risk pre-control measures to ensure their effectiveness. Among them, the use of risk pre-control tickets can help enterprises or organizations establish a complete risk management system, improve the ability to identify and manage risks, and ensure the stability and security of business operations.
[0034] S202: Structuring and merging the prompt information to be processed to obtain the topic prompt information.
[0035] The present disclosure can pre-process each pre-control item in the above-mentioned pre-control ticket. The pre-processing can be the corresponding processing customized by the system according to actual needs. For example, it can include structured processing and merging processing according to preset rules, etc., so as to obtain the above-mentioned question prompt information.
[0036] For example, the present disclosure can perform structured processing on the pre-control items, for example, splitting the pre-control items into field items such as scenarios, sources of danger, possible harm, and pre-control measures according to keyword fields. Then, the structured pre-control items are merged into a prompt word prompt (string) for generating a question according to preset rules, and the above preset rules are merging rules customized by the system according to actual needs.
[0037] S102. Calling a question generation model to generate a question for the question prompt information to obtain a generated question content; wherein the question generation model is obtained by training and fine-tuning a large language model based on an acquired fine-tuning data set, and the fine-tuning data set includes at least one training prompt information and at least one training question content that appear in pairs; during the fine-tuning process, the basic model parameters of the large language model are kept unchanged, and the low-rank matrix Lora parameters of the large language model are fine-tuned, and the Lora parameters are the rank decomposition matrices corresponding to the attention layer and the feedforward network layer in the large language model.
[0038] The present disclosure can use a pre-trained question generation model to forward transmit the above question prompt information, so as to generate corresponding question content. Among them, the present disclosure does not limit the type corresponding to the above question content (also referred to as question type), for example, it can include but is not limited to single-choice questions, multiple-choice questions and true-or-false questions, etc. The above question content can also have a preset structured format like the above question prompt information, that is, the above question content can refer to the question content with the above preset structured format, such as a structured json format, etc.
[0039] The following describes relevant embodiments of model training. The model training can be applied to a training device, which may include but is not limited to, for example, an electronic device, a server, or other devices with model training capabilities. The following takes the application of model training to an electronic device as an example to illustrate the relevant content.
[0040] In one embodiment, the present disclosure can obtain a fine-tuning dataset, and the present disclosure does not limit the specific acquisition implementation method thereof. For example, see Figure 3FIG. 1 is a flow chart of obtaining a fine-tuning data set according to an exemplary embodiment. Figure 3 The process shown may include the following implementation steps: S301. Acquire an initial data set, wherein the initial data set includes at least one pre-control ticket and at least one topic content that appear in pairs, and each of the pre-control tickets includes at least one pre-control item.
[0041] The above-mentioned initial data set in the present disclosure is a sample data set used for subsequent model training, which may include at least one pre-control ticket and at least one question content that appear in pairs. The present disclosure does not limit the implementation method of obtaining the above-mentioned initial data set. For example, a large number of pre-control tickets and their corresponding artificially generated question contents can be collected manually. In order to ensure the effect of model question setting, the present disclosure uses artificial questions to fine-tune the large language model so that it performs better in vertical fields. Taking the pre-control ticket as an example, the relevant embodiments of the above-mentioned pre-control ticket acquisition are introduced below.
[0042] In an optional embodiment, the present disclosure can obtain the above-mentioned pre-control tickets based on Robotic Process Automation (RPA) technology. In a specific implementation, the RPA technology in the present disclosure supports manipulating an application to input one or more corresponding pre-control tickets in a user interface, thereby obtaining the above-mentioned pre-control tickets. Among them, the above-mentioned RPA technology is a technology that uses software robots (or robots) to simulate and integrate human interactions in digital systems to execute business processes. RPA can use a user interface to capture data and manipulate applications, which can interpret, trigger responses and interact with other systems to perform various repetitive tasks. By simulating human operations, pre-control tickets can be pulled from an enterprise resource planning system (Enterprise Resource Planning, ERP) and uploaded to a cloud server database for on-demand use by electronic devices.
[0043] In an optional embodiment, when there is an update to the database corresponding to the above-mentioned pre-control items, the present disclosure can send the updated pre-control ticket to the corresponding question generation service, and the service can structure and merge the pre-control items in the pre-control ticket to obtain corresponding question prompt information, and then input the question prompt information into the above-mentioned question generation model, thereby outputting the question content in json format, etc.
[0044] The ERP system is an integrated management software that helps enterprises integrate and manage key business activities, including procurement, project management, risk management and compliance, supply chain operations, inventory management, service management, financial management, human resource management, manufacturing operations management, supply chain management, customer relationship management, sales management and other processes. The ERP system enables enterprises to better plan and control resources, optimize business processes, improve efficiency, reduce costs, and increase customer satisfaction by providing a unified database and user interface. The system is usually highly modular and customizable to meet the specific needs of different enterprises.
[0045] S302, pre-processing the pre-controlled tickets and question content in the initial data set to obtain the fine-tuning data set; wherein the pre-processing includes structured processing and / or merging processing.
[0046] After obtaining the above-mentioned initial data set, the present disclosure may pre-process the pre-controlled tickets and title content in the above-mentioned initial data set, which may include, for example, structured processing and / or merging processing, etc., so as to obtain a corresponding fine-tuning data set.
[0047] In a specific embodiment, the present disclosure can perform structured processing on the pre-control tickets in the above-mentioned initial data set, for example, splitting the pre-control items into field items such as scenarios, sources of danger, possible harm, and pre-control measures according to keyword fields, thereby obtaining corresponding pre-control items with a preset structured format. Further, the present disclosure can merge the above-mentioned structured pre-control items according to preset rules, thereby obtaining training prompt information for generating questions. The introduction of the training prompt information can be referred to the relevant introduction of the question prompt information in the aforementioned step S101, which will not be repeated here.
[0048] The present disclosure can perform structured processing on the question content in the above-mentioned initial data set, so as to obtain structured training question content. The introduction of the training question content can correspond to the relevant introduction of the question content in the above-mentioned step S102, which will not be repeated here.
[0049] For example, taking the pre-control ticket and the title content of the above initial training set as "When doing xxx work, in order to avoid xxx, the correct way is xxx; based on the above content, come up with a single-choice question in the format of xxx", the format of the structured single-choice question can be shown in Table 1 below: Table 1
[0050] Among them, the training prompt information and training question content in the fine-tuning data set usually appear in pairs. The present disclosure does not limit the respective forms of expression of the above-mentioned training prompt information and the above-mentioned training question content. For example, they can be strings, etc.
[0051] In another embodiment, after obtaining the above-mentioned fine-tuning dataset, the present disclosure can train and fine-tune the large language model based on the fine-tuning dataset, thereby obtaining the above-mentioned question generation model. Figure 4 FIG. 1 is a flow chart of model training fine-tuning according to an exemplary embodiment. Figure 4 The process shown may include the following implementation steps: S401, fine-tuning the Lora parameters in the large language model based on the fine-tuning data set to obtain fine-tuned Lora parameters; S402. Based on the basic model parameters in the large language model and the fine-tuned Lora parameters, forward propagation fine-tuning is performed on the large language model to obtain the fine-tuned question generation model; wherein the basic model parameters are the model parameters in the large language model except the Lora parameters.
[0052] In order to solve the parameter efficiency problem encountered during model fine-tuning, the present disclosure can use a low-rank matrix (Low-Rank Adaptation, Lora) to solve it. Among them, Lora divides the parameters of the original large language model into two parts: basic model parameters and Lora parameters by introducing a set of trainable rank decomposition matrices. During the fine-tuning process, the basic model parameters are kept unchanged, and the Lora parameters are fine-tuned to adapt to specific fields or specific tasks. The main point of Lora is high parameter efficiency, which means that when fine-tuning the model, only a small number of parameters need to be updated, which can greatly reduce the required computing resources and storage space. In addition, Lora can also improve the generalization ability of the model, avoid overfitting, and reduce catastrophic forgetting problems during fine-tuning. The implementation of Lora usually involves: freezing the basic model parameters of the large language model. During the fine-tuning process, the basic model parameters of the large language model remain unchanged, and only the Lora parameters are updated.
[0053] The Lora parameters introduced above refer to a set of trainable rank decomposition matrices added to each attention layer and feedforward network layer of the large language model. That is, the Lora parameters are the rank decomposition matrices introduced and added corresponding to each attention layer and feedforward network layer in the large language model. Fine-tuning the Lora parameters above may refer to fine-tuning the Lora parameters using a fine-tuning dataset for a specific task or field to adapt to the new task or field.
[0054] In the model inference stage: the present disclosure can combine the basic model parameters of the above large language model with the fine-tuned Lora parameters, and fine-tune the model again using the forward propagation method, so as to obtain the above-mentioned trained and adjusted question generation model. The question generation model can better complete the question generation task.
[0055] Some optional embodiments of the present disclosure are described below.
[0056] In an optional embodiment, the present disclosure can generate a test paper based on the above-generated title content, thereby obtaining the generated test paper content. For example, the present disclosure can further generate a test paper for the above-mentioned title content according to the set rules, thereby automatically generating the corresponding test paper content. Optionally, the present disclosure also supports the test paper distribution function. For example, the above-mentioned scheme of the present disclosure supports the application of small programs. For example, taking the WeChat program as an example, it provides the job name-pre-control ticket index and test paper generation function. After the worker logs in to the enterprise WeChat program, he can select the corresponding work. The program automatically extracts the questions corresponding to the relevant pre-control items according to the relevant work index, and then generates several test papers according to the number of test papers. Each test paper can generate a corresponding QR code. The person in charge of the work distributes the QR code to the relevant working group members, and the members can scan the code to enter their respective test papers to answer questions. Compared with the personnel computer room examination in the relevant technology, the assessment can be carried out by logging in to the enterprise WeChat through an electronic device, which increases the flexibility and convenience of the assessment of working group members.
[0057] It can be seen that the disclosed solution provides functions such as automatic question setting, automatic test paper generation, and automatic test paper distribution, wherein automatic question setting replaces manual question setting, greatly improving the efficiency of safety training and assessment. Assessment can be conducted by logging into the enterprise WeChat through an electronic device (such as a mobile phone), which increases the flexibility and convenience of the assessment of work group members. In the specific implementation, the electronic device obtains the topic prompt information, and the topic prompt information includes at least one pre-control item with a preset structured format; the topic generation model is called to generate the topic for the topic prompt information to obtain the generated topic content; wherein the topic generation model is obtained by training and fine-tuning the large language model based on the obtained fine-tuning data set, and the fine-tuning data set includes at least one training prompt information and at least one training topic content that appear in pairs; in the fine-tuning process, the basic model parameters of the large language model are kept unchanged, and the low-rank matrix Lora parameters of the large language model are fine-tuned, and the Lora parameters are the rank decomposition matrices corresponding to the attention layer and the feedforward network layer in the large language model. In this way, the disclosure can automatically set questions based on the topic generation model, replacing manual questions, and can avoid technical problems such as large workload, low work efficiency and high labor costs caused by manual questions. At the same time, it can also improve the safety of risk prevention and control training and the efficiency of personnel assessment.
[0058] Based on the above examples, see Figure 5 FIG. 1 is a schematic diagram showing a structure of a question generating device according to an exemplary embodiment. Figure 5 The device shown can be applied to an electronic device, and the device may include an acquisition module 501 and a processing module 502. Among them: The acquisition module 501 is configured to acquire topic prompt information, wherein the topic prompt information includes at least one pre-control item having a preset structured format; The processing module 502 is configured to call a topic generation model to generate a topic based on the topic prompt information to obtain a generated topic content; The question generation model is obtained by training and fine-tuning a large language model based on the acquired fine-tuning data set, and the fine-tuning data set includes at least one training prompt information and at least one training question content that appear in pairs; during the fine-tuning process, the basic model parameters of the large language model are kept unchanged, and the low-rank matrix Lora parameters of the large language model are fine-tuned, and the Lora parameters are the rank decomposition matrices corresponding to the attention layer and the feedforward network layer in the large language model.
[0059] In some embodiments, the acquisition module 501 is configured to: Acquire prompt information to be processed, where the prompt information to be processed includes at least one pre-control item; The prompt information to be processed is structured and merged to obtain the topic prompt information.
[0060] In some embodiments, the topic content is topic content having the preset structured format.
[0061] In some embodiments, the acquisition module 501 is further configured to acquire an initial data set, the initial data set comprising at least one pre-control ticket and at least one topic content appearing in pairs, each of the pre-control tickets comprising at least one pre-control item; The processing module 502 is further configured to pre-process the pre-controlled tickets and the title content in the initial data set to obtain the fine-tuning data set; The preprocessing includes structuring processing and / or merging processing.
[0062] In some embodiments, the processing module 502 is further configured to: Fine-tune the Lora parameters in the large language model based on the fine-tuning dataset to obtain fine-tuned Lora parameters; Based on the basic model parameters in the large language model and the fine-tuned Lora parameters, forward propagation fine-tuning is performed on the large language model to obtain the fine-tuned question generation model; The basic model parameters are model parameters in the large language model except the Lora parameters.
[0063] In some embodiments, the processing module 502 is further configured to: The pre-control ticket is obtained based on the Robotic Process Automation (RPA) technology, wherein the RPA technology supports manipulating the application to input at least one corresponding pre-control ticket in the user interface.
[0064] In some embodiments, the processing module 502 is further configured to: A test paper is generated based on the generated question content to obtain generated test paper content, wherein the test paper content includes the generated question content.
[0065] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the question generating method provided by the present disclosure are implemented.
[0066] Figure 6 6 is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. For example, the electronic device 600 may be a mobile phone, a computer or other devices with communication functions.
[0067] Reference Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output interface 612 , a sensor component 614 , and a communication component 616 .
[0068] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned topic generation method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0069] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0070] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 600.
[0071] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0072] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0073] The input / output interface 612 provides an interface between the processing component 602 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0074] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0075] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0076] In an exemplary embodiment, the device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned question generation method.
[0077] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to complete the above-mentioned superordinate question generation method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0078] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned question generation method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, for example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction may be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned question generation method is implemented; alternatively, the integrated circuit or chip may receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned question generation method.
[0079] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned topic generating method when executed by the programmable device.
[0080] See also Figure 7 FIG. 1 is a schematic diagram showing the structure of a chip according to an exemplary embodiment. Figure 7 The chip 700 shown includes a processor 701 and an interface 702. Optionally, it may also include a memory 703. The number of the processor 701 may be one or more, and the number of the interface 702 may be multiple.
[0081] In one embodiment, for a case where a chip is used to implement the method embodiment of the present disclosure: The interface 702 is used to receive or output signals; The processor 701 is used to execute part or all of the content in the embodiment of the question generation method.
[0082] It is understandable that the processor in the embodiment of the present disclosure can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0083] It is understandable that the memory in the embodiments of the present disclosure may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0084] It should be noted here that the description of the above storage medium, device and chip 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, storage medium and device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
[0085] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0086] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for generating a topic, characterized in that: include: Acquiring topic prompt information, wherein the topic prompt information includes at least one pre-control item having a preset structured format; Calling a question generation model to generate a question for the question prompt information to obtain a generated question content; The question generation model is obtained by training and fine-tuning a large language model based on the acquired fine-tuning data set, and the fine-tuning data set includes at least one training prompt information and at least one training question content that appear in pairs; During the fine-tuning process, the basic model parameters of the large language model are kept unchanged, and the low-rank matrix Lora parameters of the large language model are fine-tuned, where the Lora parameters are the rank decomposition matrices corresponding to the attention layer and the feedforward network layer in the large language model.
2. The method according to claim 1, characterized in that The obtaining of the topic prompt information includes: Acquire prompt information to be processed, where the prompt information to be processed includes at least one pre-control item; The prompt information to be processed is structured and merged to obtain the topic prompt information.
3. The method according to claim 1, characterized in that The topic content is the topic content having the preset structured format.
4. The method according to claim 1, characterized in that: The method further comprises: Acquire an initial data set, the initial data set comprising at least one pre-control ticket and at least one topic content appearing in pairs, each of the pre-control tickets comprising at least one pre-control item; Preprocessing the pre-controlled tickets and question contents in the initial data set to obtain the fine-tuning data set; The preprocessing includes structuring processing and / or merging processing.
5. The method according to claim 4, characterized in that The method further comprises: Fine-tune the Lora parameters in the large language model based on the fine-tuning dataset to obtain fine-tuned Lora parameters; Based on the basic model parameters in the large language model and the fine-tuned Lora parameters, forward propagation fine-tuning is performed on the large language model to obtain the fine-tuned question generation model; The basic model parameters are model parameters in the large language model except the Lora parameters.
6. The method according to claim 5, characterized in that The method further comprises: The pre-control ticket is obtained based on the Robotic Process Automation (RPA) technology, wherein the RPA technology supports manipulating the application to input at least one corresponding pre-control ticket in the user interface.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: A test paper is generated based on the generated question content to obtain generated test paper content, wherein the test paper content includes the generated question content.
8. A question generating device, characterized in that: include: An acquisition module is configured to acquire topic prompt information, wherein the topic prompt information includes at least one pre-controlled item having a preset structured format; A processing module is configured to call a question generation model to generate a question for the question prompt information to obtain a generated question content; The question generation model is obtained by training and fine-tuning a large language model based on the acquired fine-tuning data set, and the fine-tuning data set includes at least one training prompt information and at least one training question content that appear in pairs; During the fine-tuning process, the basic model parameters of the large language model are kept unchanged, and the low-rank matrix Lora parameters of the large language model are fine-tuned, where the Lora parameters are the rank decomposition matrices corresponding to the attention layer and the feedforward network layer in the large language model.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the executable instructions to implement the steps of the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
11. A chip, characterized in that: The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 7.