Task processing method and apparatus, and electronic device, computer-readable storage medium and computer program product
By converting task prompt information in natural language into system interaction parameters and calling task system processing, the problems of low efficiency and high complexity in the existing technology are solved, and more efficient and flexible task processing is achieved.
Patent Information
- Application Number
- PCT/CN2023/135450
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-31
- Filing Date
- 2023-11-30
- Publication Date
- 2025-02-06
AI Technical Summary
When performing task processing in different business scenarios, the graph neural network interface needs to be called through code, resulting in an increase in time consumption, affecting efficiency and increasing complexity.
By generating system interaction parameters, converting task prompt information from natural language into machine instructions, calling the task system for processing, and finally determining the processing result, thereby completing task processing.
It improves the efficiency of task processing, reduces the complexity of operation, and when business scenarios and data combinations change, you only need to change the natural language task prompt information, widening the scope of processing tasks.
Smart Images

Figure CN2023135450_06022025_PF_FP_ABST
Abstract
Description
A task processing method, device, electronic device, computer-readable storage medium, and computer program product
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on the Chinese patent application with application number 202310950974.5 and application date of July 31, 2023, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application as a reference. Technical Field
[0003] The present application relates to artificial intelligence technology, and in particular to a task processing method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0004] With the rapid development of mobile internet, various social application platforms have developed multiple business scenarios, such as social networking, interest expansion, and content promotion. Each business scenario involves business-related information, and each business scenario requires task processing of this information.
[0005] In related technologies, to execute tasks in different business scenarios, different code is typically used to call the processing interface of a graph neural network to perform the corresponding task processing. However, code development increases time consumption, affects task processing efficiency, and increases task processing complexity.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a task processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the efficiency of task processing and reduce the complexity of task processing.
[0008] The technical solution of the embodiment of the present application is implemented as follows:
[0009] An embodiment of the present application provides a task processing method, wherein the task processing is performed by an electronic device, and the method includes:
[0010] Generate system interaction parameters corresponding to the target task according to the task prompt information corresponding to the target task in the business scenario;
[0011] The task prompt information is used to describe the target task in the form of natural language, and the system interaction parameter is used to describe the target task in the form of machine instructions;
[0012] calling a task system of the target task, and processing the system interaction parameters through the task system of the target task;
[0013] Based on the output information of the task system of the target task for the system interaction parameter, a processing result corresponding to the target task is determined.
[0014] An embodiment of the present application provides a task processing device, the task processing device comprising:
[0015] a parameter generation module configured to generate system interaction parameters corresponding to a target task in a business scenario based on task prompt information corresponding to the target task; wherein the task prompt information is used to describe the target task in the form of natural language, and the system interaction parameters are used to describe the target task in the form of machine instructions;
[0016] a parameter processing module configured to call the task system of the target task and process the system interaction parameters;
[0017] The result determination module is configured to determine a processing result corresponding to the target task based on output information of the task system of the target task for the system interaction parameters.
[0018] An embodiment of the present application provides an electronic device for business processing, the electronic device comprising:
[0019] Memory for storing computer programs or computer-executable instructions;
[0020] The processor is used to implement the task processing method provided in the embodiment of the present application when executing the computer program or computer executable instructions stored in the memory.
[0021] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for causing a processor to execute and implement the task processing method provided in the embodiment of the present application.
[0022] An embodiment of the present application provides a computer program product, including a computer program or computer-executable instructions, which, when executed by a processor, implements the task processing method provided in the embodiment of the present application.
[0023] The embodiment of the present application has at least the following beneficial effects: the electronic device first generates system interaction parameters in the form of machine instructions for the task prompt information of the target task in the form of natural language, that is, converts the task prompt information that humans can understand into parameter instructions that the machine can understand; then, calls the task system of the target task, reads the system interaction parameters through the task system and performs corresponding processing; finally, based on the output information of the task system for the system interaction parameters, generates a processing result for the target task, thereby completing the task processing of the target task. In this way, the task processing of the target task can be triggered and completed only based on the instructions of natural language, eliminating the step of developing code for the target task, and also saving the time of task processing for the target task, thereby improving the efficiency of task processing; and compared with code, natural language instructions are easier to generate and process, thereby reducing the operational complexity of task processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] FIG1 is a schematic diagram of the architecture of a task processing system provided in an embodiment of the present application;
[0025] FIG2 is a schematic diagram of the structure of the server in FIG1 provided in an embodiment of the present application;
[0026] FIG3 is a flowchart of a task processing method according to an embodiment of the present application;
[0027] FIG4 is a second flow chart of the task processing method provided in an embodiment of the present application;
[0028] FIG5 is a third flow chart of the task processing method provided in an embodiment of the present application;
[0029] FIG6 is a fourth flow chart of a task processing method according to an embodiment of the present application;
[0030] FIG7 is a schematic diagram of a system architecture for expanding social relationships and points of interest provided by an embodiment of the present application;
[0031] FIG8 is a schematic diagram of the collaborative work of the large-scale language pre-training model and the social relationship system model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0033] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0034] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a whole or a part that includes the function of the module or unit.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0036] Before further explaining the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0037] 1) Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that aims to understand the essence of intelligence and generate new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0038] 2) Natural Language Processing (NLP) is a field in computer science and artificial intelligence that encompasses various theories and methods for enabling effective communication between humans and computers using natural language. Natural Language Processing (NLP) involves natural language, the language we use everyday, and is closely related to linguistics. NLP technologies typically include text processing, semantic understanding, machine translation, robotic question answering, and knowledge graphs.
[0039] 3) Machine Learning (ML) is a multidisciplinary interdisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. Machine learning is used to determine how computers simulate or implement human learning behaviors to acquire new knowledge or skills, and to reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning. Pretrained models are the latest development in deep learning, integrating the above technologies.
[0040] 4) Large Language Models (LLMs) are computer models capable of processing and generating natural language, also known as pre-trained models. After fine-tuning, LLMs can be widely applied to downstream tasks. LLMs can predict the next character string or sentence by learning the statistical patterns and semantic information of language data. As the input dataset and parameter space continue to expand, the capabilities of LLMs will also increase accordingly.
[0041] 5) Instruction Tuning: This involves generating individual instructions for each task, performing full-shot fine-tuning on several tasks (i.e., fine-tuning all parameters of the pre-trained model), and then evaluating generalization performance on specific tasks. The pre-trained model's parameters are trained on a large number of publicly available NLP task datasets (greater than the specified number of datasets) to improve the model's understanding capabilities. By providing instructions, the model can understand and provide accurate feedback.
[0042] 6) Prompt Tuning: This involves using "prompt information" to enhance the model's performance without significantly changing the pre-trained model's structure and parameters (the change is less than a specified amount of data). Prompt Tuning serves as a task instruction, reuses pre-training objectives, and enhances parameter effectiveness. Prompt Tuning is achieved by generating individual prompt templates and fine-tuning and evaluating them on each task.
[0043] 7) Reinforcement Learning with Human Feedback (RLHF) is an extension of reinforcement learning that incorporates human feedback into the training process, providing a natural, human-like interactive learning process for machines. In addition to reward signals, RLHF receives feedback from humans, improving the perspective and efficiency of learned knowledge. This process is similar to how humans learn from the expertise of another human.
[0044] It should be noted that RLHF is able to receive instructions in natural language form and perform task processing through instructions in natural language form, so that electronic devices can embed decision-making elements in human experience; as an effective alignment technology, RLHF can improve the quality of content generated by LLM and improve information integrity.
[0045] 8) Recommended content refers to content recommended to an account and can include text, images, or short videos (generally videos shorter than a preset duration). Text can be edited and published by the creator, while short videos can be provided by professionally generated content (PGC) or user-generated content (UGC) producers. Recommended content is ultimately provided to users in the form of a feed (information stream) based on their interests.
[0046] 9) Professionally generated content refers to content produced by institutions or organizations used to generate content.
[0047] 10) User-generated content refers to content originally created by users.
[0048] 11) Social distribution refers to recommending content to referees through social media platforms, social applications, or other social networks. Through social distribution, information streams can be shared with other referees and groups of referees who interact with the referee, thereby increasing the exposure and visibility of the information stream. Social distribution can be achieved based on factors such as the referee's interests, characteristics, and social relationships, or through the referee's own voluntary sharing.
[0049] With the rapid development of the mobile internet, various social application platforms have developed multiple business scenarios, such as social networking, interest expansion, and content promotion. Each business scenario involves business-related information, and each requires task processing of this information. For example, the friend recommendation task in the social networking scenario requires identifying information about the target audience, such as whom they may know and who they may be interested in. The information recommendation task in the interest expansion scenario requires filtering out potentially interesting information from a massive amount (greater than a specified amount) of short videos, images, and text to recommend to the target audience. The targeted delivery task in the content promotion scenario requires identifying appropriate delivery targets for the content to be promoted.
[0050] In related technologies, when performing task processing on information in business scenarios, after obtaining data from different business scenarios (such as interest tags of target objects, content tags of information, etc.), the data from different business scenarios are first processed separately. Then, a graph network is constructed to integrate the data from different business scenarios. Graph Neural Networks (GNN) algorithms, such as neighbor sampling algorithms, aggregation algorithms, and update algorithms, are used to extract feature representations of the target object's interests and social relationships from the graph network, and the features are input into the algorithm models of the application layer corresponding to different business scenarios, such as the recall model of the recommendation system and the feature matching model of the search system, for subsequent processing. For example, short videos that may be of interest to the target terrain can be recalled based on the feature representation, or the objects to be pushed for a certain promotional information can be determined based on the feature representation, and so on.
[0051] As can be seen, in related technologies, specific tasks in different business scenarios often require specialized code development to call graph neural network processing interfaces for corresponding processing. However, code development takes a certain amount of time to complete. If code development is used to implement corresponding task processing for specific business scenarios, it will not only affect task processing efficiency but also increase the operational complexity of task processing.
[0052] Furthermore, different tasks may require different data processing. For example, some tasks require processing the target object's interest data, while others require processing the target object's social relationship data. Furthermore, the data processing methods may also differ. For example, some tasks require obtaining neighbor nodes, while others require obtaining vector representations. Clearly, different tasks may involve different business scenarios and data. Combining different business scenarios and different data increases the data volume of the resulting combination. However, developing code for each combination separately deviates from the actual implementation, thereby affecting the executability of the task processing.
[0053] Furthermore, the meaning of the same data in different business scenarios may vary. For example, in a gaming forum, "essence" refers to the highest-quality forum posts, while in a content promotion scenario, it might refer to skincare products. In a gaming forum, "diamond" refers to a game rank, while in an interest-based expansion scenario, "diamond" refers to a type of gemstone. This demonstrates the discrepancy between the meanings of the same data in different business scenarios. Integrating data from these different scenarios through the construction of a graph network fails to eliminate these semantic differences, impacting task processing accuracy.
[0054] Finally, the feature representation extracted from the graph network is an implicit vector representation, which lacks intuitive semantic features. By making the feature representation extracted from the graph network inconvenient to use directly in some tasks (for example, tasks that need to be displayed and described to humans), the number of tasks that can be processed for data in business scenarios is reduced.
[0055] Based on this, the embodiments of the present application provide a task processing method, device, electronic device, computer-readable storage medium and computer program product, which can improve the efficiency, accuracy, executability and applicability of task processing, and can reduce the complexity of task processing. The following describes an exemplary application of the electronic device provided by the embodiment of the present application. The electronic device provided by the embodiment of the present application can be implemented as various types of terminals such as laptop computers, tablet computers, desktop computers, set-top boxes, mobile devices (for example, mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), and can also be implemented as servers. Below, an exemplary application of the electronic device when it is implemented as a server will be described.
[0056] Referring to FIG1 , FIG1 is a schematic diagram of the architecture of a task processing system provided in an embodiment of the present application. To support a task processing application, in the task processing system 100, terminals (terminal 400-1 and terminal 400-2 are shown as examples) are connected to the server 200 via a network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. The task processing system 100 is also provided with a database 500 for providing data support to the server 200. The database 500 can be independent of the server 200 or can be configured in the server 200. FIG1 shows a case where the database 500 is independent of the server 200.
[0057] Terminal 400 - 1 and terminal 400 - 2 are used to respectively respond to input operations of the operator on the information input interface displayed on the graphical interface, obtain input information, and transmit the input information to the server 200 through the network 300 .
[0058] Server 200 is used to determine corresponding task prompt information for the target task in the business scenario from the input information, and generate system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario; wherein the task prompt information is used to describe the target task in the form of natural language, and the system interaction parameters are used to describe the target task in the form of machine instructions; call the task system of the target task, and process the system interaction parameters through the task system of the target task; determine the processing result corresponding to the target task based on the output information of the task system of the target task for the system interaction parameters, and return the processing result to terminal 400-1 and terminal 400-2 through network 300.
[0059] Terminal 400 - 1 and terminal 400 - 2 are further configured to display processing results on graphical interface 410 - 1 and graphical interface 410 - 2 , respectively.
[0060] The embodiments of the present application can be implemented with the help of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network within a wide area network or a local area network to realize data calculation, storage, processing, and sharing.
[0061] Cloud computing is a general term for network technologies, information technologies, integration technologies, management platforms, and application technologies used in the cloud computing business model. These technologies can be combined into a resource pool, providing flexible, on-demand access. The computing and storage resources required for the backend services of technical networks can be provided through cloud computing.
[0062] Exemplarily, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals 400-1 and 400-2 may be smartphones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, smart home appliances, car terminals, etc., but are not limited thereto. The terminals and servers may be connected directly or indirectly via wired or wireless communications, which is not limited in the embodiments of the present application.
[0063] Referring to Figure 2, Figure 2 is a structural diagram of the server (an implementation of an electronic device) in Figure 1 provided in an embodiment of the present application. The server 200 shown in Figure 2 includes: at least one processor 210, a memory 250, and at least one network interface 220. The various components in the server 200 are coupled together through a bus system 240. It can be understood that the bus system 240 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 240 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 240 in Figure 2.
[0064] The processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0065] The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 250 may optionally include one or more storage devices that are physically remote from the processor 210.
[0066] The memory 250 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 250 described in the embodiments of the present application is intended to include any suitable type of memory.
[0067] In some embodiments, the memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.
[0068] Operating system 251, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;
[0069] The network communication module 252 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220. Exemplary network interfaces 220 include Bluetooth, Wi-Fi, and Universal Serial Bus (USB).
[0070] In some embodiments, the task processing device provided in the embodiments of the present application can be implemented in software. FIG2 shows a task processing device 255 stored in the memory 250. The task processing device 255 can be software in the form of a program or plug-in, and includes the following software modules: a parameter generation module 2551, a parameter processing module 2552, a result determination module 2553, a model generation module 2554, and a prompt determination module 2555. These modules are logical and can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0071] In some embodiments, the task processing device provided in the embodiments of the present application can be implemented in hardware. As an example, the task processing device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the task processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0072] In some embodiments, a terminal or server (both are possible implementations of electronic devices) can implement the task processing method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP; it can also be a small program embedded in any APP, that is, a program that can be run only by downloading it into a browser environment. In short, the above-mentioned computer program can be any form of application, module or plug-in.
[0073] The embodiments of the present application can be applied to task processing scenarios such as artificial intelligence, big data, and cloud computing. Below, the task processing method provided by the embodiments of the present application is described. As mentioned above, the electronic device that implements the task processing method of the embodiments of the present application can be implemented as a terminal, a server, or a combination of the two. Therefore, the execution entity of each step will not be repeated below.
[0074] Refer to Figure 3, which is a flowchart diagram of the task processing method provided in an embodiment of the present application. The steps shown in Figure 3 will be described.
[0075] S101 : Based on task prompt information corresponding to a target task in a business scenario, generate system interaction parameters corresponding to the target task.
[0076] The embodiment of the present application is implemented in the context of processing a target task in a business scenario. In the embodiment of the present application, after the electronic device obtains task prompt information corresponding to the target task, it converts the task prompt information to obtain system interaction parameters that the machine can understand.
[0077] That is to say, in the embodiment of the present application, the system interaction parameters are used to describe the target task in the form of machine instructions. That is, the task prompt information is used to describe the target task in the form of natural language. The specific processing to be implemented by the target task, as well as the task requirements of the target task, etc., can all be expressed through natural language. Therefore, the task prompt information has certain language characteristics and is information that humans can understand. The system interaction parameters are used to describe the target task in the form of machine instructions. Therefore, after this step, the specific processing to be implemented by the target task, as well as the task requirements of the target task, etc., can all be expressed in instruction parameters that can be understood by the machine. In this way, it is convenient for the task system corresponding to the target task to process the target task.
[0078] That is, in an embodiment of the present application, the electronic device converts the natural language form, that is, the task prompt information that humans can understand, into instruction parameters that the machine can understand. The instruction parameters have a similar function to the code developed for the target task, and are both used to call the task system to perform corresponding task processing.
[0079] It should be noted that the business scenario in the embodiments of the present application can be any scenario that can generate corresponding data based on business operations, or has data associated with users. For example, the business scenario can be a social networking scenario (such as friend recommendations in social applications), a game forum scenario (such as discussing game tactics and game teams on a website's game channel), an interest expansion scenario (such as content recommendations of interest in social applications), a content promotion scenario (such as splash screen advertising), etc., and the embodiments of the present application are not limited here.
[0080] The target tasks in the embodiments of the present application can be set according to the needs of the actual business scenario, and the embodiments of the present application are not limited here. For example, when the business scenario is a social networking scenario, the target task can be to recommend accounts that the account to be recommended may be interested in, or accounts nearby (within a specified range); when the business scenario is a game forum scenario, the target task can be to detect sensitive words in the graphic content uploaded by the account; when the business scenario is an interest expansion scenario, the target task can be to screen short videos that the account is interested in; when the business scenario is a content promotion scenario, the target task can be to determine suitable users for advertising for targeted delivery.
[0081] It should be noted that the target task can be a manually specified task, such as a task specified by an operator for a business scenario, or a task determined by an electronic device based on the specified running time of different tasks. This embodiment of the present application does not limit this.
[0082] In the embodiment of the present application, the electronic device can generate the system interaction parameters corresponding to the target task in a variety of ways.
[0083] See Figure 4, which is a second flow chart of the task processing method provided in an embodiment of the present application. In some embodiments of the present application, step S101 in Figure 3, i.e., generating the system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario, can be implemented through the following processes (S1011 and S1012).
[0084] S1011. Perform semantic analysis on the task prompt information to obtain an analysis result.
[0085] In the embodiment of the present application, the electronic device can parse the semantics of the task prompt information based on the semantic corpus in the business scenario, and can also directly use the obtained natural language processing model to perform semantic analysis on the task prompt information; wherein, the semantic analysis ability of the natural language processing model is obtained after pre-training with a large amount of corpus data (greater than the specified data volume), and the number of parameters of the natural language processing model is greater than the quantity threshold. It can be seen that the natural language processing model in the embodiment of the present application is essentially a large language model that has been pre-trained and has a large number of parameters. Therefore, the natural language processing model has the ability to eliminate the semantic ambiguity of the same data in different business scenarios. Therefore, by performing semantic analysis on the task prompt information through the natural language processing model, the semantic differences of the same data in different business scenarios are eliminated, which can improve the accuracy of the analysis results.
[0086] S1012: Generate parameters based on the analysis results to obtain system interaction parameters corresponding to the target task.
[0087] With the help of the analysis results, the electronic device will clarify the specific requirements expressed in the task prompt information of the target task, and create parameter instructions based on the requirements. The obtained parameter instructions are the system interaction parameters that can be understood by the task system of the target task.
[0088] In some embodiments of the present application, S101 in Figure 3, that is, generating system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario, can also be achieved by the following processing: matching the task prompt information with multiple preset prompt information corresponding to multiple preset interaction parameters, and using the preset interaction parameters corresponding to the matched preset prompt information (which may be those whose similarity reaches a threshold) as the system interaction parameters to complete the generation of the system interaction parameters corresponding to the target task.
[0089] S102: Call the task system of the target task and process the system interaction parameters.
[0090] The electronic device calls the task system corresponding to the target task and transmits the system interaction parameters to the task system. The electronic device then analyzes the system interaction parameters through the task system to determine the intention and requirements of the target task and starts the corresponding processing.
[0091] It should be noted that the task system of the target task is a system that is interrelated with the target task. When the target task is to recommend accounts that the account to be recommended may be interested in, the task system is a social relationship analysis system; when the target task is to detect sensitive words in the graphic content uploaded by the account, the task system is a sensitive word detection system; and when the target task is to screen short videos that the account is interested in, the task system is a short video recall system and ranking system. The above systems can be implemented based on graph neural networks, or based on models such as convolutional neural networks and recurrent neural networks, and the embodiments of this application are not limited here.
[0092] S103: Determine a processing result corresponding to the target task based on the output information of the task system of the target task on the system interaction parameters.
[0093] After the task system for the target task completes processing of the system interaction parameters, it generates corresponding output information for the system interaction parameters. Based on the output information, the electronic device generates a result for the target task, thereby obtaining the processing result corresponding to the target task, thus completing the task processing flow for the target task in the business scenario.
[0094] In some embodiments of the present application, S103 in Figure 3, that is, determining the processing result corresponding to the target task based on the output information of the task system of the target task for the system interaction parameters, can be achieved by the following processing: generating matching text for the output information of the task system of the target task for the system interaction parameters; and determining the matching text as the processing result corresponding to the target task.
[0095] The matching text is used to describe the output information in natural language. That is, the electronic device can describe the output information in natural language to obtain the matching text, or it can directly invoke a natural language processing model to generate text based on the output information and use the generated matching text as the final processing result of the target task. This allows the processing result of the target task to have intuitive, human-understandable semantic information, facilitating interaction with humans.
[0096] In some embodiments of the present application, S103 in Figure 3, that is, determining the processing result corresponding to the target task based on the output information of the task system of the target task for the system interaction parameters, can also be achieved by the following processing: directly determining the output information as the processing result corresponding to the target task.
[0097] That is, the electronic device can directly use the output information of the task system of the target task on the system interaction parameter as the processing result corresponding to the target task without any processing. In this way, the process of generating the processing result is simpler and easier to implement.
[0098] It should be noted that in the embodiment of the present application, the system interaction parameters may include a sub-interaction parameter, that is, the natural language processing model generates a sub-interaction parameter for the task prompt information; in this case, the task system of the target task can generate and output information for the sub-interaction parameter, so that the resulting output information includes a sub-output information. The system interaction parameters may also include multiple sub-interaction parameters. This may be because the natural language processing model generates corresponding sub-interaction parameters for all possible semantics of the task prompt information; in this case, the task system of the target task will generate and output information for each sub-interaction parameter, so that the output information will include multiple sub-output information.
[0099] In some embodiments of the present application, the output information includes multiple sub-output information. In this case, S103 in Figure 3, that is, the output information of the task system for the target task on the system interaction parameters, determines the processing result corresponding to the target task. This can be achieved by the following processing: generating evaluation information for each sub-output information; based on the evaluation information, screening multiple sub-output information, and determining the processing result corresponding to the target task based on the screened sub-output information.
[0100] That is, when the task system outputs multiple sub-output information, the electronic device will determine whether each sub-output information is truly required for the target task based on the evaluation information of each sub-output information, thereby determining whether to use it to determine the final processing result for the target task. The electronic device can filter out the sub-output information with the highest evaluation information to generate the processing result, or filter out the sub-output information with evaluation information above the evaluation threshold to generate the processing result.
[0101] It should be noted that the embodiment of the present application can generate evaluation information for sub-output information through an evaluation model, and the evaluation model can be obtained through the following processing: based on the training prompt information corresponding to the training task in the business scenario, generate the training interaction parameters corresponding to the training task; call the task system of the training task, and process the training interaction parameters through the task system of the training task; based on the multiple sub-training output information of the training interaction parameters of the task system of the training task, determine the multiple training processing results corresponding to the training task; use the multiple benchmark scoring information of the multiple training processing results, and the multiple training scoring information generated by the initial model for the multiple training processing results to train the initial model to adjust the parameters of the initial model until the training is completed, and obtain the evaluation model.
[0102] The training task can be of the same type as the target task, or it can be another type of task belonging to the same business scenario as the target task, and this is not limited in the present embodiment. The generation process of the training interaction parameters and the training processing results is similar to the generation process of the system interaction parameters and the processing results, respectively, and will not be repeated here.
[0103] It should be noted that the baseline scoring information of the training processing results refers to the scoring information generated by humans for the training processing results. Therefore, the baseline scoring information contains information about whether the training processing results meet human expectations. Therefore, the difference between the baseline scoring information and the training scoring information is actually the difference between human expectations and the machine's prediction results. Based on this, the electronic device can use the difference between the baseline scoring information and the training scoring information to adjust the parameters of the initial model so that the initial model can learn human knowledge, that is, achieve the effect of adjusting the parameters of the initial model using human knowledge, and then, based on the obtained evaluation model, it can align the output of the task system with human expectations, so that the final processing result meets human expectations.
[0104] It is understandable that, compared to the related art where special code development is required for tasks to be processed, the electronic device in the embodiment of the present application first generates system interaction parameters in the form of machine instructions for the task prompt information of the target task in the form of natural language, that is, converts the task prompt information that humans can understand into parameter instructions that the machine can understand; then calls the task system of the target task, reads the system interaction parameters through the task system and performs corresponding processing; finally, based on the output information of the task system for the system interaction parameters, generates a processing result for the target task, thereby completing the task processing of the target task. In this way, only based on the instructions of natural language, it is possible to trigger and complete the task processing of the target task without the need to develop code for the target task. This not only saves the time required for code development, but also starts the task processing of the target task more quickly, thereby improving the efficiency of task processing. Moreover, compared with code, the instructions of natural language are easier to generate and process, thereby reducing the operational difficulty of task processing.
[0105] Furthermore, through the embodiments of the present application, when the combination of business scenarios and data changes, that is, when the tasks to be processed change, the task prompt information in natural language can be changed; in this way, all types of tasks can be processed normally, which expands the scope of tasks that can be processed.
[0106] Based on Figure 3, refer to Figure 5, which is a flowchart diagram of the task processing method provided in an embodiment of the present application. In some embodiments of the present application, before S101 in Figure 3, that is, before generating the system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario, the task processing method may also include the following processes (S104 and S105).
[0107] S104: Obtain natural language information input for a target task in a business scenario.
[0108] In an embodiment of the present application, the electronic device can determine the task prompt information corresponding to the target task based on the natural language information input for the target task. Here, the electronic device first detects the information input operation performed on the input device for the target task, and the information input operation is, for example, an input operation on a keyboard or a touch screen by a human (which can be an operator or an ordinary user, which is determined by the specific business scenario); when the electronic device detects the information input operation and determines that the input information is of a natural language type, it obtains the input information from the input device, and the information is natural language information.
[0109] For example, when an electronic device detects that a human being enters the sentence “Recommend to me alumni from the same school” on a touch screen, it determines the sentence as natural language information.
[0110] S105: Determine task prompt information corresponding to the target task in the business scenario based on the natural language information.
[0111] After obtaining natural language information, the electronic device can directly determine the obtained natural language information as the task prompt information corresponding to the target task, or it can perform certain simplification on the natural language information, such as extracting key strings or eliminating redundancy, and determine the simplified natural language information as the task prompt information of the target task. It can also perform semantic extraction on the natural language, and use the extracted semantic information and the basic attribute information of the target object to reintegrate it into a natural language instruction, which is the final task prompt information.
[0112] For example, the electronic device can extract from "Recommend to me alumni from the same school" the pending task of finding an account belonging to the same school as the target account, and integrate this information with the basic attribute information of the target account (such as the account identifier UID), so as to obtain the task prompt information in natural language form "Account UID that is from the same school as account UID=XXX".
[0113] It is understandable that in the embodiment of the present application, the electronic device can obtain task prompt information of the target task from the input natural language information, so that the task prompt information can accurately describe the task to be processed.
[0114] Based on Figure 3, refer to Figure 6, which is a fourth flow chart of the task processing method provided in an embodiment of the present application. In some embodiments of the present application, before S101 in Figure 3, that is, before generating the system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario, the method may also include the following processing (S106 to S108).
[0115] S106: Determine a task definition prompt based on the task definition of the target task in the business scenario.
[0116] In an embodiment of the present application, an electronic device can automatically construct task prompt information for a target task. First, the electronic device obtains a task definition for the target task. The task definition can describe the specific content and task requirements of the target task, such as the processing performed by the target task or the conditions that need to be met during the processing of the target task. The electronic device then generates prompt information for the task definition. The resulting prompt information is the task definition prompt.
[0117] It should be noted that the task definition of the target task can be specified by a natural language definition text when the target task is created, so that the electronic device can obtain the definition of the target task based on the semantic analysis of the definition text. For example, when the definition text is "query for accounts that match the input conditions", the electronic device can use "query for UIDs that meet the conditions" as the task definition; it can also extract key strings from the definition text and use the extracted key strings as the definition of the target task.
[0118] In some embodiments of the present application, S106 in Figure 6, i.e., determining the task definition prompt based on the task definition of the target task in the business scenario, can be achieved by the following processing: matching the task definition of the target task in the business scenario in the instruction template library, and determining the matched instruction as the task definition prompt. At this time, the determination of the task definition prompt is completed.
[0119] The electronic device may use an indication in the indication template library that contains information about the task definition, such as an indication that contains a key string or language information of the task definition, as an indication that matches the task definition, thereby obtaining a task definition prompt. The electronic device may also use an indication in the indication template library that contains all the contents of the entire task definition as an indication that matches the task definition, thereby obtaining a task definition prompt.
[0120] It should be noted that the indication template library includes various indications, which may be indications of historical tasks, commonly used indications with a usage frequency greater than a specified frequency, indications preset based on business functions of business scenarios, or a combination of the above, etc. The Senqiang embodiment itself does not limit this.
[0121] In some embodiments of the present application, S106 in Figure 6, i.e., determining the task definition prompt based on the task definition of the target task in the business scenario, can also be achieved by the following processing: formatting the task definition according to the preset format of the prompt to obtain the task definition prompt.
[0122] That is, the prompt generally has a unique format, and the electronic device adjusts the task definition according to the format and determines the adjusted result as the task definition prompt. The adjustment may include character alignment, standard language conversion, etc. (for example, converting Chinese to English, etc.).
[0123] S107 : Extracting task input data of the target task from the scenario data of the business scenario, and generating a task input prompt of the target task based on the task input data.
[0124] The electronic device acquires data related to the business scenario, thereby obtaining scenario data for the business scenario. The electronic device then extracts the data required to perform the target task from the acquired scenario data and uses this data as the task input data for the target task. The electronic device then uses the task input data to construct an input prompt for the target task, thereby obtaining the corresponding task input prompt.
[0125] In some embodiments, the electronic device may integrate the extracted task input data into a natural language text and use the text as a task input prompt. For example, when the task input data is "female", "age not exceeding 30 years old", "travel", "reading", and "food", the electronic device may use "female age not exceeding 30 years old, who likes reading, travel, and food" as the task input prompt. Of course, in some embodiments, the electronic device may also directly use the extracted task input data as a task input prompt, which is not limited in the embodiments of the present application.
[0126] S108: Determine the integration result of the task definition prompt and the task input prompt as task prompt information.
[0127] After obtaining the task definition prompt and the task input prompt, the electronic device may integrate the task definition prompt and the task input prompt into one text, or into one sentence. The integrated text or sentence is the task prompt information.
[0128] Of course, in addition to the task definition prompt and the task input prompt, there may also be other prompts in the task prompt information, such as the task output prompt.
[0129] In some embodiments of the present application, after S107 of Figure 6, that is, after extracting the task input data of the target task from the scenario data of the business scenario and generating the task input prompt of the target task based on the task input data, the task processing method may also include the following processing: generating a task output prompt of the target task based on the preset response style of the target task; and determining the integrated result of the task definition prompt, task input prompt and task output prompt as task prompt information.
[0130] The preset reply style is used to constrain the style of the processing result of the target task. Thus, in the embodiment of the present application, the electronic device constrains the style of the processing result of the target task through the preset reply style, so that the processing result of the target task can be standardized.
[0131] Of course, in addition to constraining the style of the processing results, other content may also exist in the preset response style. This content may be used to indicate the starting position of the output information, or may be used to be merged with the output information into a natural language statement.
[0132] On this basis, after S102 in Figure 3, that is, calling the task system of the target task and processing the system interaction parameters, the task method can also include the following processing: based on the output information of the task system of the target task on the system interaction parameters, and the task output prompt in the task prompt information, determine the processing result corresponding to the target task.
[0133] That is, when there is a task output prompt in the task prompt information, the electronic device processes the output information according to the task output prompt, so that the obtained processing result meets the constraints of the preset reply style, thereby improving the standardization of the processing result.
[0134] In some embodiments of the present application, the processing result corresponding to the target task is determined based on the output information of the task system of the target task on the system interaction parameters, and the task output prompt in the task prompt information. This can be achieved by the following processing: using the output information of the task system of the target task on the system interaction parameters, the mask part in the task output prompt is completed, and the completed task output prompt is determined as the processing result corresponding to the target task.
[0135] In an embodiment of the present application, a mask portion to be filled in the task output prompt is reserved for the output information of the task system for the system interaction parameters. The electronic device uses the output information to replace the mask portion to complete the task output prompt. The completed task prompt information is the final processing result of the target task.
[0136] For example, the task output prompt may be "The UID you want to query = [mask] (called the mask part)", and the task system's output information for the system interaction parameters is 1000, then the final processing result of the target task may be "The UID you want to query = 1000".
[0137] In some embodiments of the present application, the processing result corresponding to the target task is determined based on the output information of the task system for the system interaction parameters of the target task and the task output prompt in the task prompt information. This can also be achieved through the following processing: according to the requirements of the task output prompt, natural language text is generated for the output information, and the generated text is determined as the processing result of the target task.
[0138] That is, the task output prompt specifies the conditions for the natural language text to be presented, and the electronic device directly uses the natural language text generated for the output information according to the conditions as the final processing result.
[0139] For example, the task output prompt may include "Display output information. Add a description of the task system's output information to indicate that the output information has been obtained." In this case, the electronic device may generate text such as "The processing you requested has been completed, and the result obtained is UID=1000" for the output information. This text is the processing result of the target task.
[0140] It can be understood that in an embodiment of the present application, the electronic device can combine output information and task output prompts to obtain processing results with intuitive semantic features; this can be easily directly applied to tasks to be presented and described in natural language, thereby increasing the types of task processing that can be performed on data in business scenarios.
[0141] The following describes an exemplary application of the embodiment of the present application in a practical application scenario. The exemplary application describes a task of performing social account recommendation in a social application.
[0142] It should be noted that the exemplary application provided in the embodiment of the present application is implemented in a scenario of expanding social relationships and points of interest; thus, the exemplary application provided in the embodiment of the present application includes two different social distribution tasks, one is friend recommendation for social scenarios (referred to as target tasks), and the other is content recommendation for interest expansion scenarios (referred to as target tasks).
[0143] First, the overall system architecture when expanding social relationships and points of interest in the embodiments of the present application is described.
[0144] Figure 7 is a schematic diagram of the system architecture for expanding social relationships and points of interest provided by an embodiment of the present application. Referring to Figure 7, the system includes multiple user terminals 7-1 (three are shown as an example), a message and content service access server 7-2, a message and content database 7-3, a message system 7-4, a reporting and analysis interface service 7-5, a statistical analysis database 7-6, a feature extraction service 7-7, an enhanced social relationship and interest processing model 7-8, an enhanced social relationship and interest processing service 7-9, a platform system business service 7-10, an instruction fine-tuning sample library 7-11, and a large language pre-training model 7-12.
[0145] Among them, the user terminal 7-1 communicates with the message and content service access server 7-2 to send messages or obtain content (also known as synchronous messages and downlink content) to complete the uplink and downlink message functions. In addition, content producers such as PCG or UGC provide distributed content through mobile terminals or back-end interface APIs, such as captured videos, pictures, etc.; the user terminal 7-1 is the carrier of functions for various scenarios. When publishing content, the user terminal 7-1 will obtain the interface address of the upload server and then upload local files; the user terminal 7-1 communicates with the reporting and analysis interface service 7-5 to realize user full-scene features and feedback reporting, that is, to collect feature data of each sub-business scenario under different full-business scenarios.
[0146] The message and content access server 7-2 is used to synchronize messages and distribute content to the user terminal 7-1; connect the message content to the message and content database 7-3 through the message system 7-4 to write messages or access different services; communicate with the user terminal 7-1, and directly connect the content submitted by the user terminal 7-1, such as the title, publisher, summary, cover image, release time or the file size, cover image connection, bit rate, file format, title, release time, author and other information of the video to the server through the server, and store the stored content in the message and content database 7-3 to realize the writing and storage of information.
[0147] The message and content database 7-3 is used to temporarily store messages from the user terminal 7-1, as well as to realize message roaming and multi-terminal synchronization; to save the original metadata of the content; and to save the metadata of the content after standard transcoding operations (such as file size, bit rate, rules, cover image, etc.).
[0148] The message system 7-4 is used to communicate with the message and content access server 7-2 to achieve message distribution.
[0149] The reporting and analysis interface service 7-5 communicates with the user terminal 7-1, receives reported user full-scene characteristics and feedback, such as reports and feedback on content distribution quality, etc.; and writes statistical information and samples to the statistical analysis database 7-6.
[0150] The statistical analysis database 7-6 is used to connect with the reporting and analysis interface service 7-5, save the desensitized messages and content, and perform preliminary processing such as cleaning and verification on the data of different sub-business scenarios; analyze the user's interests based on the data of different sub-business scenarios (such as social data, behavioral data, user and content attribute data, etc.).
[0151] The feature extraction service 7-7 is used to extract basic features of users, such as age, gender, education level, etc., based on the data in the statistical analysis database 7-6; the extracted basic features are used as the data source for constructing the enhanced social relationship and interest processing model 7-8.
[0152] The enhanced social relationship and interest processing model 7-8 is constructed using the large language pre-training model 7-12, that is, the model obtained after the constructed prompts (called task prompt information) are injected into the large language pre-training model 7-12. The input of the prompts during construction includes the user's social relationships, social relationship pairs, points of interest, basic features and related descriptions, user conversation query history and preset reply result styles (called preset reply styles).
[0153] The enhanced social relationship and interest processing service 7-9 refers to the service obtained after the enhanced social relationship and interest processing model 7-8 is service-oriented.
[0154] The platform system business service 7-10 generally refers to the platform's operating system, such as the content recommendation system, friend recommendation system, targeted delivery system, etc. During operation, it calls the enhanced social relationship and interest processing service 7-9 to obtain business recommendation results (referred to as processing results) and distributes the business recommendation results through the message and content access server 7-2.
[0155] The Command Fine-tuning Sample Library 7-11 is used to obtain user feedback and feature data from the Reporting and Analysis Interface Service 7-5. This library pairs sample data representing interactive natural language access and actual generated results. The large-scale language pre-training model 7-12 reads fine-tuning samples from the Command Fine-tuning Sample Library 7-11 for data alignment. This involves enhancing the base language model through command fine-tuning, ensuring that the generated results can be applied by the next-level social relationship system.
[0156] Large-scale language pre-training models 7-12 refer to models with a generative Transform architecture constructed using massive (greater than the specified amount of data) basic predictions. For example, the large language model LlaMa and the large language model GLM can both be used as large-scale language pre-training models 7-12.
[0157] Next, the processing of enhancing the social relationship and interest processing model is explained.
[0158] In the embodiment of the present application, the enhanced social relationship and interest processing model refers to the integration of a large language pre-training model (called a natural language processing model) and an existing social relationship system model (called a task system). In the embodiment of the present application, the entrances of the large language pre-training model and the social relationship system model are integrated together so that the two models can work together, thereby absorbing and utilizing the advantages of each model. At the same time, the online usage feedback results (called benchmark scoring information) are introduced into the large language pre-training model through RLHF so that the output results can be aligned with the expected results.
[0159] For example, Figure 8 is a schematic diagram of the collaborative work of the large-scale language pre-training model and the social relationship system model provided in an embodiment of the present application. First, it is necessary to extract the account's social relationship pairs 8-2, social relationships 8-3, points of interest 8-4, and basic features 8-5 from the sub-business scenario data 8-1, and then construct prompts 8-6 based on this extracted information, and inject the constructed prompts 8-7 (called task prompt information) into the large-scale language pre-training model 8-8. Then, the social relationship model system 8-10 is called through the collaborative work plug-in system 8-9, such as the sorting system 8-101 (sorting based on relationship intimacy + personalized preference + diversity + negative feedback) and the recall system 8-102 (performing relationship chain recall, stranger interest recall, relationship + interest recall), and the social relationship model system 8-10 is used to operate the parameter instructions (called system interaction parameters) generated by the large language pre-training model 8-8 for the prompt 8-7, and the operation results are input again into the large language pre-training model 8-8 (including the encoder-decoder model structure (Transformers model structure) L1, the encoder-decoder model structure L2, and the encoder-decoder model structure L12) to obtain the recommendation results of targeted user mining / friend recommendation / acquaintances (called processing results), and display the recommendation results. To improve the accuracy of task outputs, the large-scale language pre-training model 8-8 is aligned with the standard expected results before the model is officially launched. During the alignment, the final results provided for the existing tasks (called training tasks) and the result feedback 8-11 for this final result are called upon to improve the results through reinforcement learning. For example, the scoring scores in the result feedback 8-11 are used to build a scoring model (called an evaluation model). In the actual application process after the launch, the scoring model is used to score the multiple results (called multiple sub-output information) output by the social relationship model system, and the result with the highest score is selected for output.
[0160] Of course, in addition to the account's social relationships, social relationship pairs, points of interest, and basic information, the input for constructing prompts 8-7 can also include historical account interaction content queries and preset response result styles (usually detailed parameters are obtained according to the plug-in access protocol and required parameters of the social relationship model system, including points of interest, scenes, locations, target search result format, relationship density, location attributes, etc., and their combinations). The constructed prompts are injected into the large-scale language pre-training model for debugging. After debugging and alignment, the input natural language interaction instructions are converted into corresponding parameters of the social relationship model system, and the parameters are called according to the protocol and description of the plug-in interface to implement task execution.
[0161] The explanation of prompt 8-7 is as follows.
[0162] Prompts are structurally divided into Task Definition Prompts, Task Input Prompts, and Task Output Prompts. The number of placeholders for each prompt can be freely configured. The number of placeholders for Task Input Prompts is typically greater than that for Task Output Prompts, and greater than that for Task Definition Prompts. For example, the number of placeholders can be set to 1024.
[0163] Among them, the task definition prompt represents the description prompt method and requirements of all social relationship and interest enhancement task definitions, such as all relevant social accounts, constraints on social accounts, or related points of interest and extensions of points of interest; the task input prompt expresses the information of the task input, such as the tags of the social relationships of social accounts, social relationship pairs and social account points of interest, basic characteristics of social accounts and their descriptions; the task output prompt is used to define the style and partial content of the task output results, such as UID, points of interest, scenes, locations, target retrieval result formats, relationship intimacy, location attributes, etc. and their combinations.
[0164] Illustratively, five examples of prompts 8-7 are given below.
[0165] 1) Account UID = XXXXX's 20 closest account UIDs, female, under 30 years old, likes reading, traveling, and food;
[0166] 2) An account UID from the same school and company as the account UID = XXXXX;
[0167] 3) An account UID that lives in City B with account UID = XXXXX and enjoys skiing, movies, and music;
[0168] 4) Account UID of a female who works in City C, is under 30 years old, and likes anime and food;
[0169] 5) First-degree and second-degree connections of account UID=XXXXX.
[0170] The social relationship model system of the present application embodiment can be implemented using a two-layer system: a graph storage layer and an operator operation layer. The graph storage layer is used to store the graph network's topology, node attribute information, a fast-adopting indexing mechanism, and a caching mechanism. The operator operation layer can integrate the basic operators of the GNN algorithm into the existing machine learning framework to simplify the operator calling process.
[0171] It is understandable that in the embodiments of the present application, when user information is involved, such as social relationships, social relationship pairs, points of interest, basic features and other related data, when the embodiments of the present application are applied to specific products or technologies, it is necessary to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions. In addition, in the embodiments of the present application, when the data capture technical solution involved is implemented, when the above embodiments of the present application are applied to specific products or technologies, the relevant data collection, use and processing processes should comply with the requirements of national laws and regulations, comply with the principles of legality, legitimacy and necessity, do not involve obtaining data types prohibited or restricted by laws and regulations, and will not hinder the normal operation of related applications. In addition, the relevant data collection and processing in the embodiments of the present application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and personal information subjects.
[0172] The following further describes an exemplary structure of the task processing device 255 provided in an embodiment of the present application implemented as a software module. In some embodiments, as shown in FIG2 , the software modules stored in the task processing device 255 of the memory 250 may include:
[0173] The parameter generation module 2551 is configured to generate system interaction parameters corresponding to the target task in the business scenario based on the task prompt information corresponding to the target task; wherein the task prompt information is used to describe the target task in the form of natural language, and the system interaction parameters are used to describe the target task in the form of machine instructions;
[0174] The parameter processing module 2552 is configured to call the task system of the target task and process the system interaction parameters;
[0175] The result determination module 2553 is configured to determine the processing result corresponding to the target task based on the output information of the task system of the target task for the system interaction parameters.
[0176] In some embodiments of the present application, the parameter generation module 2551 is further configured to perform semantic analysis on the task prompt information corresponding to the target task in the business scenario to obtain a analysis result; wherein the number of parameters of the natural language processing model is greater than a quantity threshold; and parameter generation is performed based on the analysis result to obtain the system interaction parameters corresponding to the target task.
[0177] In some embodiments of the present application, the output information includes multiple sub-output information; the result determination module 2553 is also configured to generate evaluation information for each sub-output information; based on the evaluation information, the multiple sub-output information are filtered, and based on the filtered sub-output information, the processing result corresponding to the target task is determined.
[0178] In some embodiments of the present application, the generation of the evaluation information is realized by an evaluation model, and the task processing device 255 also includes a model generation module 2554, which is configured to generate training interaction parameters corresponding to the training task based on the training prompt information corresponding to the training task in the business scenario; call the task system of the training task to process the training interaction parameters; determine the multiple training processing results corresponding to the training task based on the multiple sub-training output information of the training interaction parameters of the task system of the training task; train the initial model based on the multiple benchmark scoring information of the multiple training processing results, and the multiple training scoring information generated by the initial model for the multiple training processing results, until the training is completed to obtain the evaluation model.
[0179] In some embodiments of the present application, the result determination module 2553 is also configured to generate matching text for the output information of the task system of the target task for the system interaction parameters; wherein the matching text is used to describe the output information in the form of natural language; and the matching text is determined as the processing result corresponding to the target task.
[0180] In some embodiments of the present application, the task processing device 255 also includes a prompt determination module 2555, which is configured to obtain natural language information input for the target task in the business scenario; and determine the task prompt information corresponding to the target task in the business scenario based on the natural language information.
[0181] In some embodiments of the present application, the prompt determination module 2555 is further configured to determine a task definition prompt based on the task definition of the target task in the business scenario; extract task input data of the target task from the scenario data of the business scenario; generate a task input prompt for the target task based on the task input data; and determine the integration result of the task definition prompt and the task input prompt as the task prompt information.
[0182] In some embodiments of the present application, the prompt determination module 2555 is further configured to match the task definition of the target task in the business scenario in the instruction template library, and determine the matched instruction as the task definition prompt to complete the generation of the task definition prompt.
[0183] In some embodiments of the present application, the prompt determination module 2555 is further configured to generate a task output prompt for the target task based on a preset response style of the target task; wherein the preset response style is used to constrain the style of the processing result of the target task; and the integrated result of the task definition prompt, the task input prompt and the task output prompt is determined as the task prompt information.
[0184] In some embodiments of the present application, the result determination module 2553 is further configured to determine the processing result corresponding to the target task based on the output information of the task system of the target task for the system interaction parameters and the task output prompt in the task prompt information.
[0185] In some embodiments of the present application, the result determination module 2553 is also configured to complete the mask part in the task output prompt based on the output information of the task system of the target task for the system interaction parameters; and determine the completed task output prompt as the processing result corresponding to the target task.
[0186] In some embodiments of the present application, the parameter generation module 2551 is further configured to perform semantic analysis on the task prompt information through a natural language processing model, and the number of parameters of the natural language processing model is greater than a quantity threshold.
[0187] In some embodiments of the present application, the result determination module 2553 is further configured to generate the matching text through a natural language processing model.
[0188] An embodiment of the present application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer program or computer-executable instructions from the computer-readable storage medium and executes the computer program or computer-executable instructions, causing the electronic device to perform the task processing method described above in the embodiment of the present application.
[0189] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, the processor will execute the task processing method provided by an embodiment of the present application, for example, the task processing method shown in Figure 3.
[0190] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.
[0191] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0192] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).
[0193] By way of example, computer-executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.
[0194] In summary, through the embodiments of the present application, it is possible to trigger and complete the task processing of the target task based only on natural language instructions, without the need for code development for the target task. This not only saves the time required for code development, quickly starts task processing of the target task, and improves the efficiency of task processing, but also, compared to code, natural language instructions are easier to generate and use, thereby reducing the operational difficulty of task processing. Furthermore, through the embodiments of the present application, if the combination of business scenarios and data changes, that is, when the task to be processed changes, it is only necessary to change the natural language task interaction prompt information. In this way, all types of tasks can be processed normally, which also broadens the scope of tasks that can be processed; semantic parsing of task prompt information by a natural language processing model can eliminate the semantic differences of the same data in different business scenarios, thereby improving the accuracy of the parsing results.
[0195] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.
Claims
1. A task processing method, the method being executed by an electronic device, the method comprising: Based on the task prompt information corresponding to the target task in the business scenario, generate the system interaction parameters corresponding to the target task; The task prompt information is used to describe the target task in the form of natural language, and the system interaction parameter is used to describe the target task in the form of machine instructions; Calling the task system of the target task to process the system interaction parameters; Based on the output information of the task system of the target task for the system interaction parameter, a processing result corresponding to the target task is determined.
2. The method according to claim 1, wherein: The generating of the system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario includes: Performing semantic analysis on the task prompt information corresponding to the target task in the business scenario to obtain an analysis result; Parameters are generated based on the analysis results to obtain the system interaction parameters corresponding to the target task.
3. The method according to claim 2, wherein: The semantic analysis is implemented through a natural language processing model, and the number of parameters of the natural language processing model is greater than a quantity threshold.
4. The method according to claim 1, wherein: The output information includes a plurality of sub-output information; the output information of the task system based on the target task for the system interaction parameter, determining the processing result corresponding to the target task, includes: generating evaluation information for each of the sub-output information; Based on the evaluation information, screening the plurality of sub-output information; The processing result corresponding to the target task is determined based on the filtered sub-output information.
5. The method according to claim 4, wherein: The generation of the evaluation information is realized by the evaluation model, and the evaluation model is obtained by the following processing: Based on the training prompt information corresponding to the training task in the business scenario, generating a training interaction parameter corresponding to the training task; Calling the task system of the training task to process the training interaction parameters; Determining a plurality of training processing results corresponding to the training task based on a plurality of sub-training output information of the task system for the training interaction parameter of the training task; Based on multiple benchmark scoring information of multiple training processing results and multiple training scoring information generated by the initial model for the multiple training processing results, the initial model is trained until the training is completed to obtain the evaluation model.
6. The method according to claim 1, wherein: The output information of the task system of the target task on the system interaction parameter, determining the processing result corresponding to the target task, includes: Generate matching text for the output information of the task system of the target task for the system interaction parameter; wherein the matching text is used to describe the output information in the form of natural language; The matching text is determined as the processing result corresponding to the target task.
7. The method according to claim 6, wherein: The generation of the matching text is achieved through a natural language processing model.
8. The method according to any one of claims 1 to 7, wherein: Before generating the system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario, the method further includes: Acquire natural language information input for the target task in the business scenario; Based on the natural language information, the task prompt information corresponding to the target task in the business scenario is determined.
9. The method according to any one of claims 1 to 7, wherein: Before generating the system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario, the method further includes: Determining a task definition prompt based on the task definition of the target task in the business scenario; Extracting task input data of the target task from the scenario data of the business scenario; generating a task input prompt for the target task based on the task input data; An integration result of the task definition prompt and the task input prompt is determined as the task prompt information.
10. The method according to claim 9, wherein: The determining of a task definition prompt based on the task definition of the target task in the business scenario includes: Matching the task definition of the target task in the business scenario in an indication template library; The matched instruction is determined as the task definition prompt.
11. The method according to claim 9, wherein: After generating the task input prompt of the target task based on the task input data, the method further includes: Based on the preset reply style of the target task, generating a task output prompt of the target task; wherein the preset reply style is used to constrain the style of the processing result of the target task; An integration result of the task definition prompt, the task input prompt and the task output prompt is determined as the task prompt information.
12. The method according to claim 11, wherein: After the task system of the target task is called and the system interaction parameter is processed, the method further includes: The processing result corresponding to the target task is determined based on the output information of the task system of the target task on the system interaction parameter and the task output prompt in the task prompt information.
13. The method according to claim 12, wherein: The step of determining the processing result corresponding to the target task based on the output information of the task system for the system interaction parameter and the task output prompt in the task prompt information includes: Based on the output information of the task system of the target task for the system interaction parameter, completing the mask part in the task output prompt; The completed task output prompt is determined as the processing result corresponding to the target task.
14. A task processing device, comprising: The parameter generation module is configured to generate the system interaction parameters corresponding to the target task based on the task prompt information corresponding to the target task in the business scenario; wherein the task prompt information is used to The target task is described, and the system interaction parameter is used to describe the target task in the form of machine instructions; A parameter processing module, configured to call the task system of the target task and process the system interaction parameters; The result determination module is configured to determine the processing result corresponding to the target task based on the output information of the task system of the target task for the system interaction parameters.
15. An electronic device for task processing, the electronic device comprising: Memory for storing computer programs or computer executable instructions; A processor, configured to implement the task processing method according to any one of claims 1 to 13 when executing the computer program or computer executable instructions stored in the memory.
16. A computer-readable storage medium storing a computer program or a computer-executable instruction, wherein the computer program or the computer-executable instruction, when executed by a processor, implements the task processing method according to any one of claims 1 to 13.
17. A computer program product, comprising a computer program or a computer executable instruction, wherein the computer program or the computer executable instruction, when executed by a processor, implements the task processing method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Natural language instruction information processing method and device, equipment and medium
CN115756610A
Human-computer interaction system based on natural language
CN116402057A
Task processing method and device, equipment, storage medium and program product
CN116700839A
Interface for initiating an integration task
US20200175048A1
Cited By
Text generation method and device, electronic equipment and storage medium
CN119719356A
Humanoid robot industrial task scene generation method and system based on large language model
CN120735021A
Cloud function configuration detection method based on large language model
CN120822615A
Natural language driven mechanical arm control method, device, equipment, medium and product
CN120886271A