Employee roster query method, device and equipment and storage medium
By using an employee roster query method and a roster query model for slot extraction, structure transformation, and sorting optimization, the problem of cumbersome operation and low efficiency in traditional roster query management is solved, achieving efficient, accurate, and intelligent query results using natural language.
Patent Information
- Application Number
- CN202510783958.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional roster query management relies on relational databases and rule-based query technology, resulting in cumbersome operations and low efficiency. In particular, the response speed is slow when multiple conditions are combined for querying. Furthermore, it has a high learning cost for non-technical personnel, is prone to errors, and cannot provide intelligent query suggestions or result optimization.
The employee roster query method is adopted. By obtaining the natural language query instructions of the target user, the roster query model is used to extract slots, perform structure transformation and sorting optimization to generate the target roster information, avoiding the tedious operation of traditional manual query and improving query speed and accuracy.
It significantly improves query speed and accuracy, lowers the barrier to entry and operational complexity of the system, supports complex query needs, reduces manual intervention and the probability of errors, and provides personalized query results.
Smart Images

Figure CN120804153A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information processing, and particularly relates to an employee roster query method and device, equipment and a storage medium. BACKGROUND
[0002] With the continuous expansion of enterprise scale and the rapid growth of data volume, higher requirements are put forward for the efficiency and flexibility of the roster query management system. The traditional enterprise personnel roster query management mainly relies on relational databases and rule-based query technology, or manual screening and querying through the enterprise's internal HR system. Although these methods can meet the basic query requirements, they have many limitations in actual application.
[0003] For example, users usually need to manually input filtering conditions such as department, position, employment time, etc. in the database or HR system, and complete the query through multiple clicks or inputs. However, this method is not only cumbersome to operate, but also slow in response when facing large-scale data, especially in multi-condition combined queries, and is inefficient. In addition, the traditional query method requires users to be familiar with the operation logic and query rules of the system, which has a high learning cost for non-technical personnel, and manual operation is prone to errors and cannot provide intelligent query suggestions or result optimization. SUMMARY
[0004] The main purpose of the present application is to provide an employee roster query method, device, equipment and storage medium, which aims to solve the problem of cumbersome operation and low efficiency caused by the traditional roster query management mainly relying on relational databases and rule-based query technology.
[0005] To achieve the above purpose, the present application provides an employee roster query method, which comprises:
[0006] obtaining a roster query instruction input by a target user;
[0007] inputting the roster query instruction into a roster query model to obtain target roster information output after sorting by the roster query model, wherein the roster query model performs roster query through word slot extraction, structured conversion and sorting optimization.
[0008] In an embodiment, the inputting the roster query instruction into the roster query model to obtain the target roster information output after sorting by the roster query model comprises:
[0009] obtaining a slot pool word slot extraction prompt word;
[0010] The slot pool word slot extraction prompt word is input into the roster query model together with the roster query instruction, and a word slot name and word slot content contained in the roster query instruction are extracted;
[0011] Based on the word slot name and the word slot content, the target roster information is output after being sorted by the roster query model.
[0012] In an embodiment, the inputting of the slot pool word slot extraction prompt word into the roster query model together with the roster query instruction to extract a word slot name and word slot content contained in the roster query instruction comprises:
[0013] According to the slot pool word slot extraction prompt word, the roster query instruction is subjected to semantic analysis by the roster query model to extract a slot pool word slot of the roster query instruction;
[0014] The word slot information of the slot pool word slot is determined;
[0015] The word slot information is matched with field information in a preset interface document to extract a word slot name and word slot content contained in the roster query instruction.
[0016] In an embodiment, the outputting of the target roster information after being sorted by the roster query model based on the word slot name and the word slot content comprises:
[0017] The word slot name and the word slot content are converted into a structured query instruction;
[0018] According to the structured query instruction, a human resource system interface is called for query by the roster query model to obtain roster query information;
[0019] The roster query information is sorted and optimized, and the target roster information is output after being sorted by the roster query model.
[0020] In an embodiment, the sorting and optimization of the roster query information and the outputting of the target roster information after being sorted by the roster query model comprises:
[0021] A user sorting rule is obtained;
[0022] According to the user sorting rule, the roster query information is sorted to obtain first roster information;
[0023] The first roster information is adapted to a preset result optimization rule to obtain the target roster information, so that the target roster information is output after being sorted by the roster query model.
[0024] In an embodiment, the obtaining the user sorting rule comprises:
[0025] performing entity sequence analysis on the roll call query instruction to extract sorting information corresponding to each entity in the roll call query instruction;
[0026] According to the sorting information, each entity is adaptively sorted with a preset rule model to generate the user sorting rule.
[0027] In an embodiment, the outputting the target roll call information after sorting by the roll call query model comprises:
[0028] obtaining a roll call output prompt word and a hyperlink corresponding to the target roll call information;
[0029] associating the roll call output prompt word with the hyperlink corresponding to the target roll call information and inputting them into the roll call query model to obtain roll call combination return information output by the roll call query model, so as to output the target roll call information.
[0030] In addition, to achieve the above-mentioned purpose, the present application also provides an employee roll call query device, which comprises:
[0031] an instruction obtaining module configured to obtain a roll call query instruction;
[0032] a model output module configured to input the roll call query instruction into a roll call query model to obtain target roll call information output after sorting by the roll call query model, wherein the roll call query model performs roll call query through word slot extraction, structured conversion and sorting optimization.
[0033] In addition, to achieve the above-mentioned purpose, the present application also provides an employee roll call query device, which comprises: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the employee roll call query method as described above.
[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the employee roll call query method as described above.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the employee roll call query method as described above.
[0036] The application provides an employee roster query method and device, equipment and storage medium, the employee roster query method is through obtaining the roster query instruction input by the target user, and then inputting the roster query instruction into the roster query model, obtaining the target roster information output after the roster query model is sorted, wherein the roster query model carries out roster query through word slot extraction, structured conversion and sorting optimization, so that the natural language input query instruction is used, without being familiar with complex query syntax or operation interface, thereby avoiding the tedious operation of multiple inputs and clicks in traditional manual query, significantly improving the query speed, especially when multiple condition combination queries are used, the effect is more obvious, and the user can express the query intention in natural language, without remembering complex query syntax or operation steps, greatly reducing the use threshold and operation complexity of the system, thereby reducing artificial intervention, reducing the error probability, improving the query accuracy, and supporting complex query requirements. BRIEF DESCRIPTION OF DRAWINGS
[0037] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings required to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0039] Figure 1 The flowchart provided for the employee roster query method embodiment one of the present application;
[0040] Figure 2 The scene example graph provided for the employee roster query method of the present application about user configuration;
[0041] Figure 3 The scene example graph provided for the employee roster query method of the present application about sorting test;
[0042] Figure 4 The scene example graph provided for the employee roster query method of the present application about model output;
[0043] Figure 5 The brief flowchart provided for the employee roster query method of the present application;
[0044] Figure 6 The module structure diagram of the employee roster query device of the present application embodiment;
[0045] Figure 7A device structure schematic diagram of a hardware operating environment involved in an employee roster query method in an embodiment of the present application.
[0046] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not intended to limit the present application.
[0048] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the drawings and specific embodiments.
[0049] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a big data service platform, an employee roster query system, etc. capable of realizing the above functions. The present embodiment and the following embodiments will be described below taking the employee roster query system as an example.
[0050] Based on this, the present embodiment provides an employee roster query method, which will be described in detail with reference to Figure 1 , Figure 1 A flowchart provided by the employee roster query method embodiment one of the present application.
[0051] In the present embodiment, the employee roster query method comprises steps S11-S12:
[0052] Step S11, obtaining a roster query instruction input by a target user;
[0053] It should be noted that the target user refers to a person using the roster query system, such as a human resource manager, a management layer or other personnel needing to query employee information of an enterprise, etc. The roster query instruction refers to a query request input by the user in natural language, such as "querying employees aged between 30 and 35 years old with a bachelor's degree", so that the system can understand the user's query intention and convert it into a processable query condition.
[0054] Specifically, the user can input "querying employees aged between 30 and 35 years old with a bachelor's degree" through voice, and the system converts the voice into a text form of query instruction through a voice recognition module. It can also directly input the roster query instruction in text on the page to adapt to the use habits of different users, so as to realize the expression of query requirements in natural language by the user, without the need for the user to be familiar with complex query syntax or operation interface, greatly reducing the use threshold of the system.
[0055] In step S12, the roster query instruction is input into a roster query model to obtain target roster information output by the roster query model after sorting.
[0056] It should be noted that the roster query model refers to a model based on natural language processing and semantic understanding, which is used to analyze the user's query instruction and generate a query result. The word slot extraction refers to a process of identifying key information from a user's natural language instruction, such as extracting the word slot name "age" and the corresponding word slot content "30-35 years old" and "bachelor's degree" from the instruction "query employees aged 30-35 years old with a bachelor's degree". The structured conversion refers to a process of converting the extracted word slot name and word slot content into a structured query instruction that can be recognized and processed by a backend system. The sorting optimization refers to sorting the query results to meet the user's query requirements and improve the readability of the results. The natural language query instruction of the user is converted into a structured query instruction, and the sorted roster information is generated by the query model. Through word slot extraction, the system can accurately understand the user's query intention. Through structured conversion, the system can convert the user's natural language instruction into a format that can be processed by the backend system. Through sorting optimization, the system can generate a query result that better meets the user's needs. In one possible implementation, the query model can combine the user's historical query records and preferences to optimize the sorting rules to provide more personalized query results.
[0057] Specifically, the slot pool word slot extraction prompt word is obtained, and then the slot pool word slot extraction prompt word and the roster query instruction are input into the roster query model to extract the word slot name and the word slot content contained in the roster query instruction, so as to output the target roster information through the roster query model based on the word slot name and the word slot content after sorting.
[0058] The embodiment obtains a roll call query instruction input by a target user, and then inputs the roll call query instruction into a roll call query model to obtain target roll call information output by the roll call query model after sorting. The roll call query model performs roll call query through word slot extraction, structured conversion and sorting optimization, so that the query instruction is input by using natural language, without the need to be familiar with complex query syntax or operation interface, thereby avoiding the cumbersome operation of multiple inputs and clicks in traditional manual query, significantly improving the query speed, especially when multiple conditions are combined, and allowing the user to express the query intention in natural language without the need to remember complex query syntax or operation steps, thereby greatly reducing the use threshold and operation complexity of the system, and further reducing the manual intervention, reducing the error probability, improving the query accuracy, and supporting complex query requirements.
[0059] In a possible implementation, the inputting of the roll call query instruction into the roll call query model to obtain the target roll call information output by the roll call query model after sorting includes:
[0060] In step S21, a slot pool word slot extraction prompt word is obtained.
[0061] It should be noted that the slot pool word slot extraction prompt word refers to a set of preset instructions or rules for guiding the roll call query model to extract key information from the natural language query instruction, which usually includes word slot names and their corresponding possible expression methods, helping the model to more accurately identify the query conditions in the user input. For example, for the “age” field, the prompt word can include “age”, “age”, “how old”, and the corresponding structured expression method, such as “age: specific value or range”.
[0062] Specifically, the slot pool word slot extraction prompt word is obtained. In an embodiment, the system predefines a slot pool word slot extraction prompt word library, and the slot pool word slot extraction prompt word can be set as “you need to complete the information extraction task, extract the slot pool word slot from the user input sentence, output the JSON format slot name and slot content list, and return an empty list if no extraction is performed”, thereby providing the roll call query model with clear extraction rules so that the model can accurately identify the word slot name and word slot content from the user's natural language query instruction, enabling the system to better understand the user's query intention and convert it into structured information that can be processed. In a possible implementation, the prompt word can be predefined through a configuration file, or dynamically generated through machine learning to adapt to different query scenarios and user habits, which can be referred to as Figure 2 , Figure 2 The scene example graph provided by the employee roll call query method of the present application for user configuration.
[0063] Step S22, input the slot pool word slot extraction prompt word and the roster query instruction into the roster query model, extract the word slot name and the word slot content contained in the roster query instruction;
[0064] It should be noted that the word slot name refers to the roster field involved in the user query instruction, such as "age", "education", "department", etc.; the word slot content refers to the specific value or condition corresponding to the word slot name, such as "30 to 35 years old", "bachelor's degree", "technical department", etc.
[0065] Specifically, according to the slot pool word slot extraction prompt word, the roster query instruction is analyzed by the roster query model, the slot pool word slot of the roster query instruction is extracted, and the word slot information of the slot pool word slot is determined, so as to match the word slot information with the field information in the preset interface document, extract the word slot name and the word slot content contained in the roster query instruction, so that the model recognizes the key information in the query instruction through semantic analysis and pattern matching, and converts it into structured word slot name and word slot content, thereby improving the accuracy of information extraction. In one possible implementation, the model can use a deep learning algorithm such as BERT or Transformer in combination with a preset prompt word to achieve efficient semantic analysis and information extraction.
[0066] Step S23, based on the word slot name and the word slot content, the target roster information is output by the roster query model after sorting.
[0067] It should be noted that the target roster information refers to the roster query result generated according to the user query instruction and sorted and optimized. The sorting optimization refers to sorting the query result according to the user's query requirements and the preset sorting rules, so as to be more intuitive to the user. For example, the user may wish to sort by employee's employment time, age or department.
[0068] Specifically, the word slot name and the word slot content are converted into a structured query instruction, and then according to the structured query instruction, the roster query model is called to query the human resource system interface to obtain roster query information, so as to sort and optimize the roster query information, and output the target roster information after sorting by the roster query model. Wherein, the roster output prompt word and the hyperlink corresponding to the target roster information are obtained, and then the roster output prompt word and the hyperlink corresponding to the target roster information are associated and input into the roster query model to obtain the roster combination return information output by the roster query model, so as to output the target roster information. In a possible implementation, the model can dynamically adjust the sorting rule according to the query history and preference of the user, so as to provide more personalized query results.
[0069] In this embodiment, the slot pool word slot extraction prompt word is obtained, and then the slot pool word slot extraction prompt word and the roster query instruction are input into the roster query model to extract the word slot name and the word slot content contained in the roster query instruction, so as to output the target roster information after sorting by the roster query model based on the word slot name and the word slot content. Then, the prompt word of the key information is extracted from the natural language input by the user, the misunderstanding caused by the ambiguity of the natural language is avoided, the accuracy of the query is improved, and various query methods, different fields and query conditions are adapted. Different expression methods are recognized and unified into standard word slot name and word slot content, so as to enhance the flexibility of the system. In addition, the user does not need to be familiar with complex query syntax or operation interface, but only needs to input query instruction using natural language, so that even non-technical personnel can easily use the system for query, and the use threshold of the system is reduced.
[0070] In a possible implementation, the inputting of the slot pool word slot extraction prompt word and the roster query instruction into the roster query model to extract the word slot name and the word slot content contained in the roster query instruction includes:
[0071] In step S31, according to the slot pool word slot extraction prompt word, the roster query instruction is analyzed by the roster query model to extract the slot pool word slot of the roster query instruction.
[0072] It should be noted that the slot pool word slot refers to the key information extracted from the query instruction, which usually corresponds to the word slot name and the word slot content in the roster.
[0073] Specifically, the slot pool word slot is extracted as a prompt word, the roster query instruction is analyzed semantically by the roster query model, and the slot pool word slot of the roster query instruction is extracted, so that the key information in the user query instruction is accurately identified. In an embodiment, the model can identify the word slot name and its corresponding word slot content in the user input through the slot pool word slot extraction prompt word, for example, extracting the "age" and "education" fields and their corresponding word slot content "30 to 35 years old" and "bachelor's degree" from "query employees with age between 30 to 35 years old and education of bachelor's degree".
[0074] Step S32, determining the word slot information of the slot pool word slot;
[0075] It should be noted that the word slot information refers to the organization form and format of the slot pool word slot, which defines the corresponding relationship between the word slot name and the word slot content and their syntax structure. For example, the slot structure can define the separator (such as colon or comma) between the word slot name and the word slot content, or the order of the word slot name and the word slot content, so as to better understand and process the slot pool word slot, so as to match it with the preset interface document.
[0076] Specifically, the word slot information of the slot pool word slot is determined, and in an embodiment, the word slot information of the slot pool (such as colon: the slot name before the colon, the slot description after the colon, gender: male / female) is marked to clearly define the organization form and format of the slot pool word slot, so that the system can better understand the corresponding relationship between the word slot name and the word slot content in the slot pool word slot, thereby improving the accuracy and efficiency of information extraction. In a possible implementation, the slot structure can be defined as "word slot name: word slot content", for example, "age: 30 to 35 years old" and "education: bachelor's degree".
[0077] Step S33, matching the word slot information with the field information in the preset interface document, and extracting the word slot name and the word slot content contained in the roster query instruction.
[0078] It should be noted that the preset interface document refers to the mapping relationship between the word slot name and the word slot content defined by the system in advance, which is used to match the extracted slot pool word slot with the fields of the backend database. The matching process refers to comparing the word slot name and the word slot content in the slot pool word slot with the word slot name and the word slot content in the preset interface document, so as to extract the word slot name and the word slot content in the roster query instruction.
[0079] Specifically, according to the word slot information, the slot pool word slot is matched with the preset interface document, and the word slot name and the word slot content contained in the roll call query instruction are extracted, so that the system can convert the natural language query instruction input by the user into a structured query condition, providing a basis for subsequent database query operations.
[0080] In an embodiment, by comparing the word slot name and the word slot content in the slot pool word slot with the word slot name and the word slot content in the preset interface document, the structured word slot name and the word slot content are extracted. For example, the slot pool word slot "age: 30 to 35 years old" matches the word slot name "age" and the word slot content "30 to 35 years old" in the preset interface document, thereby extracting the word slot name "age" and the word slot content "30 to 35 years old".
[0081] The embodiment extracts the prompt word according to the slot pool word slot, performs semantic analysis on the roll call query instruction through the roll call query model, extracts the slot pool word slot of the roll call query instruction, and further determines the word slot information of the slot pool word slot. Therefore, the word slot information is matched with the field information in the preset interface document, the word slot name and the word slot content contained in the roll call query instruction are extracted, and the key information in the user input is identified and extracted, so that the model better understands the diversity and complexity of natural language, thereby more accurately extracting the word slot name and the word slot content, improving the accuracy of semantic understanding, significantly improving the accuracy of extracting key information from natural language, reducing misunderstanding caused by ambiguity or ambiguous expression, and not only supporting simple single-field queries, but also being able to handle complex multi-condition combination queries. For example, the user can input "query employees with age between 30 and 35, education as undergraduate, and department as technology department", the system can extract multiple fields and their contents through semantic analysis and prompt word extraction, and generate corresponding structured query instructions, thereby realizing complex query requirements and enhancing the flexibility and adaptability of the system.
[0082] In a feasible implementation, the target roll call information is output by the roll call query model after sorting based on the word slot name and the word slot content, including:
[0083] In step S41, the word slot name and the word slot content are converted into a structured query instruction.
[0084] It should be noted that the structured query instruction refers to a query statement conforming to the database query language (such as SQL) specification, which is used to retrieve data from the database.
[0085] Specifically, the word slot name and the word slot content are converted into a structured query instruction, that is, the word slot name and the word slot content extracted from the user query instruction are converted into a structured query instruction according to the specification of the database query language, so as to generate a query instruction conforming to the specification of the database query language, thereby improving the accuracy and efficiency of the query. The system can use a preset mapping rule to convert the word slot name and the word slot content into a structured query instruction, which is not limited herein and can be set according to actual conditions.
[0086] For example, the user inputs a query instruction "query employees with an age of 30 to 35 years old and a bachelor's degree", the system extracts the word slot name "age" and the word slot content "30 to 35 years old", and the word slot name "education" and the word slot content "bachelor's degree", and then the system converts these information into a structured query instruction SELECT*FROM employees WHERE age BETWEEN 30 AND 35 AND education='bachelor's degree'.
[0087] In step S42, the roster query information is obtained by calling the human resource system interface for querying through the roster query model according to the structured query instruction.
[0088] It should be noted that the human resource system interface refers to an API interface provided by an enterprise human resource management system for data interaction with external systems. By calling the human resource system interface, the roster query model can pass the structured query instruction to the human resource system to obtain the roster query information.
[0089] Specifically, the structured query instruction is passed to the human resource system interface through the roster query model, so as to obtain the roster query information from the human resource system, thereby realizing seamless connection between the user query request and the enterprise back-end data system and ensuring the accuracy and real-time performance of the query.
[0090] For example, the structured query instruction "SELECT*FROM employees WHERE age BETWEEN 30 AND 35 AND education='bachelor's degree'" is passed to the human resource system interface through the roster query model, so that the human resource system interface receives the query instruction, retrieves the employee information meeting the conditions from the database, that is, the roster query information, and returns the roster query information to the roster query model.
[0091] In step S43, the roster query information is sorted and optimized, and the target roster information is output after sorting through the roster query model.
[0092] Specifically, the user sorting rule is obtained, and then the roster query information is sorted according to the user sorting rule to obtain first roster information, so that the first roster information is adapted to the preset result optimization rule to obtain the target roster information, so that the target roster information is output after the roster query model sorting, thereby generating a query result more in line with user needs and presenting in a user-friendly manner. In one possible implementation, the system can dynamically adjust the sorting rule according to the sorting requirement in the user's query instruction, which can be Figure 3 , Figure 3 The scene example graph for the sorting test provided by the employee roster query method of the present application.
[0093] The embodiment converts the word slot name and the word slot content into a structured query instruction, and then queries the human resource system interface through the roster query model according to the structured query instruction to obtain roster query information, so that the roster query information is sorted and optimized, and the target roster information is output after the roster query model sorting, so that the query request can be efficiently understood and processed by the backend database and can be directly executed by the database engine, thereby reducing the parsing and processing time, realizing seamless connection with the existing system of the enterprise, avoiding the tedious process of manual query and data conversion, significantly improving the query efficiency, and reducing the ambiguity and ambiguity that may occur in natural language queries by defining the query conditions through clear word slot name and word slot content, avoiding misunderstanding caused by unclear natural language expression, thereby improving the query accuracy and supporting complex multi-condition combined query.
[0094] In one possible implementation, the sorting and optimization of the roster query information and the output of the target roster information after the roster query model sorting include:
[0095] Step S51, obtaining a user sorting rule;
[0096] It should be noted that the user sorting rule refers to the rule specified by the user in the query instruction for sorting the query result, such as sorting by fields such as time of employment, age, or department.
[0097] Specifically, the entity sequence of the roster query instruction is analyzed, and the sorting information corresponding to each entity in the roster query instruction is extracted, and then each entity is adapted and sorted with a preset rule model according to the sorting information to generate the user sorting rule.
[0098] Step S52, sorting the roster query information according to the user sorting rule to obtain first roster information;
[0099] It should be noted that the roster query information refers to the original query results obtained from the human resource system interface, which are usually not sorted.
[0100] Specifically, the roster query information is sorted according to the user sorting rule to obtain first roster information. By applying the user-specified sorting rule to sort the original query results, the results are more in line with the user's expectations.
[0101] In an embodiment, the sorting function of the database (such as the ORDER BY statement in SQL) is used to implement the sorting operation. The query results are sorted according to the user sorting rule ORDER BY hire_date ASC (sort by hire date) to obtain the first roster information, as shown in Table 1:
[0102] Table 1
[0103] Employee Name Age Education Time of Entry Zhang San 32 Bachelor's Degree 2018 / 5 / 10 Li Si 31 Bachelor's Degree 2019 / 7 / 15 Wang Wu 34 Bachelor's Degree 2020 / 3 / 20
[0104] In step S53, the first roster information is adapted to the preset result optimization rule to obtain the target roster information, so that the target roster information is output after sorting by the roster query model.
[0105] It should be noted that the preset result optimization rule refers to the optimization rule defined by the system in advance, which is used to further adjust and optimize the sorted results. It can be dynamically adjusted according to the user's query history, preferences or business requirements to provide query results that meet the user's expectations. This is not limited.
[0106] Specifically, the first roster information is adapted to the preset result optimization rule to obtain the target roster information, which can be referred to Figure 4 , Figure 4 The scene example diagram provided by the employee roster query method of the present application for model output is used to output the target roster information after sorting by the roster query model. For example, assume that the preset result optimization rule is "if the query result contains multiple employees with the same hire date, sort them by age from old to young". The system further optimizes the sorted results to obtain the target roster information, as shown in Table 2:
[0107] Table 2
[0108] Employee Name Age Education Time of Entry Zhang San 32 Bachelor's Degree 2018 / 5 / 10 Wang Wu 34 Bachelor's Degree 2019 / 7 / 15 Li Si 31 Bachelor's Degree 2019 / 7 / 15
[0109] The embodiment obtains a user sorting rule, sorts the roll call query information according to the user sorting rule to obtain first roll call information, adapts the first roll call information to a preset result optimization rule to obtain the target roll call information, outputs the target roll call information through the roll call query model sorting, sorts the query result according to the specific needs of the user, helps the user to find the information they care most quickly, thereby improving the satisfaction of the user, significantly improving the response speed and query efficiency of the query, improving the accuracy and reliability of the query result, and dynamically adjusting the sorting rule according to different query requirements, for example, the user may wish to sort by employment time in one query, and wish to sort by age in another query, so that the system can flexibly adapt to these changes, provide diversified sorting options, adapt to different user needs, improve the universality and applicability of the system, and support complex query requirements.
[0110] In a possible implementation, the obtaining a user sorting rule comprises:
[0111] Step S61, performing entity sequence analysis on the roll call query instruction to extract sorting information corresponding to each entity in the roll call query instruction;
[0112] It should be noted that the entity sequence analysis refers to parsing the natural language query instruction input by the user, and identifying the key entity (such as the word slot name) and the corresponding sorting information (such as ascending or descending) thereof. The sorting information refers to the sorting of each entity in the roll call query instruction.
[0113] Specifically, through natural language processing (NLP) technology, the key fields (such as “employment time” and “age”) in the query instruction and the sorting of the entities are identified. In a possible implementation, the system can use morphological analysis, syntactic analysis and other technologies, in combination with a preset keyword library, to extract the sorting information in the query instruction.
[0114] Step S62, adapting and sorting each entity to a preset rule model according to the sorting information to generate the user sorting rule.
[0115] It should be noted that the preset rule model refers to a sorting rule template defined by the system in advance, which is used to convert the sorting information specified by the user into a sorting rule that can be understood and executed by the system.
[0116] Specifically, a preset rule model is used to convert user-specified sorting information into specific sorting rules. For example, "Sort by hire date from earliest to latest" is converted into ORDER BY hire_date ASC, ensuring that the system's sorting operations accurately reflect the user's intent. In one possible implementation, the system can generate specific sorting rules based on the extracted sorting information and the mapping relationships in the preset rule model.
[0117] For example, if a user's query includes multiple conditions such as gender, political status, age, school name, school type, major, education, organization, department, position, and personnel tags, the returned text should be arranged according to the structure of "As of [date], [organization] [department] [education] [degree] graduated from [school name] [school type] [major] major [personnel tag 1, personnel tag 2] aged between [age] and [gender] [political status] [position], there are a total of [interface data] people."
[0118] Alternatively, in one embodiment, a user sorting rule template may be: "As of [date], [institution] [department] [education] graduated from [school name] [school type] [major] [personnel tag 1, personnel tag 2] aged between [age] and [gender] [political status] [position], there are a total of [interface data] people." If there is no age start, such as under 30 years old, then "age is below [age end]"; if there is no age end, such as over 45 years old, then "age is above [age start]"; if there is both a start and an end to age, such as between 30 and 45 years old, then "age is between [age start] and [age end]."
[0119] This embodiment performs entity sequence analysis on the roster query instruction, extracts the sorting information corresponding to each entity in the roster query instruction, and then adapts and sorts each entity with a preset rule model based on the sorting information to generate the user sorting rule, thereby identifying the key entities (such as word slot names) in the user input and their corresponding sorting information (such as ascending or descending order), ensuring that the system accurately understands the user's sorting requirements, avoids misunderstandings caused by the ambiguity of natural language, improves the accuracy of sorting, and flexibly handles multiple sorting requirements to meet the query requirements of different users in different scenarios, enhances the flexibility and adaptability of the system, and enables even non-technical personnel to easily use the system for queries, thereby lowering the threshold for using the system.
[0120] In a feasible implementation manner, outputting the target roster information after sorting by the roster query model includes:
[0121] Step S71, obtaining a roster output prompt word and a hyperlink corresponding to the target roster information;
[0122] It should be noted that the roll call output prompt word refers to the prompt text attached by the system when showing the query result to the user to help the user better understand the result content. For example, "the query result is as follows:" or "the following is the employee information that meets the conditions:" and the like. The hyperlink corresponding to the target roll call information refers to the link associated with each entry in the query result, and the user can obtain more detailed information such as the detailed work experience and contact information of the employee by clicking the link.
[0123] Specifically, the roll call output prompt word and the hyperlink corresponding to the target roll call information are obtained, which provides a clearer and more friendly query result display mode for the user, and shows a structured and easy-to-understand query result page to the user.
[0124] In step S72, the roll call output prompt word and the hyperlink corresponding to the target roll call information are associated and input into the roll call query model to obtain the roll call combined return information output by the roll call query model, so as to output the target roll call information.
[0125] Specifically, the roll call output prompt word and the hyperlink corresponding to the target roll call information are associated and input into the roll call query model to obtain the roll call combined return information output by the roll call query model, so as to output the target roll call information, that is, the roll call output prompt word and the employee information hyperlink of the human resource system are combined with the roll call query model to generate a comprehensive query result display, which not only displays the sorted roll call information, but also provides detailed personal information for each employee through the hyperlink, so that the user can quickly view the detailed information of each employee by clicking the hyperlink without additional query operation, greatly improving the practicality and user experience of the query result.
[0126] In this embodiment, the roll call output prompt word and the hyperlink corresponding to the target roll call information are obtained, and then the roll call output prompt word and the hyperlink corresponding to the target roll call information are associated and input into the roll call query model to obtain the roll call combined return information output by the roll call query model, so as to output the target roll call information, so as to show the query result to the user in a more intuitive and easy-to-understand manner, and allow the user to directly click the link to obtain more detailed information without manually inputting query conditions or navigating to other pages, so that the presentation of the query result is more friendly and convenient, the user can quickly obtain the required information, reduce the operation steps, improve the overall use experience, enhance the interactivity of the information, so that the user can more efficiently browse and filter data, while supporting the display and navigation of complex data, improving the flexibility and expansibility of the system.
[0127] Exemplarily, to facilitate the understanding of the implementation process of the employee roster query method, please refer to Figure 5 , Figure 5 The employee roster query method provided by the present application provides a brief process example diagram.
[0128] Specifically, the implementation process of the scheme in the figure starts with the user inputting the query intention through natural language, and then the large model performs semantic analysis on the user's input to identify valid query conditions. If the identification is successful, the system will extract these query conditions and convert them into structured query instructions, and then call the backend human resource system interface to obtain the corresponding data. Next, the large model intelligently sorts and optimizes the obtained data to ensure that the query results are both accurate and meet the user's expectations. Then, the system generates easy-to-understand query result rhetoric according to the preset template, and associates the roster output prompt word with the hyperlink corresponding to the target roster information, and finally outputs the roster combination return information through the roster query model to present the target roster information in a user-friendly manner. If the initial query condition identification fails, the system returns a prompt asking the user to re-input, thereby not only improving the query efficiency and reducing the operation complexity, but also optimizing the user experience, providing an intelligent and low-threshold query management method.
[0129] It should be noted that the examples in the figure are only used to understand the present application and do not constitute a limitation on the employee roster query method of the present application. Further simple transformations based on this technical concept are within the scope of protection of the present application.
[0130] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0131] The present application also provides an employee roster query device, please refer to Figure 6 , the employee roster query device comprises:
[0132] The instruction acquisition module 61 is configured to acquire a roster query instruction.
[0133] The model output module 62 is configured to input the roster query instruction into a roster query model to obtain target roster information output by the roster query model after sorting, wherein the roster query model performs roster query through slot extraction, structured conversion, and sorting optimization.
[0134] The employee roster query device is also configured to:
[0135] Acquire slot pool slot extraction prompt words.
[0136] The slot pool word slot extraction prompt word is input into the roster query model together with the roster query instruction, and a word slot name and word slot content contained in the roster query instruction are extracted;
[0137] Based on the word slot name and the word slot content, the target roster information is output after being sorted by the roster query model.
[0138] The employee roster query device is further configured to:
[0139] According to the slot pool word slot extraction prompt word, the roster query instruction is subjected to semantic analysis by the roster query model, and a slot pool word slot of the roster query instruction is extracted.
[0140] The word slot information of the slot pool word slot is determined.
[0141] The word slot information is matched with field information in a preset interface document, and a word slot name and word slot content contained in the roster query instruction are extracted.
[0142] The employee roster query device is further configured to:
[0143] The word slot name and the word slot content are converted into a structured query instruction.
[0144] According to the structured query instruction, the roster query model is used to call a human resource system interface for query, and roster query information is obtained.
[0145] The roster query information is sorted and optimized, and the target roster information is output after being sorted by the roster query model.
[0146] The employee roster query device is further configured to:
[0147] A user sorting rule is obtained.
[0148] According to the user sorting rule, the roster query information is sorted, and first roster information is obtained.
[0149] The first roster information is adapted to a preset result optimization rule, and the target roster information is obtained, so that the target roster information is output after being sorted by the roster query model.
[0150] The employee roster query device is further configured to:
[0151] An entity order analysis is performed on a roster query instruction, and sorting information corresponding to each entity in the roster query instruction is extracted.
[0152] According to the sorting information, each of the entities is adaptively sorted according to a preset rule model, and the user sorting rule is generated.
[0153] The employee roster query device is further configured to:
[0154] obtain a roster output prompt word and a hyperlink corresponding to the target roster information;
[0155] associate the roster output prompt word with the hyperlink corresponding to the target roster information and input the same into the roster query model to obtain a roster combination return information output by the roster query model, so as to output the target roster information.
[0156] The employee roster query device provided in the present application adopts the employee roster query method in the above embodiments and can solve the technical problems in the background art. Compared with the prior art, the employee roster query device provided in the present application has the same beneficial effects as the employee roster query method provided in the above embodiments, and other technical features in the employee roster query device are the same as the features disclosed in the above embodiments, which will not be repeated here.
[0157] The present application provides an employee roster query device, which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the employee roster query method in Embodiment I.
[0158] Reference will now be made to the drawings, and specific language will be used to describe the same. Figure 7 The employee roster query device provided in the present application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 7 The employee roster query device shown is merely an example and should not impose any limitation on the functions and use range of the present application.
[0159] As Figure 7As shown, the employee roster query device can include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory 1002 or loaded from a storage device 1003 into a random access memory 1004. Various programs and data required for operation of the employee roster query device are also stored in the random access memory 1004. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other by a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the employee roster query device to communicate wirelessly or wired with other devices to exchange data. Although the employee roster query device is shown with various systems, it should be understood that all of the shown systems are not required to be implemented or possessed. More or fewer systems can be alternatively implemented or possessed.
[0160] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication device, or installed from the storage device 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.
[0161] The employee roster query device provided by the present disclosure adopts the employee roster query method in the above embodiments, and can solve the technical problems in the background art. Compared with the prior art, the employee roster query device provided by the present disclosure has the same beneficial effects as the employee roster query method provided by the above embodiments, and other technical features in the employee roster query device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0162] It should be understood that portions of the application disclosed can be implemented in hardware, software, firmware, or combinations thereof. In the description of the embodiments above, specific features, structures, materials or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0163] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Any changes and modifications that can be made to the application in light of the teachings described herein are contemplated in the broad scope of the application. Accordingly, the scope of the application should be determined not with reference to the above description but with reference to the claims appended hereto.
[0164] The application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e., a computer program) for performing the employee roster query method in the above-described embodiments.
[0165] The computer readable storage medium provided by the application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination thereof.
[0166] The above-described computer readable storage medium can be included in the employee roster query device; or can exist separately and not be assembled into the employee roster query device.
[0167] The above-described computer readable storage medium carries one or more programs, which, when executed by the employee roster query device, cause the employee roster query device to:
[0168] Obtain a roll call query instruction input by a target user;
[0169] Input the roll call query instruction into a roll call query model to obtain target roll call information output by the roll call query model after sorting, wherein the roll call query model performs roll call query through word slot extraction, structured conversion and sorting optimization.
[0170] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0171] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified functions. It should also be noted that, in some alternative implementations, the functions noted in the blocks can occur in a different order than that noted in the figure. For example, two blocks noted in succession can in fact be executed substantially concurrently or in the opposite order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flow diagrams, and combinations of blocks in the block diagrams and / or flow diagrams, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware-based systems and computer instructions.
[0172] The modules involved in the embodiments of the present application can be implemented in a software manner or in a hardware manner. In some cases, the name of the module does not constitute a limitation on the module itself.
[0173] The readable storage medium provided by the application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the above-mentioned staff roster query method, and can solve the technical problems in the background art. Compared with the prior art, the computer readable storage medium provided by the application has the same beneficial effects as the staff roster query method provided by the above-mentioned embodiments, which will not be repeated here.
[0174] The embodiment of the application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the above-mentioned staff roster query method.
[0175] The computer program product provided by the application can solve the technical problems in the background art. Compared with the prior art, the computer program product provided by the embodiment of the application has the same beneficial effects as the staff roster query method provided by the above-mentioned embodiments, which will not be repeated here.
[0176] The above-mentioned is only part of the embodiments of the application, and does not limit the patent scope of the application, and any equivalent structural transformation, direct / indirect application in other related technical fields under the technical concept of the application, and the contents of the specification and the drawings are included in the patent protection scope of the application.
Claims
1. A method for querying employee roster, characterized in that: include: Get the roster query command input by the target user; The roster query instruction is input into the roster query model to obtain target roster information output after sorting by the roster query model, wherein the roster query model performs roster query through word slot extraction, structured conversion and sorting optimization.
2. The employee roster query method according to claim 1, wherein: The step of inputting the roster query instruction into the roster query model to obtain target roster information output after sorting by the roster query model includes: Get the slot pool word slot extraction prompt word; Inputting the slot pool word slot extraction prompt word and the roster query instruction into the roster query model, extracting the word slot name and word slot content contained in the roster query instruction; Based on the word slot name and the word slot content, the target roster information is output after being sorted by the roster query model.
3. The employee roster query method according to claim 2, wherein: The step of inputting the slot pool word extraction prompt word and the roster query instruction into the roster query model and extracting the word slot name and word slot content contained in the roster query instruction includes: Extracting prompt words according to the slot pool word slot, performing semantic analysis on the roster query instruction through the roster query model, and extracting the slot pool word slot of the roster query instruction; Determining word slot information of the word slot in the slot pool; The word slot information is matched with the field information in the preset interface document, and the word slot name and word slot content contained in the roster query instruction are extracted.
4. The employee roster query method according to claim 2, wherein: Outputting the target roster information after sorting based on the slot name and the slot content through the roster query model includes: Converting the word slot name and the word slot content into a structured query instruction; According to the structured query instruction, the HR system interface is called through the roster query model to perform a query to obtain roster query information; The roster query information is sorted and optimized, and the target roster information is output after being sorted by the roster query model.
5. The employee roster query method according to claim 4, characterized in that: The step of optimizing the sorting of the roster query information and outputting the target roster information after sorting the roster query information according to the roster query model includes: Get user sorting rules; sorting the roster query information according to the user sorting rule to obtain first roster information; The first roster information is adapted to a preset result optimization rule to obtain the target roster information, and the target roster information is output after being sorted by the roster query model.
6. The employee roster query method according to claim 5, characterized in that: The obtaining of user sorting rules includes: Performing entity sequence analysis on the roster query instruction to extract sorting information corresponding to each entity in the roster query instruction; According to the sorting information, each of the entities is adapted and sorted with a preset rule model to generate the user sorting rule.
7. The employee roster query method according to claim 2, wherein: Outputting the target roster information after sorting by the roster query model includes: Obtaining a roster output prompt word and a hyperlink corresponding to the target roster information; The roster output prompt word is associated with the hyperlink corresponding to the target roster information and input into the roster query model to obtain the roster combination return information output by the roster query model to output the target roster information.
8. An employee roster query device, characterized in that: include: Instruction acquisition module, used to obtain roster query instructions; The model output module is used to input the roster query instruction into the roster query model to obtain the target roster information output after the roster query model is sorted, wherein the roster query model performs roster query through word slot extraction, structured conversion and sorting optimization.
9. An employee roster query device, characterized in that: The employee roster query device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the employee roster query method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the employee roster query method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for solving conflicts under multiple conditions of voice retrieval
CN113420124A
Data processing method and device, equipment and storage medium
CN117971944A