Interview question generation method, system, and computer-readable storage medium
Patent Information
- Application Number
- CN202611069729.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-10-20
AI Technical Summary
大模型可能返回空状态、重复节点、丢失历史节点、多个活跃话题、孤立节点或环路;若直接落库,会使后续问题生成持续建立在错误状态上
[0015]本发明提供的访谈问题生成方法、系统及计算机可读存储介质,跨会话记忆仅保存稳定事实,会话话题指针和临时转换状态限定在当前会话内,从数据结构上降低临时状态污染下一会话的风险,下一问直接使用上一有效状态、本轮最新回答及有限历史,不等待本轮状态抽取完成;同时异步更新仍通过版本和校验形成新的可靠状态,而且根据有效轮次的累积状态,选择对应的方式进行更新和纠偏,从而使得产生的问题更加具有实时性、个性化及自然性。
Smart Images

Figure FT_1 
Figure SMS_1 
Figure SMS_5
Abstract
Description
Technical Field
[0001] This invention relates to the field of question generation technology, and in particular to a method, system, and computer-readable storage medium for generating interview questions. Background Technology
[0002] Some interview question generation schemes often have the following problems: The lifecycle of the memory layer is mixed. Placing long-term facts, current topics, and temporary contexts in the same summary, vector set, or state object can easily cause temporary topic states in one session to pollute subsequent sessions, and it is also difficult to distinguish between facts that should be retained for a long time and control information that is only valid in this session.
[0003] Question generation and memory extraction can easily lead to sequential waiting. If the current round of fact extraction, graph update, or state reconstruction must be completed before generating the next question, the time consumed by the structured extraction model will be directly added to the user's waiting time; if it is completely asynchronous and the latest answer of the current round is not injected, the next question may ignore the content just expressed by the user.
[0004] The generated state of the model lacks deterministic protection. Large models may return empty states, duplicate nodes, missing historical nodes, multiple active topics, isolated nodes, or loops; if directly stored in the database, subsequent problem generation will continue to be based on erroneous states. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide an interview question generation method, system, and computer-readable storage medium. Cross-session memory only stores stable facts, and the conversation topic pointer and temporary transition state are limited to the current session. This reduces the risk of temporary states polluting the next session from the data structure perspective. The next question directly uses the previous valid state, the latest answer in this round, and limited history, without waiting for the current round's state extraction to be completed. At the same time, asynchronous updates still form new reliable states through versioning and verification. Moreover, based on the accumulated state of the valid rounds, the corresponding method is selected for updating and correction, thereby making the generated questions more real-time, personalized, and natural.
[0006] This invention provides a method for generating interview questions, comprising the following steps: The opening is initialized based on cross-session factual memory, and the conversation loop state is entered after the user responds; wherein, the conversation loop state further includes: Receive the latest answer from the user and assign a round identifier to the latest answer; The real-time question context is formed based on the previous valid structured state of the current dialogue, the content of the most recent preset round, and the latest answer in this round; The next interview question is generated based on the real-time question context and factual gaps. After the next interview questions are output, the pending markers are updated and the task status is checked. The corresponding range of rounds to be processed is selected based on the unprocessed valid rounds and the reconstruction threshold, and the fact state and topic state are updated based on the range of rounds to be processed to form candidate session states. Based on the verification results, you can choose to retain either the candidate session state before or after the update.
[0007] In one embodiment, the step of initializing the conversation based on cross-session factual memory and entering the dialogue loop state after the user answers further includes: Obtain the cross-session fact memory and normalize it into initial fact values; Establish an empty topic state, and generate an opening question based on the empty topic state and the initial value of the facts; After the user answers the opening question, the dialogue loop begins.
[0008] In one embodiment, the generation of the next interview question based on the real-time question context and factual gap follows the following control rules: Only one explicit question is generated at a time, the question length does not exceed the preset maximum value, and natural language suitable for text display or speech synthesis is used; When users mention people, events, places, objects, organizations, or experiences, prioritize filling in one or more factual gaps in time, place, participants, relationships, causes, processes, results, or impacts. Once the facts have reached a predetermined level of completeness or the user actively expresses strong emotions, then proceed to questions about feelings, meaning, or evaluation. Prioritize following up on currently active topics; only generate topic transition questions when the user clearly switches topics, or when the current topic has been sufficiently narrowed down and confirmed. Only when historical events are mentioned in the current response, or when the current topic relies on historical time, will information from distant past be actively recalled.
[0009] In one embodiment, the step of updating the pending markers and determining the task status after the next interview question is output further includes: After the next interview questions are output, update the pending tags; If an update task already exists, reuse the currently running update task; Create an update task if no update task exists.
[0010] In one embodiment, the step of selecting a corresponding range of rounds to be processed based on the unprocessed valid rounds and the reconstruction threshold, and updating the fact state and topic state based on the range of rounds to be processed, further includes: The number of unprocessed valid rounds is compared with the reconstruction threshold. If the number of valid rounds is less than the reconstruction threshold, the fact state and topic state are updated by incremental rounds to form candidate session states. If the number of valid rounds is not less than the reconstruction threshold, the fact state and topic state are updated by selecting all valid rounds to form candidate session states.
[0011] In one embodiment, the step of selecting to retain the candidate session state before or after the update based on the verification result further includes: If the verification passes, the updated candidate session state is written to the previous valid structured state; If the verification fails, the original candidate session state is retained as the previous valid structured state.
[0012] In one embodiment, the interview question generation method further includes: After the session ends, wait for the status of the running tasks to be updated; Then perform a final update on the missed rounds; Finally, update the cross-session fact memory based on the last valid structured state.
[0013] The present invention also provides an interview question generation system for implementing the method described in any one of the above methods, comprising: The opening initialization module is used to perform opening initialization based on cross-session fact memory and enter the dialogue loop state after the user answers; The interview acquisition module is used to receive the latest user answers and assign a round identifier to the latest answer; The real-time context construction module is used to form a real-time question context based on the previous valid structured state of the current dialogue, the most recent preset round number, and the latest answer in the current round. The interview question generation module is used to generate the next interview question based on the real-time question context and factual gaps; The asynchronous state update coordination module is used to update the pending markers and determine the status of the update task after the next interview question is output. The corresponding range of rounds to be processed is selected based on the unprocessed valid rounds and the reconstruction threshold, and the fact state and topic state are updated based on the range of rounds to be processed to form candidate session states. The topic status update module is used to select whether to retain the candidate session status before or after the update based on the verification results.
[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any of the preceding claims.
[0015] The interview question generation method, system, and computer-readable storage medium provided by this invention only store stable facts across sessions. The session topic pointer and temporary transition state are limited to the current session, which reduces the risk of temporary states polluting the next session from the data structure perspective. The next question directly uses the previous valid state, the latest answer in this round, and limited history, without waiting for the current round's state extraction to be completed. At the same time, asynchronous updates still form new reliable states through versioning and verification. Moreover, based on the accumulated state of the valid rounds, the corresponding method is selected for updating and correction, thereby making the generated questions more real-time, personalized, and natural. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the interview question generation method provided by the present invention. Detailed Implementation
[0018] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. Based on the description of the present invention, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the present invention.
[0019] In the description of this invention, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0020] The terms “upper,” “lower,” “left,” “right,” “front,” “back,” “top,” “bottom,” “inner,” and “outer,” etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use. They are only for the convenience of description and simplification, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention.
[0021] The terms “first,” “second,” “third,” etc., are used merely to distinguish elements with similar properties, not to indicate or imply relative importance or a specific order.
[0022] The terms “include,” “comprising,” or any other variation thereof are intended to cover non-exclusive inclusion, which includes not only the elements listed but also other elements not expressly listed. Example 1
[0023] Please see Figure 1 The interview question generation method provided by this invention includes the following steps: S1 initializes the opening based on cross-session factual memory and enters the dialogue loop state after the user answers.
[0024] It is understandable that the above steps may further include: S101, retrieve cross-session fact memory and normalize it to the initial fact value.
[0025] It is understood that cross-session fact memory can be stored in a cross-session fact memory bank, preserving stable facts by user. These stable facts include at least a basic information mapping, a life or business timeline, a set of entity relationships, a memory version, a source session identifier, and the number of the most recent merge round. This cross-session fact memory bank does not store pointers to currently active topics to avoid the temporary control state of one session affecting the next.
[0026] The aforementioned cross-session fact memory stores basic information using short, stable attribute keys; the timeline records time or stage and event descriptions; entity relationships record the starting entity, relationship type, and ending entity. For identity information not explicitly provided by the user, the system does not write internal placeholders into the basic information.
[0027] Normalization to initial fact values can be understood as extracting reusable, stable facts.
[0028] S102, Establish an empty topic state, and generate an opening question based on the empty topic state and the initial value of the facts; Understandably, the empty topic state provides a pattern for opening questions, while the initial fact value provides content material, thus generating a more appropriate opening question.
[0029] S13: After the user answers the opening question, the dialogue loop begins.
[0030] The dialogue loop state further includes: S2 receives the latest answer from the user and assigns a round identifier to the latest answer.
[0031] It is understood that the user's latest answer is in text form as input. For voice data, it is recognized by a voice recognition algorithm and then used as input. This embodiment does not limit the voice recognition algorithm. The round identifier can be in the form of Arabic numerals, letters, or a combination of both.
[0032] S3 forms a real-time question context based on the previous valid structured state of the current dialogue, the content of the most recent preset round, and the latest answer in this round.
[0033] Understandably, on the one hand, we need to consider the rapid generation of questions. Therefore, we can generate questions quickly through the steps in step S3. The effective structured state can include basic information, timeline, factual state and topic state, while saving the state version, the position of the last processing round, the identifier of the most recently processed dialogue round and state information.
[0034] The topic status includes at least: a currently active topic identifier, a set of topic nodes, and a set of topic transition edges.
[0035] A topic node includes a node identifier, title, summary, status, and parent node identifier; a topic transition edge includes a start point, an end point, and a transition type. The previous valid structured state can be the latest valid structured state extracted in this round of question and answer. The most recent preset round number can be designed according to actual needs. The content in the most recent preset round number may not have formed a valid structured state yet. Even if the latest answer in this round has not been extracted into a valid structured state, it will still be used as an independent input to participate in the generation of the next interview question, thereby maintaining real-time. The latest answer in this round includes the question raised.
[0036] S4 generates the next interview question based on the real-time question context and fact gaps.
[0037] Understandably, the generation of fact gaps can be achieved by prioritizing the filling of one of the following fact gaps when a user mentions a person, event, place, object, organization, or experience: time, place, participants, relationships, cause, process, result, or impact. The generation relationship for the next interview question is as follows:
[0038] Equation (1) shows that even if the first The structured extraction for this round of responses has not yet been completed; the latest response in this round... It is still entered into the question generation mapping as an independent input, so the next question has both the stability of the previous valid state and the real-time nature of the current round of answers.
[0039] S5, after the next interview questions are output, updates the pending markers and checks the status of the updated tasks.
[0040] It is understood that the above steps may further include; S401, Update the pending markers after the next interview questions are output.
[0041] It is understandable that updating the pending flag can be interpreted as activating the pending tasks.
[0042] S402, if an update task already exists, reuse the currently running update task; It is understandable that when there is question and answer content, the task update will be triggered. If there is a task update thread in the system, no update task will be created, and the thread will continue to be used for effective structured state storage.
[0043] S403: Create an update task if no update task exists.
[0044] Understandably, when no task update thread exists in the system, a new thread needs to be created for effective structured state storage. For the same session, only one running update task is maintained. After completing the current batch of update tasks, the currently running update task does not immediately exit, but instead checks the pending flag to determine if a new round has arrived. When multiple consecutive rounds arrive before the state update task is completed, a separate task is not created for each completion event; instead, the pending flag for the same session is continuously set. After the current task completes one effective structured state write, it checks the pending flag and continues processing new rounds, finally processing the position... Ensure that the next round only selects dialogues that have not yet been processed.
[0045] S6. Select the corresponding range of rounds to be processed based on the unprocessed valid rounds and the reconstruction threshold, and update the fact state and topic state based on the range of rounds to be processed to form candidate session states.
[0046] It is understandable that the above steps may further include: S601 compares the unprocessed valid rounds with the reconstruction threshold.
[0047] It is understandable that the reconstruction threshold should be designed according to actual needs.
[0048] S602, if the number of valid rounds is less than the reconstruction threshold, the fact state and topic state are updated by incremental rounds to form candidate session states.
[0049] It is known that, during the process, for some newly added unprocessed valid rounds, if the number of rounds is less than the reconstruction threshold, only the newly added unprocessed valid rounds are processed. The fact state and topic state are modified based on the original fact state and topic state, that is, the original fact state is retained and new facts are added. The topic state is subjected to tree-top growth, that is, old topic nodes are closed, new topic nodes are created and active topic markers are moved forward. The incremental round method has low computational overhead.
[0050] S603, if the number of unprocessed valid rounds is not less than the reconstruction threshold, select all valid rounds to update the fact state and topic state to form candidate session states.
[0051] It's known that generating questions solely based on previous Q&A content results in somewhat inconsistent questions. Therefore, it combines all previously updated historical Q&A content for question generation. When the number of unprocessed valid rounds is not less than the reconstruction threshold, a patch-on-pattern state occurs, slowing down the update speed. Updating the factual and topic states using all valid rounds actually speeds up the update process. This approach can be understood as: When an unprocessed backlog of valid rounds is detected, the original valid structured state can be discarded, and the valid structured state can be traversed and summarized from the beginning to obtain new fact states and topic states. This is beneficial for backlog recovery and data repair, and it is applicable not only to backlogs but also to scenarios with data anomalies.
[0052] The updated factual status and topic status can be represented as follows:
[0053]
[0054] Candidate session state can be represented as:
[0055] Among them, operators This indicates that the basic information, timeline, and entity relationship fields are combined with the topic status field to form a candidate session status, and does not represent numerical addition.
[0056] S7, based on the verification result, select whether to retain the candidate session state before or after the update.
[0057] The above steps may further include: S701, if the verification passes, write the updated candidate session state to the previous valid structured state; S7, if the verification fails, retain the original candidate session state as the previous valid structured state.
[0058] Understandably, the purpose of the verification is to avoid empty states, isolated nodes, and duplicate nodes, that is, to avoid errors and duplication in candidate session states. The verification should at least check: unique node identifier, parent node exists, nodes at both ends of the edge exist, edge does not have self-loops, transition edges do not repeat, single node state does not have transition edges, multi-node state has a unique root node, state graph is acyclic and connected, only one active node exists, the current topic pointer is consistent with the active node, and candidate state does not reduce existing historical nodes. The verification result can be expressed as:
[0059] when At that time, Save as new ;when At that time, continue to As a valid state, this selection rule avoids performing unreasonable arithmetic interpolation on non-numerical states.
[0060] Before the conversation ends, when subsequent questions are generated, the updated candidate conversation state, the previous valid structured state, the content of the most recent preset round, and the latest answer in the current round will be combined to generate subsequent questions. That is, before the update is triggered, the topic is generated based on cross-conversation fact memory. The updated candidate conversation state will be combined to avoid the duplication of subsequent questions, and the generated questions are accurate and personalized.
[0061] S8, repeat the above loop state before the session ends; After the session ends, wait for the status of the running tasks to be updated; Then perform a final update on the missed rounds; Finally, update the cross-session fact memory based on the last valid structured state.
[0062] Understandably, when the session is in the final round... After the session ends, the cross-session fact memory is updated as follows:
[0063] in, Extract only basic information, timeline, and entity relationships; Update the mapped fields and remove duplicates from the list fields, without merging the current topic pointer and topic transition state.
[0064] Please refer to the table below for the meaning of the parameters involved in the above expressions: Symbols and Formulas Table
[0065] Operation control character table
[0066] Status update and verification symbol table
[0067] Example 2 This embodiment also provides an interview question generation system, characterized in that the method for implementing any of the above includes: The opening initialization module is used to perform opening initialization based on cross-session fact memory and enter the dialogue loop state after the user answers; The interview acquisition module is used to receive the latest user responses and assign a round identifier to the latest response; The real-time context construction module is used to form a real-time question context based on the previous valid structured state of the current dialogue, the most recent preset round number, and the latest answer in the current round. The interview question generation module is used to generate the next interview question based on the real-time question context and fact gaps; The asynchronous state update coordination module is used to update the pending markers and determine the status of the update task after the next interview question is output. Based on the unprocessed valid rounds and the reconstruction threshold, the corresponding range of rounds to be processed is selected, and the fact state and topic state are updated based on the range of rounds to be processed to form candidate session states. The topic status update module is used to select whether to retain the candidate session status before or after the update based on the verification results.
[0068] Example 3 This embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described above.
[0069] As described above, the interview question generation method, system, and computer-readable storage medium provided by this invention only store stable facts across sessions. The session topic pointer and temporary transition state are limited to the current session, which reduces the risk of temporary states polluting the next session from the data structure perspective. The next question directly uses the previous valid state, the latest answer in this round, and limited history, without waiting for the current round's state extraction to be completed. At the same time, asynchronous updates still form new reliable states through versioning and verification. Moreover, based on the accumulated state of the valid rounds, the corresponding method is selected for updating and correction, thereby making the generated questions more real-time, personalized, and natural.
[0070] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A method for generating interview questions, characterized in that, Includes the following steps: The opening is initialized based on cross-session factual memory, and the conversation loop state is entered after the user responds; wherein, the conversation loop state further includes: Receive the latest answer from the user and assign a round identifier to the latest answer; The real-time question context is formed based on the previous valid structured state of the current dialogue, the content of the most recent preset round, and the latest answer in this round; The next interview question is generated based on the real-time question context and factual gaps. After the next interview questions are output, the pending markers are updated and the task status is checked. The corresponding range of rounds to be processed is selected based on the unprocessed valid rounds and the reconstruction threshold, and the fact state and topic state are updated based on the range of rounds to be processed to form candidate session states. Based on the verification results, you can choose to retain either the candidate session state before or after the update.
2. The interview question generation method as described in claim 1, characterized in that, The initialization based on cross-session factual memory, and the entry into a dialogue loop state after the user's response, further includes: Obtain the cross-session fact memory and normalize it into initial fact values; Establish an empty topic state, and generate an opening question based on the empty topic state and the initial value of the facts; After the user answers the opening question, the dialogue loop begins.
3. The interview question generation method as described in claim 1, characterized in that, The generation of the next interview question based on the real-time question context and factual gap follows the following control rules: Only one explicit question is generated at a time, the question length does not exceed the preset maximum value, and natural language suitable for text display or speech synthesis is used; When users mention people, events, places, objects, organizations, or experiences, prioritize filling in one or more factual gaps in time, place, participants, relationships, causes, processes, results, or impacts. Once the facts have reached a predetermined level of completeness or the user actively expresses strong emotions, then proceed to questions about feelings, meaning, or evaluation. Prioritize asking follow-up questions on currently active topics; A topic transition question is only generated when the user clearly switches topics, or when the current topic has been sufficiently concluded and confirmed. Only when historical events are mentioned in the current response, or when the current topic relies on historical time, will information from distant past be actively recalled.
4. The interview question generation method as described in claim 1, characterized in that, The step of updating the pending markers and determining the task status after the next interview question is output further includes: After the next interview questions are output, update the pending tags; If an update task already exists, reuse the currently running update task; Create an update task if no update task exists.
5. The interview question generation method as described in claim 1, wherein selecting the corresponding range of rounds to be processed based on the unprocessed valid rounds and the reconstruction threshold, and updating the factual state and topic state based on the range of rounds to be processed, further includes: The number of unprocessed valid rounds is compared with the reconstruction threshold. If the number of valid rounds is less than the reconstruction threshold, the fact state and topic state are updated by incremental rounds to form candidate session states. If the number of valid rounds is not less than the reconstruction threshold, the fact state and topic state are updated by selecting all valid rounds to form candidate session states.
6. The interview question generation method as described in claim 1, wherein selecting to retain the candidate session state before or after the update based on the verification result further includes: If the verification passes, the updated candidate session state is written to the previous valid structured state; If the verification fails, the original candidate session state is retained as the previous valid structured state.
7. The interview question generation method as described in claim 1, characterized in that, The interview question generation method also includes: After the session ends, wait for the status of the running tasks to be updated; Then perform a final update on the missed rounds; Finally, update the cross-session fact memory based on the last valid structured state.
8. An interview question generation system, characterized in that, For implementing the method of any one of claims 1 to 7, comprising: The opening initialization module is used to perform opening initialization based on cross-session fact memory and enter the dialogue loop state after the user answers; The interview acquisition module is used to receive the latest user answers and assign a round identifier to the latest answer; The real-time context construction module is used to form a real-time question context based on the previous valid structured state of the current dialogue, the most recent preset round number, and the latest answer in the current round. The interview question generation module is used to generate the next interview question based on the real-time question context and factual gaps; The asynchronous state update coordination module is used to update the pending markers and determine the status of the update task after the next interview question is output. The corresponding range of rounds to be processed is selected based on the unprocessed valid rounds and the reconstruction threshold, and the fact state and topic state are updated based on the range of rounds to be processed to form candidate session states. The topic status update module is used to select whether to retain the candidate session status before or after the update based on the verification results.
9. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of claims 1-7.