Human resource interaction system, method and equipment and storage medium
By introducing large language model technology and intention recognition agents into the human resource management system, the problems of inefficiency of the existing system and information silos are solved, efficient and accurate human resource interaction and data query are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411803138.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-04
AI Technical Summary
The existing human resource management system is inefficient, has serious information silos, is difficult to query data, and has poor user experience, which limits the company's ability to develop rapidly.
Develop a human resource interaction system, using large language model technology and intention recognition agents, split user input through a thinking tree, identify user intentions, and retrieve knowledge texts with semantic similarity from vector databases, and generate accurate replies.
It improves the efficiency and accuracy of human resource management, realizes a user-friendly interactive interface, simplifies the data query process, reduces the phenomenon of information silos, and improves user experience and system response speed.
Smart Images

Figure CN119557405A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of human resource information processing, and in particular to a human resource interaction system, method, device and storage medium. Background Art
[0002] As enterprises expand in size and their businesses become more complex, the shortcomings of traditional human resource management methods have gradually emerged: low efficiency, information islands, inconvenient query, high costs, etc., which will greatly limit the rapid development of enterprises. Most existing human resource management systems rely on traditional database query and report generation, which are usually time-consuming and inefficient, and data between different departments and systems often cannot be effectively shared, resulting in information islands; and in existing systems, employees and management may find it very difficult to query specific data. Therefore, how to improve the level of human resource management is an urgent problem to be solved. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a human resource interaction system, method, device and storage medium, which can realize efficient, accurate and user-friendly human resource interaction and improve the level of human resource management. The specific scheme is as follows:
[0004] In a first aspect, the present application discloses a human resources interaction system, comprising:
[0005] An intention recognition module is used to determine whether the user's input is the first round of input. If so, the user's input information is split based on the mind tree to obtain a number of sub-information, and a preset intention recognition agent is used to recognize the user's intention based on each of the sub-information to determine the type of question input by the user;
[0006] A knowledge text determination module is used to collect the attendance knowledge documents of the company by using a preset retrieval enhancement generation agent if the type is an attendance system query class, convert the attendance knowledge documents into vector representations, and store them in a vector database, and determine knowledge texts with semantic similarity to the question based on the vector database;
[0007] A first question answer generation module, configured to input the knowledge text and the question into a large language model according to a preset target template, so as to generate a corresponding first question answer through the large language model, and output the first question answer to the user;
[0008] The second question answer generation module is used for extracting the key values of the key fields corresponding to the question through the large language model if the type is a personnel information query class, calling the corresponding data interface according to the key fields and the key values to obtain the corresponding target data, generating a data analysis code based on the target data, the target template and the preset code large model, executing the data analysis code to generate a corresponding second question answer, and outputting the second question answer to the user.
[0009] Optionally, the system further includes:
[0010] A judgment module, used for judging whether the user input is a follow-up question of the previous round if the user input is not the first round input;
[0011] A first judgment result execution module is used for rewriting the question based on the user's historical input question and the current input question to obtain a rewritten question if it is a follow-up question of the previous round, and identifying the user's intention based on the rewritten question;
[0012] The second judgment result execution module is used to directly jump to the step of splitting the user's input information based on the thinking tree if it is not a follow-up question of the previous round.
[0013] Optionally, the knowledge text determination module includes:
[0014] A text block conversion unit, used for dividing the attendance knowledge document into a plurality of text blocks, converting each of the text blocks into a vector representation using a preset embedding model, and storing the vector representation in the vector database;
[0015] A vectorization processing unit, used for inputting the problem into the embedding model for vectorization processing to obtain a target vector;
[0016] The knowledge text determination unit is used to determine the knowledge text in the vector database that is semantically similar to the target vector based on a preset retrieval model and cosine similarity.
[0017] Optionally, the system further includes:
[0018] The mapping table construction module is used to construct a synonym mapping table, a near-synonymous mapping table and an abbreviation mapping table, so as to use a preset intention recognition agent to recognize the user's intention based on each of the sub-information and the mapping table.
[0019] Optionally, the system further includes:
[0020] The code selection module is used to generate several codes at the same time by using different types of preset code models in the process of generating the data analysis code, and select the data analysis code that meets the target conditions from the several codes based on the preset code review model.
[0021] Optionally, the system further includes:
[0022] A guiding module is used to output a preset fixed answer to the user if the type of the question is small talk, and guide the user to input questions related to the attendance system query type and / or the personnel information query type.
[0023] Optionally, the system further includes:
[0024] The question-answer merging module is used to merge the first question answer and the second question answer to generate a final target question answer if the type of question input by the user is the attendance system query type and the personnel information query type, and output the target question answer to the user.
[0025] In a second aspect, the present application discloses a human resources interaction method, comprising:
[0026] Determine whether the user's input is the first round of input. If so, split the user's input information based on the mind tree to obtain a number of sub-information, and use a preset intention recognition agent to recognize the user's intention based on each of the sub-information to determine the type of question input by the user;
[0027] If the type is an attendance system query, the preset retrieval enhancement generation agent is used to collect the company's attendance knowledge documents, convert the attendance knowledge documents into vector representations, and store them in a vector database, and determine the knowledge texts that are semantically similar to the question based on the vector database;
[0028] Inputting the knowledge text and the question into a large language model according to a preset target template, so as to generate a corresponding first question answer through the large language model, and outputting the first question answer to the user;
[0029] If the type is a personnel information query, the key values of the key fields corresponding to the question are extracted through the large language model, and the corresponding data interface is called according to the key fields and the key values to obtain the corresponding target data. A data analysis code is generated based on the target data, the target template and the preset code large model, and the data analysis code is executed to generate a corresponding answer to the second question, and the answer to the second question is output to the user.
[0030] In a third aspect, the present application discloses an electronic device, comprising:
[0031] Memory, used to store computer programs;
[0032] The processor is used to execute the computer program to implement the human resources interaction method as described above.
[0033] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the human resources interaction method as described above is implemented.
[0034] In the human resources interaction system disclosed in the present application, the intention recognition module is used to determine whether the user's input is the first round of input. If so, the user's input information is split based on the mind tree to obtain a number of sub-information, and the preset intention recognition agent is used to identify the user's intention based on each of the sub-information to determine the type of question input by the user; the knowledge text determination module is used to collect the company's attendance knowledge documents by using the preset retrieval enhancement generation agent if the type is an attendance system query type, convert the attendance knowledge documents into vector representations, and store them in a vector database, and determine the knowledge text with semantic similarity to the question based on the vector database; the first question answer generation module A block is used to input the knowledge text and the question into the large language model according to the preset target template, so as to generate the corresponding first question answer through the large language model, and output the first question answer to the user; a second question answer generation module is used to extract the key value of the key field corresponding to the question through the large language model if the type is a personnel information query class, call the corresponding data interface according to the key field and the key value to obtain the corresponding target data, generate a data analysis code based on the target data, the target template and the preset code large model, execute the data analysis code to generate the corresponding second question answer, and output the second question answer to the user. It can be seen that the application is based on the large model technology to develop an intelligent agent that can accurately understand the natural language input by the user, identify the intention behind it, and extract key information fields from it. According to the extracted key fields, through the data interface, the intelligent agent can directly access and retrieve the original data stored in the system. Generate accurate reply answers through the original data, thereby improving the accuracy and response speed of the reply. Using the large language model technology, the system can understand and respond to the user's natural language input without the user having to learn a specific query language or menu navigation. And users can easily interact with the system, which improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0036] Figure 1 A schematic diagram of the structure of a human resources interaction system disclosed in this application;
[0037] Figure 2 A schematic diagram of a thinking tree disclosed in this application;
[0038] Figure 3 A schematic diagram of a human resources interaction system disclosed in this application;
[0039] Figure 4 A specific human resources interaction algorithm flow chart disclosed in this application;
[0040] Figure 5 A specific flow chart of the human resources interaction method disclosed in this application;
[0041] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] Most existing human resource management systems rely on traditional database query and report generation, which are usually time-consuming and inefficient. For example, when management needs to query employee information for a specific position, they may need to wait for the human resources department to manually collect and organize data, which is not only time-consuming but also prone to errors. Data between different departments and systems often cannot be effectively shared, resulting in information islands. In existing systems, employees and management may find it very difficult to query specific data. For example, employees may need to navigate through complex menus or fill out detailed forms to query attendance records or leave policies, which not only has a poor user experience, but also may lead to untimely information acquisition. Maintaining traditional human resource management systems usually requires a lot of manpower and material resources, including software licensing, hardware maintenance, personnel training, etc. Existing systems may not fully consider data security and privacy protection. Many existing human resource management systems use static interfaces and limited interaction methods, which limits user participation and system flexibility. Existing technologies often lack the ability to intelligently analyze and predict large amounts of data. In order to solve the above technical problems, the present application discloses a human resource interaction system, method, device and storage medium, which can achieve efficient, accurate and user-friendly human resource interaction and improve the level of human resource management.
[0044] See also Figure 1 As shown, the embodiment of the present invention discloses a human resources interaction system, including:
[0045] The intention recognition module 11 is used to determine whether the user's input is the first round of input. If so, the user's input information is split based on the thinking tree to obtain a number of sub-information, and a preset intention recognition agent is used to recognize the user's intention based on each of the sub-information to determine the type of question input by the user.
[0046] In this embodiment, when the user inputs information, it will first determine whether the user's input is the first round of input. If it is the first round of input, there is no need to consider the user's historical consultation questions. The user's input information is split based on the thinking tree to obtain several sub-information, and the preset intention recognition agent is used to identify the user's intention based on each sub-information to determine the type of question input by the user. Among them, the idea of the thinking tree (ToT, Tree of Thoughts) is used to improve the ability of large language models (LLM, Large Language Model) in solving complex problems. Simulate the human decision-making process and regard the problem-solving process as a thinking tree. Each node represents an intermediate thinking step, allowing the model to explore multiple different reasoning paths and perform self-evaluation to decide the next action. The specific approach is as follows Figure 2As shown in the figure, complex problems are broken down into several small problems. For example, if the user inputs: How many employees are there in the data analysis department? What are the job levels and specific distribution of teams? First, the problem is broken down into the following three questions through the thinking chain method: How many employees are there in the data analysis department? How many employees are there in each team of the data analysis department? What is the job level distribution of employees in the data analysis department? Based on the several small problems after decomposition, different reasoning paths are explored respectively, and self-evaluation is performed to decide the next action. The results of different reasoning paths after the above problems are broken down are summarized and the final answer is generated.
[0047] If it is not the first round of input, the system of this application also includes a judgment module, which is used to judge whether the user's input is a follow-up question of the previous round if the user's input is not the first round of input; the first judgment result execution module is used to rewrite the question based on the user's historical input questions and the current input questions if it is a follow-up question of the previous round, so as to obtain the rewritten question, and identify the user's intention based on the rewritten question; the second judgment result execution module is used to directly jump to the step of splitting the user's input information based on the thinking tree if it is not a follow-up question of the previous round. In other words, if the user is not the first round of input, it is necessary to analyze the historical question and answer records through the large model intelligent agent to determine whether the question input by the user is a follow-up question of the historical question. For example: the user input in the last round: how many senior employees are there in the data analysis division, and the input in this round is: which teams are they in? The questions that the user consults in this round are obviously follow-ups of the questions in the previous round, and the questions need to be rewritten. The questions that the user consults are rewritten by inputting the user's historical consultation questions and the current questions to construct a large model prompt word template. The rewritten question is: which teams are the senior employees of the data analysis division in? Then, the intent recognition agent analyzes the user input questions and identifies the types of user consultation questions: attendance questions, personnel questions, and small talk. Then different agents are selected to solve the user input problems. It should also be pointed out that the system of this application will include several agents: intent recognition agent, code generation agent, RAG (Retrieval-augmented Generation) agent, data analysis agent, tool call agent, and document generation agent. Each agent is responsible for solving a certain aspect of the problem separately. Among them, the intent recognition agent is responsible for identifying the intention of the user input problem, and then selecting different agents to solve the user problem; the code generation agent is responsible for converting the user input problem into an executable code file; the RAG agent is responsible for recalling the relevant knowledge in the database according to the user input problem; the data analysis agent is responsible for handling related data problems; the tool call agent is responsible for calling different tools to handle user input problems; the document generation agent is responsible for outputting the results output by the agent in a specified format. In this way, each agent is responsible for solving specific problems, which improves the flexibility and scalability of the system.
[0048] In addition, when identifying the user's intention, the system of the present application also includes a mapping table construction module for constructing a synonym mapping table, a near-synonymous mapping table, and an abbreviation mapping table, so as to use a preset intention recognition agent to identify the user's intention based on each of the sub-information and the mapping table. It can be known that, if Figure 3As shown, the data foundation of the human resources interaction system of this application is composed of various types of data, including both traditional data tables and document data in other formats. At the same time, in order to solve the abbreviations or synonyms or base synonyms in the company's human resources interaction system, it is necessary to construct a corresponding mapping table. Specifically, this application adopts advanced NLP (Natural Language Processing) technology, including deep learning models such as Transformer architecture and synonym mapping technology, to achieve accurate understanding and generation of natural language. This technology is capable of processing complex language features such as ambiguity and polysemy, thereby achieving efficient human-computer communication. In the synonym mapping part, we build a department name mapping table (for example, if a user wants to query "How many employees does the personal tax department have in 23 years?", "personal tax" is an abbreviation, and the actual full name of the department should be "natural person business department". The big model cannot understand these abbreviations, so we need to build a department name mapping table), synonym mapping table (some common synonyms in human resources are also incomprehensible to the big model, and this part also needs to be mapped. For example, if a user wants to query "How many outsourced employees does the company have?", the types of outsourced employment actually include: labor dispatch-full, labor dispatch-half, and pure payroll), job grade mapping table (for example, if a user wants to query "How many employees with a job grade greater than P13 are there in the personal tax department?", if the generated Python code directly uses df[df['job grade']>P13] for filtering, an error will occur, so the job grade must be converted to a number through mapping), etc.
[0049] The knowledge text determination module 12 is used to collect the company's attendance knowledge documents by using the preset retrieval enhancement generation agent if the type is an attendance system query type, convert the attendance knowledge documents into vector representations, and store them in a vector database, and determine the knowledge text with semantic similarity to the question based on the vector database.
[0050] In this embodiment, after the user input question is parsed by the intention recognition agent and the type of the user's consultation question is identified, Figure 4As shown, for the problem identified as the attendance category, the present application solves it by constructing a RAG agent processing method. That is, the knowledge text determination module includes: a text block conversion unit, which is used to divide the attendance knowledge document into several text blocks, use a preset embedding model to convert each of the text blocks into a vector representation, and store the vector representation in the vector database; a vectorization processing unit, which is used to input the problem into the embedding model for vectorization processing to obtain a target vector; a knowledge text determination unit, which is used to determine the knowledge text in the vector database that is semantically similar to the target vector based on a preset retrieval model and cosine similarity. Specifically, first, various formats of attendance knowledge documents (such as Word, TXT, PDF, etc.) are collected within the company; then, the long document is cut into multiple text blocks and the text is converted into a vector representation using an embedding model (BGE, BAAI General Embedding) and stored in the vector database:
[0051] ;
[0052] Among them, E is the embedding model that maps the text into a d-dimensional vector space; R is a real number.
[0053] Next, the user's question is input into the embedding model for vectorization processing, and the knowledge text that is semantically similar to the question vector is retrieved from the vector database and returned; the semantic similarity is judged by cosine similarity, and the calculation formula of cosine similarity is:
[0054] ;
[0055] Among them, A and B are two vectors, A∙B is the dot product of the vectors, and is the magnitude of the vector.
[0056] The retrieval model can be expressed as:
[0057] ;
[0058] Among them, T is the retrieval function, which accepts a vector and returns a set of related documents.
[0059] The first question answer generation module 13 is used to input the knowledge text and the question into a large language model according to a preset target template, so as to generate a corresponding first question answer through the large language model, and output the first question answer to the user.
[0060] In this embodiment, after determining the knowledge text that is semantically similar to the question input by the user, the question input by the user and the retrieved information are combined to construct a prompt template (this prompt template refers to a template framework, and the question and the retrieved information are input into this framework to ensure that the information format input into the large language model is unified and standardized), which is input into the large language model to generate the final question response. That is, the large model combines the question input by the user and the retrieved document to generate the final answer. Then the first question response is output to the user. It should be pointed out here that the responses output to the user in this application are all natural language, and the user input is also natural language. The system of this application will use a code generation agent to convert the natural language input by the user into code, perform subsequent operations through the code, and finally, after the large model outputs the response in code format, the response in code format will be converted into natural language and then output. In addition, the system of this application includes several large language models, including the Qwen series large language models, the GLM (General Language Model) series large language models, the BGE series semantic vector models, etc., and uses the industry's advanced vLLM (Virtual Large Language Model, an efficient system for optimizing large language model reasoning) reasoning framework to accelerate the model reasoning process. In this way, using large language model technology, the system can understand and respond to the user's natural language input without the user having to learn a specific query language or menu navigation. At the same time, an intuitive user interface is designed to enable users to easily interact with the system and improve user experience. Personalized services and suggestions can also be provided based on the user's historical interactions and preferences.
[0061] The second question answer generation module 14 is used to extract the key values of the key fields corresponding to the question through the large language model if the type is a personnel information query class, call the corresponding data interface according to the key fields and the key values to obtain the corresponding target data, generate a data analysis code based on the target data, the target template and the preset code large model, execute the data analysis code to generate a corresponding second question answer, and output the second question answer to the user.
[0062] In this embodiment, for problems identified as personnel-related, since the company's personnel data is large in scale and distributed in several databases, the data cannot be directly taken out, and the large model cannot solve all the data at one time due to its own context length limit. Therefore, this application first extracts the key values of key fields according to user input through the large model. For example, if the user inquires: how many employees are there in the data analysis department, the large model will extract the following fields and values according to the prompt word template {"department": "data analysis department"}; then, according to the extracted fields and values, the corresponding data interface is called to obtain the original data after screening. If the original data is input into the large model at this time, it will not be able to interpret all the data due to the context length limit of the large model itself; then, a data analysis agent is constructed, and the code large model is called by inputting the first few lines of the original data and the constructed large model prompt word template to generate data analysis python code, and then the data path of the data analysis code is modified to the original data path; finally, the final question reply answer is obtained by executing the data analysis code. It should be pointed out that when generating data analysis code, this application uses different types of preset code large models to generate several copies of code at the same time, and selects data analysis code that meets the target conditions from several copies of code based on the preset code review large model. That is to say, multiple different types of code big models are used to generate several copies of Python code at the same time, and then these generated codes are handed over to the code review big model (acting as a decision maker) for judgment, and the code that is most likely to solve the user input problem is selected to ensure the quality of code generation. In addition, this application obtains raw data through a data interface, that is, data from different sources can be obtained through different data interfaces. In layman's terms, data from any department can be obtained to achieve data sharing between different departments. Ensure that data interaction between different departments is seamless, that is, data can be updated and synchronized in real time. At the same time, a unified data storage format and standard are also formulated so that different departments can understand and use data from other departments.
[0063] If the question type is small talk, a preset fixed answer will be output to the user, and the user will be guided to enter questions related to attendance system query or personnel information query. However, if the question asked by the user involves both attendance system query and personnel information query, the first question answer and the second question answer will be generated at the same time, and finally the first question answer and the second question answer will be combined and output to the user.
[0064] In addition, the system of this application also encrypts the stored and transmitted data to prevent unauthorized access. Strict access control policies are implemented, and data access is limited according to different user permissions, ensuring that only authorized users can access sensitive data. That is, before the user enters the question, the user's identity authority will be authenticated, and only after the authentication is passed can the corresponding human resources information query be performed, thereby ensuring the security of data resource classification, grading, integration and sharing, and preventing information leakage and incorrect sharing. At the same time, the system of this application can also implement real-time data synchronization and update mechanisms to ensure the real-time and accuracy of the data, thereby supporting rapid response and decision-making.
[0065] It can be seen that this application is based on large model technology to develop an intelligent agent that can accurately understand the natural language input by the user, identify the intention behind it, and extract key information fields from it. According to the extracted key fields, through the data interface, the intelligent agent can directly access and retrieve the original data stored in the system. Generate accurate reply answers from the original data, thereby improving the accuracy and response speed of the reply. Using large language model technology, the system can understand and respond to the user's natural language input without the user having to learn a specific query language or menu navigation. And users can easily interact with the system, improving the user experience.
[0066] See also Figure 5 As shown, an embodiment of the present invention discloses a human resources interaction method, including:
[0067] Step S11, determine whether the user's input is the first round of input. If so, split the user's input information based on the thinking tree to obtain a number of sub-information, and use the preset intention recognition agent to recognize the user's intention based on each of the sub-information to determine the type of question input by the user.
[0068] Step S12: If the type is an attendance system query type, the preset retrieval enhancement generation agent is used to collect the company's attendance knowledge documents, convert the attendance knowledge documents into vector representations, and store them in a vector database, and determine the knowledge text that is semantically similar to the question based on the vector database.
[0069] Step S13: input the knowledge text and the question into a large language model according to a preset target template, so as to generate a corresponding first question answer through the large language model, and output the first question answer to the user.
[0070] Step S14: If the type is a personnel information query class, the key values of the key fields corresponding to the question are extracted through the large language model, and the corresponding data interface is called according to the key fields and the key values to obtain the corresponding target data. A data analysis code is generated based on the target data, the target template and the preset code large model, and the data analysis code is executed to generate a corresponding answer to the second question, and the answer to the second question is output to the user.
[0071] In summary, when the present application is conducting human resources interaction, it is first determined whether the user's input is the first round of input. If so, the user's input information is split based on the thinking tree to obtain several sub-information, and the preset intention recognition agent is used to identify the user's intention based on each of the sub-information to determine the type of the question input by the user; if the type is an attendance system query type, the preset retrieval enhancement generation agent is used to collect the company's attendance knowledge documents, convert the attendance knowledge documents into vector representations, and store them in a vector database, and determine the knowledge text with semantic similarity to the question based on the vector database; then the knowledge text and the question are input into the large language model according to the preset target template, so as to generate the corresponding first question answer through the large language model, and output the first question answer to the user; if the type is a personnel information query type, the key value of the key field corresponding to the question is extracted through the large language model, and the corresponding data interface is called according to the key field and the key value to obtain the corresponding target data, and a data analysis code is generated based on the target data, the target template and the preset code large model, and the data analysis code is executed to generate the corresponding second question answer, and the second question answer is output to the user. It can be seen that this application is based on large model technology to develop an intelligent agent that can accurately understand the natural language input by the user, identify the intention behind it, and extract key information fields from it. According to the extracted key fields, through the data interface, the intelligent agent can directly access and retrieve the original data stored in the system. Generate accurate reply answers from the original data, thereby improving the accuracy and response speed of the reply. Using large language model technology, the system can understand and respond to the user's natural language input without the user having to learn a specific query language or menu navigation. And users can easily interact with the system, improving the user experience.
[0072] Furthermore, the present application also discloses an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0073] Figure 6The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the human resources interaction method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0074] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0075] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.
[0076] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and may be Windows Server, Netware, Unix, Linux, etc. In addition to computer programs that can be used to complete the human resources interaction method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.
[0077] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the human resources interaction method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.
[0078] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0079] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0080] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0081] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0082] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A human resources interaction system, characterized in that: include: An intention recognition module is used to determine whether the user's input is the first round of input. If so, the user's input information is split based on the mind tree to obtain a number of sub-information, and a preset intention recognition agent is used to recognize the user's intention based on each of the sub-information to determine the type of question input by the user; A knowledge text determination module is used to collect the attendance knowledge documents of the company by using a preset retrieval enhancement generation agent if the type is an attendance system query class, convert the attendance knowledge documents into vector representations, and store them in a vector database, and determine knowledge texts with semantic similarity to the question based on the vector database; A first question answer generation module, configured to input the knowledge text and the question into a large language model according to a preset target template, so as to generate a corresponding first question answer through the large language model, and output the first question answer to the user; The second question answer generation module is used for extracting the key values of the key fields corresponding to the question through the large language model if the type is a personnel information query class, calling the corresponding data interface according to the key fields and the key values to obtain the corresponding target data, generating a data analysis code based on the target data, the target template and the preset code large model, executing the data analysis code to generate a corresponding second question answer, and outputting the second question answer to the user.
2. The human resources interaction system according to claim 1, characterized in that: Also includes: A judgment module, used for judging whether the user input is a follow-up question of the previous round if the user input is not the first round input; A first judgment result execution module is used for rewriting the question based on the user's historical input question and the current input question to obtain a rewritten question if it is a follow-up question of the previous round, and identifying the user's intention based on the rewritten question; The second judgment result execution module is used to directly jump to the step of splitting the user's input information based on the thinking tree if it is not a follow-up question of the previous round.
3. The human resources interaction system according to claim 1, characterized in that: The knowledge text determination module comprises: A text block conversion unit, used for dividing the attendance knowledge document into a plurality of text blocks, converting each of the text blocks into a vector representation using a preset embedding model, and storing the vector representation in the vector database; A vectorization processing unit, used for inputting the problem into the embedding model for vectorization processing to obtain a target vector; The knowledge text determination unit is used to determine the knowledge text in the vector database that is semantically similar to the target vector based on a preset retrieval model and cosine similarity.
4. The human resources interaction system according to claim 1, characterized in that: Also includes: The mapping table construction module is used to construct a synonym mapping table, a near-synonymous mapping table and an abbreviation mapping table, so as to use a preset intention recognition agent to recognize the user's intention based on each of the sub-information and the mapping table.
5. The human resources interaction system according to claim 1, characterized in that: Also includes: The code selection module is used to generate several codes at the same time by using different types of preset code models in the process of generating the data analysis code, and select the data analysis code that meets the target conditions from the several codes based on the preset code review model.
6. The human resources interaction system according to claim 1, characterized in that: Also includes: A guiding module is used to output a preset fixed answer to the user if the type of the question is small talk, and guide the user to input questions related to the attendance system query type and / or the personnel information query type.
7. The human resources interaction system according to any one of claims 1 to 6, characterized in that: Also includes: The question-answer merging module is used to merge the first question answer and the second question answer to generate a final target question answer if the type of question input by the user is the attendance system query type and the personnel information query type, and output the target question answer to the user.
8. A human resources interaction method, characterized in that: include: Determine whether the user's input is the first round of input. If so, split the user's input information based on the mind tree to obtain a number of sub-information, and use a preset intention recognition agent to recognize the user's intention based on each of the sub-information to determine the type of question input by the user; If the type is an attendance system query, the preset retrieval enhancement generation agent is used to collect the company's attendance knowledge documents, convert the attendance knowledge documents into vector representations, and store them in a vector database, and determine the knowledge texts that are semantically similar to the question based on the vector database; Inputting the knowledge text and the question into a large language model according to a preset target template, so as to generate a corresponding first question answer through the large language model, and outputting the first question answer to the user; If the type is a personnel information query, the key values of the key fields corresponding to the question are extracted through the large language model, and the corresponding data interface is called according to the key fields and the key values to obtain the corresponding target data. A data analysis code is generated based on the target data, the target template and the preset code large model, and the data analysis code is executed to generate a corresponding answer to the second question, and the answer to the second question is output to the user.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the human resources interaction method as claimed in claim 8.
10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the human resources interaction method as claimed in claim 8 is implemented.
Citation Information
Cited By
Intelligent purchase question and answer management method and system based on large language model
CN119807384A
Data processing method for optimizing Agent interpretability, agent and storage medium
CN120671715A