Task processing method, device, equipment and medium based on police big model
Through the police big model to obtain and analyze user requests, generate and plan police tasks, and combine long-term and short-term memory to optimize task execution, the problem of hallucination and output instability of the big model in police applications is solved, and the task planning is improved Accuracy and stability enhance the ability to support police operations.
Patent Information
- Application Number
- CN202410480421.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-04-22
AI Technical Summary
In police application scenarios, large models have hallucinations and output instability problems, making it difficult to effectively deal with complex business scenarios, and traditional methods lack flexibility and precision, and cannot meet the "zero tolerance" application needs.
Obtain user requests through the police big model, determine the request intention and conditions, generate police tasks to be executed, and display the task progress on the interactive page, combine long-term memory and short-term memory to perform task planning, use NLP capabilities and task orchestration capabilities to optimize Task planning and tool calls to reduce hallucinations and output instability.
The police large model supports police services, realizes intelligent combination and orchestration of existing tools to complete specific tasks, enhances the accuracy and stability of task planning, and solves the problems of hallucinations and output instability.
Smart Images

Figure CN118071125B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field, and in particular to a task processing method, device, equipment and medium based on a police big model. Background Art
[0002] In the police industry, completing specific tasks usually involves multiple systems (full-dimensional perception archives, knowledge graph relationship analysis, police encyclopedia, etc.). The traditional method is to build an internal portal system to facilitate business personnel to manually jump to various systems to complete specific tasks. This method is still mainly manual, and the portal only provides a convenient entry index. The question-and-answer system based on traditional NLP technology goes a step further and provides a question-and-answer interface to convert the natural language requests of business personnel into system instructions, which is usually implemented with NLP models such as intent recognition, named entity recognition, and slot extraction.
[0003] However, this approach lacks flexibility (fixed intent template), requires targeted training, and cannot handle complex business scenarios. The emergence of large language models (LLMs) has demonstrated the ability to generalize with few samples and zero samples, allowing seamless transfer between tasks without updating parameters. Researchers have begun to use these models to build artificial intelligence agents (AI Agents, referred to as agents). These agents based on large language models can demonstrate reasoning and planning capabilities comparable to symbolic agents through techniques such as chain thinking (CoT) and problem decomposition. They can also gain the ability to interact with the environment by learning from feedback and performing new actions (ReAct), similar to reactive agents. Agents based on large models combine the advantages of various types of agents in the early stage and have a wider range of adaptability and applications. This ability makes agents based on large models very suitable for handling complex business scenarios, that is, the large model automatically plans task steps according to the needs of business users, dynamically calls related tools / systems, and finally displays the results.
[0004] However, intelligent agents based on large models also have various problems, such as hallucinations and output stability, which pose challenges to the implementation of police application scenarios with "zero tolerance" for accuracy and error rate. Summary of the invention
[0005] The present invention provides a task processing method, device, equipment and medium based on a police big model to achieve the rational use of the big model in police application scenarios and improve the big model's support capabilities for police business.
[0006] According to one aspect of the present invention, a task processing method based on a police big model is provided, comprising:
[0007] Obtain the original request entered by the user on the police interaction page;
[0008] Determine the request intent and request conditions in the original request through the police big model;
[0009] If the request is intended to point to a preset scheduling task, the scheduling task is determined as a police task to be executed;
[0010] If the request intention does not point to a preset scheduling task, a police task to be executed is generated according to the request intention and the request condition, the long-term memory of the police big model and the short-term memory of the police big model;
[0011] The police task and the execution progress of the police task are displayed on the police interaction page.
[0012] According to another aspect of the present invention, there is provided a task processing device based on a police big model, comprising:
[0013] The request acquisition module is used to obtain the original request entered by the user on the police interaction page;
[0014] A request analysis module, used for determining the request intent and request conditions in the original request through a police big model;
[0015] A task determination module, configured to determine the scheduled task as a police task to be executed if the request is intended to point to a preset scheduled task;
[0016] A task generation module, for generating a police task to be executed according to the request intention and the request condition, the long-term memory of the police big model and the short-term memory of the police big model if the request intention does not point to a preset arrangement task;
[0017] The task display module is used to display the police task and the execution progress of the police task on the police interaction page.
[0018] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0019] at least one processor; and
[0020] a memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the task processing method based on the police big model described in any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task processing method based on the police big model described in any embodiment of the present invention when executed.
[0023] The embodiments of the present invention solve the illusion and output instability of the big model by integrating the NLP capabilities and task scheduling and planning capabilities of the big police model. At the same time, it also proposes a solution to optimize the task planning capabilities in specific scenarios, thereby realizing the intelligent combination and scheduling of existing tools / applications to complete the policing function of specific tasks, thereby improving the support capabilities of the big police model for policing business.
[0024] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1A is a flowchart of a task processing method based on a police big model provided according to an embodiment of the present invention;
[0027] Figure 1B It is a schematic diagram of the composition of a large police model intelligent agent provided according to an embodiment of the present invention;
[0028] Figure 1C It is a schematic diagram of a hybrid arrangement mode of a police large model agent provided according to an embodiment of the present invention;
[0029] Figure 2A is a flowchart of a task processing method based on a police big model provided according to another embodiment of the present invention;
[0030] Figure 2B It is a schematic diagram of the overall architecture and process of a large police model intelligent agent provided according to another embodiment of the present invention;
[0031] Figure 3 is a structural diagram of a task processing method based on a police big model provided according to another embodiment of the present invention;
[0032] Figure 4 It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] In order to facilitate understanding of the technical effects of the present invention, the related technologies of the present invention are described as follows:
[0036] The typical implementation of the intelligent agent system based on the large model is as follows:
[0037] MRKL (Modular Reasoning, Knowledge and Language): Introduces symbolic computing and reasoning into large models, allowing large models to complete tasks that require high precision by calling external tool systems. This is the mainstream mode of combining large models with external tools. The external tools here include mathematical calculations, date acquisition, search, etc. However, large models also need to be fine-tuned to learn how to use these tools, as well as how to obtain tool inputs and parse tool outputs, in order to achieve better results. This technology is targeted at single question-and-answer requests and lacks capabilities such as contextual data supplementation, multi-round question-and-answer, memory, and task planning.
[0038] RAG (Retreival-Augmented Generation): RAG is an AI application framework, that is, the large model first obtains the latest and most accurate information from the external knowledge base, and then combines this information to generate accurate answers. It is a way to improve the reliability of large models. On the one hand, RAG provides the model with updated knowledge to avoid model retraining. On the other hand, RAG allows the model to reduce hallucinations and output answers based on facts. Common RAG applications are enhancements for document search, that is, existing documents are vectorized and stored in a vector database. When users input, they first perform semantic matching on the vector database, and let the large model generate appropriate answers based on the matching results. This method is usually difficult to achieve good results, because blindly and fully giving all inputs directly to the vector database usually results in a lot of interference results.
[0039] AutoGPT: A fully automated agent using GPT4. The system uses a large model to fully automatically plan tasks. By providing available tools in the prompts, the large model can automatically generate plans, reflect on plans, adjust the priority of the task queue according to the execution results of the steps, or modify the task queue. The advantage of this system is that the large model fully automatically plans the steps required to complete the task, including the decomposition of subtasks. The disadvantages are: 1) It completely relies on the knowledge of the large model itself to plan tasks, so it cannot solve tasks that require domain expertise; 2) The management of the task queue is completely dependent on the large model, which may lead to infinite loops or complicate simple problems; 3) No external knowledge base is introduced to improve the quality of question and answer.
[0040] Figure 1A This is a flowchart of a task processing method based on a police big model provided by an embodiment of the present invention. This embodiment can be applied to a security guard as a user. After giving an original request to the police big model, the police big model gives a police task that can realize the original request and executes it. This method can be executed by a task processing device based on the police big model. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device with corresponding data processing capabilities. Figure 1A As shown, the method includes:
[0041] S110. Obtain the original request entered by the user on the police interaction page.
[0042] S120. Determine the request intent and request conditions in the original request through the police big model.
[0043] Among them, Figure 1BAs shown in the figure, the capabilities of the police big model (agent) mainly include memory, tool calling and task planning. Memory: It includes short-term memory and long-term memory. Short-term memory mainly stores the intermediate results of a conversation interaction, including the output of the big model, the results of tool calling, etc. It is implemented through a vector index component of memory. Long-term memory has two forms: one is natural language text content, such as police knowledge base, rules and regulations, processes, etc., which are stored using vector databases; the other is structured data, where we mainly store metadata knowledge graphs, which are stored through graph databases. Tool calling capability: By encapsulating all external tools / systems into RESTful API form and describing their functions, input and output parameters in a standard format, they can be provided to the context of the big model in a unified way for reference when generating task planning. The big model generates instructions for calling the API, which are actually called and executed by the code, and the results are stored in the big model cache (short-term memory). Task planning capability: This capability is mainly implemented through various prompting technologies (Chain of Thought, Reason and Act, etc.), and combined with task queues for task evaluation and sorting.
[0044] Specifically, the user enters the original request, i.e. the original text, through the police interaction page (UI interface). The police big model identifies the user's request intention through the original request, such as whether task planning is required, whether long-term memory query needs to be performed, whether it is a simple reply to a chat message, etc.; at the same time, it extracts the user's request conditions in the original request, especially date information (such as "3 days ago" and "last month").
[0045] S130: If the request is intended to point to a preset scheduling task, the scheduling task is determined as a police task to be executed.
[0046] S140. If the request intention does not point to a preset scheduling task, a police task to be executed is generated according to the request intention and the request conditions, the long-term memory of the police big model and the short-term memory of the police big model.
[0047] Specifically, in the implementation scenarios of the big model in the police industry, there are mainly two types of tasks: one is the predictable task flow of fixed business, such as completing a daily data reporting process, manually arranging the fixed task flow in advance to obtain a set orchestration task; the other is unpredictable flexible task requirements, so there is no pre-set orchestration task.
[0048] In order to ensure that the big model can effectively complete the corresponding tasks in both scenarios, the intent analysis is first performed through the intent router. If an existing task flow can support the user's request intent, the corresponding set orchestration task will be used as the police task to be executed. If not, the police big model will generate the police task to be executed in real time based on the request intent and the request conditions, the long-term memory of the police big model, and the short-term memory of the police big model.
[0049] In addition, for police tasks generated in real time, certain filtering is required before display or execution, mainly through the NLP model to determine whether it contains harmful content and filter or desensitize the sensitive information.
[0050] S150. Display the police task and the execution progress of the police task on the police interaction page.
[0051] Specifically, for police tasks to be executed, they will first be displayed to users on the police interaction page, and then executed after users confirm, modify or provide feedback. During the execution process, the execution progress will also be displayed on the police interaction page, so that users can understand the execution progress and results.
[0052] The embodiments of the present invention solve the illusion and output instability of the big model by integrating the NLP capabilities and task scheduling and planning capabilities of the big police model. At the same time, it also proposes a solution to optimize the task planning capabilities in specific scenarios, thereby realizing the intelligent combination and scheduling of existing tools / applications to complete the policing function of specific tasks, thereby improving the support capabilities of the big police model for policing business.
[0053] Optionally, after displaying the police task and the execution progress of the police task on the police interaction page, the method further includes:
[0054] Obtaining the result of the user's human intervention on the police task and / or the planning and evaluation result of the police task by the police big model;
[0055] The execution result of the police task and the updating result of the short-term memory are determined according to the human intervention result and / or the planning evaluation result.
[0056] Specifically, Figure 1CAs shown in the figure, if the police task to be executed is generated in real time by the big model, two reviews are required before execution. The first time is that the big police model conducts a planning evaluation on the police task generated by itself. If the planning evaluation result is confident, the user will manually conduct a second review; if the planning evaluation result is unconfident, the unconfident planning evaluation result will be input into the short-term memory and the police task will be regenerated. In the second review, the user manually intervenes in the police task. The intervention can be to allow / not allow the police task to be executed, or to give feedback on the police task (such as excellent police tasks, non-high-quality police tasks). If the subsequent task is executed, the specific execution result is also entered into the short-term memory.
[0057] Optionally, the method further includes:
[0058] The police model is fine-tuned based on the manually adjusted police task log.
[0059] Specifically, the results of large-scale model task planning are not necessarily the most reasonable, and may even have large deviations. In response to this situation, after the system has been used for a period of time, a large number of detailed planning logs for police tasks can be collected. A visual interface is provided for these logs to facilitate human feedback adjustments, and the adjustment results are used to fine-tune the large police model. More reasonable planning ideas can be learned from reasonable planning with a small amount of human feedback, reducing the problems of large models complicating simple tasks and deviating from requirements. This method can greatly improve the task planning capabilities of large police models.
[0060] Figure 2A This is a flowchart of a task processing method based on a police big model provided by another embodiment of the present invention. This embodiment is optimized and improved on the basis of the above embodiment. Figure 2A As shown, the method includes:
[0061] S210, obtaining the original request input by the user on the police interaction page;
[0062] S220, determining the request intention and request conditions in the original request through the police big model;
[0063] S230: If the request is intended to point to a preset scheduling task, determine the scheduling task as a police task to be executed;
[0064] S240, if the request intention does not point to a preset scheduling task, determining the knowledge data required to complete the original request in the long-term memory of the police service big model according to the request intention and the request condition;
[0065] S250, filtering and desensitizing the knowledge data to obtain security knowledge data; generating a task prompt according to the security knowledge data, the original request and the auxiliary prompt;
[0066] S260. Based on the police big model, generate the police task to be executed according to the task prompt and the short-term memory of the police big model.
[0067] Specifically, Figure 2B As shown in the figure, knowledge data mainly comes from the graph database and vector database in short-term memory. After obtaining the knowledge data, the knowledge data is filtered and desensitized according to the data permissions of the current user to obtain secure knowledge data. It should be noted that the components used for filtering and data are implemented independently, and the existing data security architecture can be reused.
[0068] Combine the user's original request, the security data knowledge that has been obtained, and some necessary auxiliary prompts to construct the task prompt. The main parts of the task prompt include: auxiliary prompt 1-giving the agent identity information, auxiliary prompt 2-giving the agent a description of the tools available, auxiliary prompt 3-task requirements and constraints, original request and security data knowledge. In addition, the task prompt can be optimized twice through the big model, which can achieve better results. Input the constructed task prompt into the big language model, and let the big language model generate the police task to be executed based on the task prompt and its short-term memory.
[0069] Optionally, the long-term memory includes a graph database and a vector database, and the knowledge data required to complete the original request is determined in the long-term memory of the police service big model according to the request intent and the request condition, including:
[0070] Acquire vector data from a vector database according to the vector value of the original request and the request condition;
[0071] Acquire graph data from a graph database according to the entity in the original request, the request intent, and the graph body;
[0072] The graph data and the vector data are determined as knowledge data required to complete the original request.
[0073] Specifically, the original request is processed by the vector embedding model (which must be consistent with the embedding model of the vector database) to form a vector value. Combined with the request conditions obtained above (such as date range, etc.), a query request for the vector database is constructed, and vector data is obtained from the vector database based on the query request. Note that the embedding result of the original request is not directly matched with the vector database, but the search is performed in combination with the request conditions that have been semantically understood by the large model.
[0074] According to the request intent obtained, the core business objects are identified in the original request, such as the entities mentioned, such as people, things, and objects. This step mainly obtains the knowledge graph context starting point from the original request. According to the obtained entities, request intent and graph ontology, a graph query is constructed. For example, if the user needs to "analyze the traffic complaints on a certain road section", the original tables, reports, models, etc. related to the location can be obtained through the graph ontology to construct a graph query. According to the constructed graph query, the corresponding graph data is obtained from the graph database.
[0075] Optionally, the short-term memory includes a task queue and a session context cache, and the generating of the to-be-executed police task based on the police big model according to the task prompt and the short-term memory of the police big model includes:
[0076] Determine the task list in the task queue and the session history content in the session context cache as supplementary input;
[0077] Input the supplementary input and the task prompt into the police task model to obtain the police task to be performed;
[0078] Correspondingly, after inputting the supplementary input and the task prompt into the police work model to obtain the police work task to be performed, the method further includes:
[0079] The task queue and the session context cache are updated according to the policing task.
[0080] Specifically, if there is content in the task queue, the task list is added to the supplementary input;
[0081] If there is session history content or information that has been obtained in the session context cache, the corresponding content is also added to the supplementary input. The supplementary input and task prompts are input into the police model to obtain the police task generated by the model. The task list and session context cache are updated according to the generated police task.
[0082] S270. Display the police task and the execution progress of the police task on the police interaction page.
[0083] The embodiments of the present invention enhance the accuracy of large model generation tasks and task planning capabilities by referring to a graph database and a vector database when generating police tasks.
[0084] Figure 3 A schematic diagram of a task processing device based on a police big model is provided as another embodiment of the present invention. Figure 3 As shown, the device comprises:
[0085] The request acquisition module 310 is used to acquire the original request input by the user on the police interaction page;
[0086] A request analysis module 320, configured to determine the request intent and request conditions in the original request through a police big model;
[0087] A task determination module 330 is used to determine the scheduled task as a police task to be executed if the request is intended to point to a preset scheduled task;
[0088] A task generation module 340 is used to generate a police task to be executed according to the request intention and the request condition, the long-term memory of the police big model and the short-term memory of the police big model if the request intention does not point to a preset arrangement task;
[0089] The task display module 350 is used to display the police task and the execution progress of the police task on the police interaction page.
[0090] The task processing device based on the police big model provided in the embodiment of the present invention can execute the task processing method based on the police big model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0091] Optionally, the task generation module 340 includes:
[0092] a knowledge determination unit, for determining the knowledge data required to complete the original request in the long-term memory of the police service big model according to the request intention and the request condition;
[0093] A knowledge processing unit, used for filtering and desensitizing the knowledge data to obtain secure knowledge data;
[0094] A prompt generating unit, configured to generate a task prompt according to the security knowledge data, the original request and the auxiliary prompt;
[0095] A task generation unit is used to generate a police task to be executed based on the police big model, according to the task prompt and the short-term memory of the police big model.
[0096] Optionally, the knowledge determination unit is specifically used to: obtain vector data from a vector database based on the vector value of the original request and the request condition; obtain graph data from a graph database based on the entities in the original request, the request intent and the graph ontology; and determine the graph data and the vector data as the knowledge data required to complete the original request.
[0097] Optionally, the task generation unit is specifically used to: determine the task list in the task queue and the session history content in the session context cache as supplementary input; input the supplementary input and the task prompt into the police big model to obtain the police task to be executed;
[0098] Accordingly, the device further comprises:
[0099] A memory update module is used to update the task queue and the session context cache according to the police task.
[0100] Optionally, the device comprises:
[0101] A result determination module is used to obtain the result of the user's human intervention on the police task and / or the planning and evaluation result of the police task by the police big model;
[0102] A result updating module is used to determine the execution result of the police task and the update result of the short-term memory according to the human intervention result and / or the planning evaluation result.
[0103] Optionally, the device comprises:
[0104] The model fine-tuning module is used to fine-tune the large police model according to the manually adjusted police task log.
[0105] The task processing device based on the police big model further described can also execute the task processing method based on the police big model provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0106] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0107] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0108] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0109] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a task processing method based on a large police model.
[0110] In some embodiments, the task processing method based on the police big model can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the task processing method based on the police big model described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to execute the task processing method based on the police big model in any other appropriate manner (for example, by means of firmware).
[0111] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0112] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0113] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 of the foregoing.
[0114] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0115] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0116] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0117] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A task processing method based on a police big model, characterized in that: The method comprises: Obtain the original request entered by the user on the police interaction page; Determine the request intent and request conditions in the original request through the police big model; If the request is intended to point to a preset scheduling task, the scheduling task is determined as a police task to be executed; If the request intention does not point to a preset scheduling task, a police task to be executed is generated according to the request intention and the request condition, the long-term memory of the police big model and the short-term memory of the police big model; Determine whether the police task to be executed contains harmful content through the NLP model, and filter or desensitize sensitive information of the police task to be executed; Displaying the police task and the execution progress of the police task on the police interaction page; Obtaining the result of the user's human intervention on the police task and / or the planning and evaluation result of the police task by the police big model; the human intervention result includes allowing the police task to be executed, not allowing the police task to be executed, and the feedback result of the police task; Determining the execution result of the police task and the updating result of the short-term memory according to the human intervention result and / or the planning evaluation result; Wherein, determining the execution result of the police task and the update result of the short-term memory according to the planning evaluation result includes: If the planning evaluation result is unconfident, the unconfident planning evaluation result is input into the short-term memory; The long-term memory includes a graph database and a vector database, the short-term memory includes a task queue and a session context cache, and the generating of the police task to be executed according to the request intent and the request condition, the long-term memory of the police big model and the short-term memory of the police big model includes: According to the vector value of the original request and the request condition, vector data is obtained from the vector database; the request condition is obtained through semantic understanding of the police big model; Acquire graph data from a graph database according to the entity in the original request, the request intent, and the graph body; determining the graph data and the vector data as knowledge data required to complete the original request; Filtering and desensitizing the knowledge data to obtain secure knowledge data; Generate a task prompt according to the security knowledge data, the original request and the auxiliary prompt; Determine the task list in the task queue and the session history content in the session context cache as supplementary input; Input the supplementary input and the task prompt into the police task model to obtain the police task to be performed; After inputting the supplementary input and the task prompt into the police work model to obtain the police work task to be performed, the method further includes: The task queue and the session context cache are updated according to the policing task.
2. The method according to claim 1, characterized in that The method further comprises: The police model is fine-tuned based on the manually adjusted police task log.
3. A task processing device based on a police big model, characterized in that: The device comprises: The request acquisition module is used to obtain the original request entered by the user on the police interaction page; A request analysis module, used for determining the request intent and request conditions in the original request through a police big model; A task determination module, configured to determine the scheduled task as a police task to be executed if the request is intended to point to a preset scheduled task; A task generation module, for generating a police task to be executed according to the request intention and the request condition, the long-term memory of the police big model and the short-term memory of the police big model if the request intention does not point to a preset arrangement task; A task filtering module, used to determine whether the police task to be executed contains harmful content through the NLP model, and to filter or desensitize the sensitive information of the police task to be executed; A task display module, used to display the police task and the execution progress of the police task on the police interaction page; A result determination module is used to obtain the result of the user's human intervention on the police task and / or the planning and evaluation result of the police task by the police big model; the human intervention result includes allowing the police task to be executed, not allowing the police task to be executed, and the feedback result of the police task; A result updating module, used for determining the execution result of the police task and the update result of the short-term memory according to the human intervention result and / or the planning evaluation result; The result updating module is specifically used for inputting the unconfident planning evaluation result into the short-term memory if the planning evaluation result is unconfident; Wherein, the task generation module includes: A knowledge determination unit is used to obtain vector data from a vector database according to the vector value of the original request and the request condition; the request condition is obtained through semantic understanding of the police big model; according to the entity in the original request, the request intent and the graph ontology, obtain graph data from a graph database; determine the graph data and the vector data as knowledge data required to complete the original request; A knowledge processing unit, used for filtering and desensitizing the knowledge data to obtain secure knowledge data; A prompt generating unit, configured to generate a task prompt according to the security knowledge data, the original request and the auxiliary prompt; The task generation unit is used to determine the task list in the task queue and the session history content in the session context cache as supplementary input; input the supplementary input and the task prompt into the police work big model to obtain the police work task to be executed; A memory update module is used to update the task queue and the session context cache according to the police task.
4. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the task processing method based on the police big model as described in any one of claims 1-2.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task processing method based on the police big model as described in any one of claims 1-2 when executed.
