Information processing method and device, equipment, storage medium and computer program product
By recalling and pruning the to-called interface, the shortcomings of large language models in inference and new knowledge processing are solved, and more efficient and accurate information processing is achieved.
Patent Information
- Application Number
- CN202311582330.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2025-05-23
AI Technical Summary
Existing large language models perform poorly in mathematics, symbolic and common sense reasoning, and rely on memory modules and task queue modules for information processing, and cannot effectively process new knowledge outside of training data.
By recalling and pruning the interfaces to be called, the interfaces that are finally used for information processing are determined, and these interfaces are used to process information to be processed to improve the accuracy of information processing.
It significantly improves the information processing accuracy of the to-process information, improves the information processing efficiency, and can process the user's to-process information more accurately.
Smart Images

Figure CN120031109A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of the Internet, and relate to but are not limited to an information processing method, apparatus, device, storage medium, and computer program product. Background Art
[0002] At present, large language models (LLMs) can demonstrate high performance in both language understanding and interactive decision-making tasks, and the reasoning ability (such as thought chain prompts) and action ability (such as action plan generation) of LLM models are also relatively outstanding compared to other technologies.
[0003] In the related art, on the one hand, the scale of LLM models is getting larger and larger, but even the largest language models currently available often find it difficult to perform well in tasks involving reasoning. In other words, current LLM models usually find it difficult to perform well in mathematical, symbolic, and common sense reasoning. On the other hand, when the LLM model is applied, the structure used mainly relies on the memory module to supplement or simplify task execution and creation; the task queue module controls the order of task execution; and the rest of the structure relies on the capabilities of large language models to complete, such as subtask execution, subtask generation, and task sorting. In other words, the related art only provides a framework, and does not fully utilize tools other than the LLM model to help improve the large language model to complete the tasks proposed by the user. It relies more on the basic functions within the large language model to solve the problem.
[0004] It can be seen that in the related art, since the LLM models are all fixed models that have been trained, new knowledge outside the training data cannot be obtained through large language models. Therefore, the related art cannot effectively use the trained LLM models to perform accurate information processing on the information to be processed. Summary of the invention
[0005] The embodiments of the present application provide an information processing method, apparatus, device, storage medium and computer program product, which can be applied at least in the fields of artificial intelligence and cloud technology. By recalling and pruning the interfaces to be called to determine the interfaces to be called that are ultimately used for information processing, and using the interfaces to be called to process the information to be processed, the accuracy of information processing on the user's information to be processed can be greatly improved.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] An embodiment of the present application provides an information processing method, including: obtaining information to be processed and interface information of an interface to be called in a set of interfaces to be called; based on the interface information of the interface to be called, recalling the interface to be called related to the information to be processed from the set of interfaces to be called; calling the recalled interface to be called, performing information processing on the information to be processed, and obtaining an interface processing result of the recalled interface to be called; using a batch processing method, based on the interface processing result of the recalled interface to be called, pruning the recalled interface to be called, and obtaining a pruned interface to be called; calling the pruned interface to be called, performing information processing on the information to be processed, and obtaining an information processing result of the information to be processed.
[0008] An embodiment of the present application provides an information processing device, including: an acquisition module, used to acquire information to be processed and interface information of an interface to be called in a set of interfaces to be called; a recall module, used to recall, from the set of interfaces to be called, interfaces to be called that are related to the information to be processed based on the interface information of the interface to be called; an information processing module, used to call the recalled interface to be called, perform information processing on the information to be processed, and obtain an interface processing result of the recalled interface to be called; a pruning processing module, used to prune the recalled interface to be called in a batch processing manner based on the interface processing result of the recalled interface to be called, and obtain a pruned interface to be called; the information processing module is also used to call the pruned interface to be called, perform information processing on the information to be processed, and obtain an information processing result of the information to be processed.
[0009] In some embodiments, the recall module is further used to: determine the correlation between the information to be processed and each of the interfaces to be called based on the interface information of the interfaces to be called; and recall the interfaces to be called whose correlation is greater than a correlation threshold from the set of interfaces to be called.
[0010] In some embodiments, the recall module is also used to: input the information to be processed and the interface information into a pre-trained language representation model; perform text feature extraction on the information to be processed and the interface information respectively through the feature extraction layer of the language representation model, and obtain a feature vector to be processed and an interface feature vector correspondingly; perform pooling processing on the feature vector to be processed and the interface feature vector respectively through the pooling layer of the language representation model, and obtain a pooled feature vector to be processed and an interface pooled feature vector; perform classification processing on the pooled feature vector to be processed and the interface pooled feature vector through the classification layer of the language representation model, and obtain the similarity between the information to be processed and the interface information, and determine the similarity as the correlation between the information to be processed and the interface to be called.
[0011] In some embodiments, the device also includes a sample data construction module, which is used to obtain sample data for training the language representation model through the following steps: obtaining sample interface information of a sample call interface; inputting the sample interface information into a pre-trained information generation model, and predicting predicted text information corresponding to the sample interface information through the information generation model; the predicted text information is text information predicted by the information generation model to have a positive correlation with the sample interface information; the predicted text information and the sample interface information constitute a pair of positive sample pairs; randomly generating random text information corresponding to the sample interface information; the random text information and the sample interface information constitute a pair of negative sample pairs; and determining all positive sample pairs and all negative sample pairs as sample data for training the language representation model.
[0012] In some embodiments, the information processing module is also used to: obtain interface information of the recalled interface to be called, and determine input parameters for calling the recalled interface to be called based on the interface information; call each recalled interface to be called in a multi-threaded parallel calling manner, and input the input parameters to the corresponding interface to be called, and perform information processing on the information to be processed in parallel based on the input parameters through the interface to be called to obtain the interface processing result of each recalled interface to be called.
[0013] In some embodiments, the pruning processing module is also used to: use a batch processing method to input the interface processing results of the recalled interface to be called and the information to be processed into a pre-trained text evaluation model; output the evaluation classification result between the interface processing results of the recalled interface to be called and the information to be processed through the text evaluation model; and prune the recalled interface to be called based on the evaluation classification result to obtain the pruned interface to be called.
[0014] In some embodiments, the pruning processing module is also used to: synchronously extract the feature vector of the interface processing result of each recalled interface to be called and the interface feature vector of the information to be processed through the feature extraction layer of the text evaluation model; respectively perform pooling processing on the feature vector of the interface processing result of each recalled interface to be called and the interface feature vector through the pooling layer of the text evaluation model to obtain the interface processing pooling feature vector and the interface pooling feature vector; perform evaluation and classification processing on the interface processing pooling feature vector of the interface processing result of each recalled interface to be called and the interface pooling feature vector through the classification layer of the text evaluation model to obtain the evaluation and classification result between the interface processing result of each recalled interface to be called and the information to be processed.
[0015] In some embodiments, the device also includes: a feature processing module, which is used to determine the text length of each recalled interface processing result of the interface to be called when extracting the feature vector of the interface processing result; determine the feature dimension of the feature vector of the interface processing result with the maximum text length; and use the feature dimension as the feature extraction standard to sequence fill the feature vectors of other extracted interface processing results to obtain the feature vectors of the other interface processing results.
[0016] In some embodiments, the device also includes: an information update module, which is used to update the information to be processed based on the interface processing result of the pruned interface to be called after pruning the recalled interface to be called, so as to obtain updated information to be processed; a secondary processing module, which is used to perform secondary recall and secondary pruning on the pruned interface to be called in sequence based on the updated information to be processed, so as to obtain the interface to be called after secondary pruning; the information processing module is also used to: call the interface to be called after the secondary pruning, perform information processing on the updated information to be processed, and obtain the information processing result of the information to be processed.
[0017] In some embodiments, the secondary processing module is also used to: based on the updated information to be processed, perform the secondary recall on the pruned interface to be called to obtain the secondary recalled interface to be called; call the secondary recalled interface to be called, perform information processing on the updated information to be processed, and obtain the interface update processing result of the secondary recalled interface to be called; adopt a batch processing method, based on the interface update processing result of the secondary recalled interface to be called, perform the secondary pruning processing on the secondary recalled interface to be called, and obtain the secondary pruned interface to be called.
[0018] In some embodiments, the number of secondary recalls is at least one, and the number of secondary pruning processes is at least one; the device also includes: a control module, which is used to stop the secondary recall and secondary pruning processes when the secondary pruned interface to be called obtained after any secondary recall and secondary pruning process meets the preset interface query stop condition, and determine the secondary pruned interface to be called as the interface to be called for the final query; the information processing module is also used to: call the interface to be called for the final query, perform information processing on the updated information to be processed, and obtain the information processing result of the information to be processed.
[0019] In some embodiments, the device also includes: an information update evaluation module, which is used to perform information update evaluation on the updated information to be processed to obtain an information update evaluation value; a quantity determination module, which is used to determine the number of updated information to be processed whose information update evaluation value is less than the evaluation value threshold; a deletion processing module, which is used to delete the updated information to be processed if the number is greater than the number threshold, and based on the information to be processed, perform the secondary recall and the secondary pruning processing on the pruned interface to be called in sequence to obtain the secondary pruned interface to be called.
[0020] In some embodiments, the device also includes: an interface classification module, which is used to classify the interfaces to be called in the set of interfaces to be called before recalling the interfaces to be called related to the information to be processed from the set of interfaces to be called, so as to obtain subsets of interfaces to be called with different interface types; an interface quality assessment module, which is used to perform quality assessment on the interfaces to be called in each subset of interfaces to be called, and delete the interfaces to be called whose quality assessment results are less than the quality assessment threshold in each subset of interfaces to be called, so as to obtain a screened subset of interfaces to be called; an information compression module, which is used to compress the interface information of the interfaces to be called in the screened subset of interfaces to be called, so as to obtain interface compression information of the interfaces to be called; the recall module is also used to: based on the interface compression information of the interfaces to be called in the screened subset of interfaces to be called, recall the interfaces to be called related to the information to be processed from the screened subset of interfaces to be called.
[0021] An embodiment of the present application provides an electronic device, including: a memory for storing executable instructions; and a processor for implementing the above-mentioned information processing method when executing the executable instructions stored in the memory.
[0022] An embodiment of the present application provides a computer program product, which includes executable instructions stored in a computer-readable storage medium; wherein a processor of an electronic device reads the executable instructions from the computer-readable storage medium and implements the above-mentioned information processing method when executing the executable instructions.
[0023] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute the executable instructions to implement the above-mentioned information processing method.
[0024] The embodiments of the present application have the following beneficial effects:
[0025] In the embodiment of the present application, on the one hand, for the information to be processed, the interfaces to be called related to the information to be processed are recalled from the set of interfaces to be called, and then, the information to be processed is processed through these recalled interfaces to be called, so that based on the interface processing results of the recalled interfaces to be called, the recalled interfaces to be called are pruned, so that the pruned interfaces to be called are finally used to perform the final information processing on the information to be processed. In this way, since the interfaces to be called are recalled and pruned in sequence from the set of interfaces to be called, the interfaces to be called that match the information to be processed are screened out, so the pruned interfaces to be called are the calling interfaces in the set of interfaces to be called that best match the information to be processed and can most accurately process the information to be processed, so calling these pruned interfaces to be called to process the information to be processed can greatly improve the accuracy of information processing on the user's information to be processed. On the other hand, since the number of recalled interfaces to be called is usually large, pruning the recalled interfaces to be called in batch mode can greatly improve the screening speed of a large number of recalled interfaces to be called, thereby increasing the speed of determining the pruned interfaces to be called, and further improving the information processing efficiency of the information to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flowchart of BabyAGI, an application example in a large language model in the related technology;
[0027] Figure 2 It is an optional architecture diagram of the information processing system provided in the embodiment of the present application;
[0028] Figure 3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0029] Figure 4 It is an optional flowchart of the information processing method provided in the embodiment of the present application;
[0030] Figure 5 is another optional flowchart of the information processing method provided in the embodiment of the present application;
[0031] Figure 6 It is a schematic diagram of the implementation process of determining the relevance provided in the embodiment of the present application;
[0032] Figure 7 It is a schematic diagram of the implementation flow of the method for obtaining sample data provided in an embodiment of the present application;
[0033] Figure 8 It is a schematic diagram of the implementation flow of the training method of the language representation model provided in the embodiment of the present application;
[0034] Fig. 9It is a schematic diagram of an implementation process of determining an evaluation classification result provided in an embodiment of the present application;
[0035] Fig.10 is a system framework diagram of an information processing system provided by an embodiment of the present application;
[0036] Fig.11 It is a schematic diagram of the structure of the SBERT provided in the embodiment of the present application;
[0037] Fig.12 It is a flowchart of constructing sample data provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0039] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is 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. Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art of the technical field of the embodiments of the present application. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0040] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with 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 part of an overall module or unit that includes the function of the module or unit.
[0041] In the related technology, on the one hand, the ReAct framework is proposed based on the LLM model. The ReAct framework is a framework for studying how to enable large language models to master reasoning and action. Its main content is: a general paradigm that combines reasoning and action with large language models to solve different language reasoning and decision-making tasks. The ReAct framework prompts the large language model to generate task-related language reasoning trajectories and actions in an interleaved manner, which enables the model to perform dynamic reasoning to create, maintain and adjust high-level plans of actions (reasoning to action), while also interacting with the external environment to incorporate additional information into reasoning (action to reasoning). The ReAct framework proposes a two-way rotation framework of reasoning->behavior and behavior->reasoning using a large language model, giving the large language model the ability to autonomously complete task goals.
[0042] However, the current large language models are getting larger and larger, but even the largest language models often have difficulty performing well in tasks involving reasoning. In other words, these language models usually have difficulty performing well in mathematical, symbolic, and common sense reasoning. In view of the limitations of reasoning logic tasks, the relevant technology also proposes the Chain of Thought (CoT). The definition of CoT is: the reasoning steps generated by humans when encountering a series of problems, and the expression of CoT is a series of short sentences, which improves the accuracy of large language model reasoning by explicitly showing the reasoning logic steps.
[0043] On the other hand, Figure 1 As shown, it is a flow chart of BabyAGI, an application example in a large language model in the related technology. The structure adopted by BabyAGI mainly relies on the memory module (Memory) to supplement or simplify the execution and creation of tasks; relies on the task queue module (Task Queue) to control the order of task execution; the rest relies on the capabilities of the large language model to complete, such as subtask execution, subtask generation, and task sorting.
[0044] However, BabyAGI only provides a framework and does not make full use of external tools to help improve the ability of the large language model to complete the tasks proposed by users. It relies more on the basic functions within the large language model to solve problems.
[0045] Based on the problems existing in the related technology, the embodiment of the present application uses a large language model to regularize the input of the application programming interface (API) to meet the input standard, and evaluates the degree to which the output result meets the expectations to evaluate the effect of calling the API interface, and uses the breadth-first search scheme to obtain as many paths to solve the problem as possible, and optimizes the breadth-first search scheme through parallel batch processing.
[0046] Specifically, in the information processing method provided by the embodiment of the present application, first, the interface information of the interface to be called in the information to be processed and the interface to be called set is obtained; and based on the interface information of the interface to be called, the interface to be called related to the information to be processed is recalled from the interface to be called set; then, the recalled interface to be called is called, and the information to be processed is processed to obtain the interface processing result of the recalled interface to be called; then, in batch processing mode, based on the interface processing result of the recalled interface to be called, the recalled interface to be called is pruned to obtain the pruned interface to be called; finally, the pruned interface to be called is called to process the information to be processed to obtain the information processing result of the information to be processed. In this way, since the recall and pruning are performed in sequence from the interface to be called set, the interface to be called that matches the information to be processed is screened out, therefore, the pruned interface to be called is the calling interface in the interface to be called set that best matches the information to be processed and can most accurately process the information to be processed, therefore, calling these pruned interfaces to be called to process the information to be processed can greatly improve the information processing accuracy of the user's information to be processed. Moreover, since the number of recalled interfaces to be called is usually large, pruning the recalled interfaces to be called in batch mode can greatly improve the screening speed of a large number of recalled interfaces to be called, thereby increasing the speed of determining the pruned interfaces to be called, and further improving the information processing efficiency of the information to be processed.
[0047] Here, firstly, an exemplary application of the information processing device of the embodiment of the present application is described, and the information processing device is an electronic device for implementing the information processing method. In one implementation, the information processing device (i.e., electronic device) provided in the embodiment of the present application can be implemented as a terminal or a server. In one implementation, the information processing device provided in the embodiment of the present application can be implemented as a laptop, a tablet computer, a desktop computer, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device, an intelligent robot, an intelligent home appliance, and an intelligent vehicle-mounted device, and any terminal with information processing function; in another implementation, the information processing device provided in the embodiment of the present application can also be implemented as a server, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected by wired or wireless communication, which is not limited in the embodiment of the present application. Next, an exemplary application when the information processing apparatus is implemented as a server will be described.
[0048] See also Figure 2 , Figure 2 This is an optional architectural diagram of the information processing system provided by an embodiment of the present application. In order to achieve accurate information processing of the information to be processed requested by the user, the embodiment of the present application provides an information processing platform, which can be implemented as an information processing application, and the information processing application can call the calling interface of other applications (such as API interface), or the information processing platform can also be implemented as a small program for implementing information processing, and the small program can call the calling interface (such as API interface) of other applications or other small programs, thereby realizing information processing of the information to be processed by calling these calling interfaces and completing the response to the user request.
[0049] Here, an information processing application is used as an example for explanation. The information processing system 10 of the embodiment of the present application includes at least a terminal 100, a network 200 and a server 300. The information processing application is running on the terminal 100, wherein the server 300 is a background server of the information processing application. The server 300 can constitute the information processing device of the embodiment of the present application, that is, the information processing method of the embodiment of the present application is implemented through the server 300. The terminal 100 is connected to the server 300 through the network 200, and the network 200 can be a wide area network or a local area network, or a combination of the two.
[0050] See also Figure 2 When processing the information to be processed by the user, the user can input the information to be processed in the client of the information processing application through the terminal 100. After receiving the information to be processed by the user, the terminal can encapsulate the information to be processed into an information processing request, and send the information processing request to the server 300 through the terminal 100. When receiving the information processing request, the server 300 responds to the information processing request, parses the information to be processed carried in the information processing request, and obtains the interface information of the interface to be called in the interface set to be called. Then, based on the interface information of the interface to be called, the server 300 recalls the interface to be called related to the information to be processed from the interface set to be called; and calls the recalled interface to be called, performs information processing on the information to be processed, and obtains the interface processing result of the recalled interface to be called; then, the server 300 adopts a batch processing mode, and based on the interface processing result of the recalled interface to be called, prunes the recalled interface to be called, and obtains the pruned interface to be called; finally, the server 300 calls the pruned interface to be called, performs information processing on the information to be processed, and obtains the information processing result of the information to be processed. After the server 300 obtains the information processing result, it can send the information processing result to the terminal 100, and the terminal 100 displays the information processing result on the current interface.
[0051] In some embodiments, the terminal 100 itself can also execute the information processing method of the embodiment of the present application, that is, after the terminal 100 receives the information to be processed input by the user, the terminal 100 obtains the interface information of the interface to be called in the interface set to be called, and the terminal 100 recalls the interface to be called related to the information to be processed from the interface set to be called based on the interface information of the interface to be called; then, the terminal 100 calls the recalled interface to be called, performs information processing on the information to be processed, and obtains the interface processing result of the recalled interface to be called; then, the terminal 100 adopts a batch processing method, and based on the interface processing result of the recalled interface to be called, prunes the recalled interface to be called to obtain the pruned interface to be called; finally, the terminal 100 calls the pruned interface to be called, performs information processing on the information to be processed, and obtains the information processing result of the information to be processed.
[0052] The information processing method provided in the embodiment of the present application can also be implemented based on a cloud platform and through cloud technology. For example, the server 300 can be a cloud server. The information to be processed and the interface information of the interface to be called in the interface set to be called are obtained through the cloud server, or the interface to be called related to the information to be processed is recalled from the interface set to be called through the cloud server, or the recalled interface to be called is called through the cloud server to process the information to be processed, or the cloud server adopts a batch processing method to prune the recalled interface to be called based on the interface processing result of the recalled interface to be called, or the cloud server calls the pruned interface to be called to process the information to be processed, etc.
[0053] In some embodiments, a cloud storage may be provided, and the interface set to be called, the interface information of the interface to be called, etc. may be stored in the cloud storage. In this way, when an information processing request is received, the interface information of the interface to be called in the interface set to be called may be directly queried from the cloud storage, so that the interface to be called in the interface set to be called can be quickly recalled and pruned, thereby obtaining the pruned interface to be called for information processing of the information to be processed, and calling these pruned interfaces to be called to process the information to be processed, thereby improving the efficiency of information processing.
[0054] It should be noted here that cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool that is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can be achieved through cloud computing.
[0055] Figure 3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 3The electronic device shown may be an information processing device, which includes: at least one processor 310, a memory 350, at least one network interface 320, and a user interface 330. The various components in the information processing device are coupled together via a bus system 340. It is understood that the bus system 340 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 340 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 340 is not shown in FIG. Figure 3 Various buses are labeled as bus system 340 .
[0056] The processor 310 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.
[0057] The user interface 330 includes one or more output devices 331 that enable presentation of media content, and one or more input devices 332 .
[0058] The memory 350 may be removable, non-removable or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drive, optical disk drive, etc. The memory 350 may optionally include one or more storage devices physically away from the processor 310. The memory 350 includes a volatile memory or a non-volatile memory, and may also 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 350 described in the embodiment of the present application is intended to include any suitable type of memory. In some embodiments, the memory 350 can store data to support various operations, and examples of these data include programs, modules, and data structures or subsets or supersets thereof, as exemplarily described below.
[0059] An operating system 351 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic businesses and processing hardware-based tasks; a network communication module 352 is used to reach other computing devices via one or more (wired or wireless) network interfaces 320. Exemplary network interfaces 320 include: Bluetooth, wireless compatibility certification (WiFi), and Universal Serial Bus (USB), etc.; an input processing module 353 is used to detect one or more user inputs or interactions from one of the one or more input devices 332 and translate the detected inputs or interactions.
[0060] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 3 An information processing device 354 stored in the memory 350 is shown. The information processing device 354 may be an information processing device in an electronic device, which may be software in the form of a program or a plug-in, and includes the following software modules: an acquisition module 3541, a recall module 3542, an information processing module 3543, and a pruning processing module 3544. These modules are logical, and therefore may be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0061] In some embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the 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 information 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.
[0062] The information processing methods provided in each embodiment of the present application can be executed by an electronic device, wherein the electronic device can be a server or a terminal, that is, the information processing methods in each embodiment of the present application can be executed by a server, can be executed by a terminal, or can be executed through interaction between a server and a terminal.
[0063] Figure 4This is an optional flow chart of the information processing method provided in the embodiment of the present application. Figure 4 The steps shown are explained as Figure 4 As shown, the execution subject of the information processing method is a server as an example for description, and the method includes the following steps S101 to S105:
[0064] Step S101, obtaining information to be processed and interface information of the interface to be called in the set of interfaces to be called.
[0065] The information to be processed may be at least one of the following types of information: voice, text, image, and video. After the user inputs the information to be processed, the information type of the information to be processed may also be determined. If the information type of the information to be processed is not a text type, the information to be processed also needs to be converted to a text type of information to be processed. For example, for voice, voice recognition may be performed, and the recognition result may be output as text type information to be processed; for images, image recognition may be performed on the images to determine the image content and text contained in the images, thereby outputting text type information to be processed; for videos, video recognition may be performed on the videos to determine the video content and text contained in the videos, thereby outputting text type information to be processed.
[0066] In some embodiments, the interface to be called in the set of interfaces to be called may be a pre-counted interface to be called. For example, multiple interfaces to be called may be counted in advance, and the interface identifier of each interface to be called may be obtained, and then the interface to be called may be counted to form the set of interfaces to be called. In the implementation process, the application interfaces of all applications installed on the terminal may be counted to form the set of interfaces to be called, or all interfaces to be called may be pre-configured to form the set of interfaces to be called.
[0067] In other embodiments, the interface to be called in the set of interfaces to be called may also be the interface to be called selected by the user when inputting the information to be processed. For example, an interface selection area may be provided on the current interface of the terminal, and multiple interfaces to be called may be provided in the interface selection area. The user may click and select multiple interfaces to be called in the interface selection area to form a set of interfaces to be called; or, multiple sets of interfaces to be called may be provided in the interface selection area for the user to select, and the user may select a set of interfaces to be called from these sets of interfaces to be called for information processing of the information to be processed.
[0068] The interface information of the interface to be called is the document content corresponding to the interface to be called, including but not limited to at least one of the following: input parameters, output content, interface restriction conditions and other information of the interface to be called. The interface information of the interface to be called can be stored in a preset storage unit of the server, and the interface identifier of the interface to be called can be mapped with the interface information and then stored in the preset storage unit. After determining the set of interfaces to be called, the interface identifier of each interface to be called in the set of interfaces to be called can be obtained, and then the interface information of the interface to be called can be obtained from the preset storage unit based on the interface identifier.
[0069] In an embodiment of the present application, the interface information of all the interfaces to be called in the set of interfaces to be called can be obtained from a preset storage unit in parallel. That is to say, a data reading operation can be performed once to obtain the interface information of all the interfaces to be called in the set of interfaces to be called at one time, thereby improving the efficiency of the data accuracy stage.
[0070] Step S102: based on the interface information of the to-be-called interface, recall the to-be-called interface related to the to-be-processed information from the to-be-called interface set.
[0071] Here, recalling the to-be-called interfaces related to the to-be-processed information from the to-be-called interface set means selecting the to-be-called interfaces related to the to-be-processed information from all the to-be-called interfaces in the to-be-called interface set. In the implementation process, the correlation between the interface information and the to-be-processed information can be determined based on the interface information of each to-be-called interface, and a certain number of to-be-called interfaces can be selected as the recalled to-be-called interfaces according to the determined correlation of all to-be-called interfaces.
[0072] In some embodiments, based on the interface information of each interface to be called, the correlation between the interface information and the information to be processed is determined, which can be achieved through a pre-trained large language model. For example, the large language model can be implemented as a language representation model, and the language representation model can be a classifier. The correlation between the interface information and the information to be processed can be determined through the language representation model, so as to screen from all interfaces to be called based on the correlation. The structure of the language representation model, the model processing process and the model training process will be described in detail below.
[0073] Step S103, calling the recalled interface to be called, performing information processing on the information to be processed, and obtaining the interface processing result of the recalled interface to be called.
[0074] In an embodiment of the present application, there are multiple recalled interfaces to be called, and each recalled interface to be called can be called to perform information processing on the information to be processed, and multiple interface processing results can be obtained accordingly. When calling the recalled interface to be called to process the information to be processed, the interface calling method and input parameters of the recalled interface to be called can be determined according to the interface information of the recalled interface to be called. Then, based on these relevant information, the interface calling method is adopted to input the input parameters into the recalled interface to be called, so as to calculate the input parameters through the information processing algorithm inside the recalled interface to be called, thereby obtaining the final interface processing result, and outputting the interface processing result.
[0075] In some embodiments, the input parameter of the recalled interface to be called may be the information to be processed, or may be an input parameter obtained after performing relevant information processing on the information to be processed.
[0076] In an embodiment of the present application, since the recalled interface to be called can be an interface of other applications that are different from the information processing application, for the server, the server only needs to input the input parameters to the recalled interface to be called based on the interface calling method of the recalled interface to be called. After obtaining the interface processing result, the server can obtain the interface processing result through the interface to be called of the other application.
[0077] In some embodiments, there are multiple recalled interfaces to be called, so when making an interface call, all recalled interfaces to be called can be called in parallel. In other words, by calling multiple recalled interfaces to be called in parallel, multiple recalled interfaces to be called can synchronously perform parallel information processing on the information to be processed, thereby greatly improving the efficiency of information processing.
[0078] Step S104, in batch processing mode, based on the interface processing results of the recalled interfaces to be called, prune the recalled interfaces to be called to obtain pruned interfaces to be called.
[0079] In an embodiment of the present application, when pruning multiple recalled interfaces to be called, a batch processing method can be used, that is, multiple interface processing results are judged in parallel to determine whether each recalled interface to be called can accurately process the information to be processed, or to determine whether the interface processing result of each recalled interface to be called after processing the information to be processed is a result with a large error.
[0080] Here, when making a judgment, it can also be realized by a large language model. For example, the large language model can be implemented as a text evaluation model, through which it can be determined whether the interface processing result of the recalled interface to be called meets the preset conditions, that is, an evaluation classification result is obtained, and based on the evaluation classification result, it can be determined whether the interface processing result of the recalled interface to be called meets the preset conditions, thereby determining whether the corresponding interface to be called needs to be pruned.
[0081] Pruning refers to deleting the recalled interfaces to be called that do not meet the preset conditions from all the recalled interfaces to be called, so as to retain some of the recalled interfaces to be called that meet the preset conditions, thereby implementing another screening of the recalled multiple interfaces to be called.
[0082] In an embodiment of the present application, the number of interfaces to be called after pruning is at least one. If the number of interfaces to be called after pruning is one, the subsequent information processing steps can be directly executed. If the number of interfaces to be called after pruning is multiple, a threshold for the number of calling interfaces can be pre-set according to the information processing business in the information processing application. The threshold for the number of calling interfaces is used to specify the maximum number of interfaces to be called when processing the information to be processed. Therefore, it can be determined whether the number of interfaces to be called after pruning is less than the threshold for the number of calling interfaces; if so, the subsequent information processing steps are directly executed; if not, the multiple interfaces to be called after pruning can continue to be recalled and pruned again until the number of interfaces to be called after pruning is less than the threshold for the number of calling interfaces.
[0083] Step S105, calling the pruned interface to be called, performing information processing on the information to be processed, and obtaining an information processing result of the information to be processed.
[0084] In the embodiment of the present application, the implementation process of calling the pruned interface to be called to perform information processing on the information to be processed is the same as the implementation process of calling the recalled interface to be called to perform information processing on the information to be processed. Since the pruned interface to be called here is the final interface to be called that is screened out, therefore, the information processing result of the information to be processed obtained by calling the pruned interface to be called to perform information processing on the information to be processed will be the final information processing result of the information to be processed, and the information processing system can output the final information processing result, and the information processing result can be displayed on the terminal.
[0085] The information processing method provided by the embodiment of the present application, on the one hand, for the information to be processed, is to recall the interfaces to be called related to the information to be processed from the set of interfaces to be called, and then, perform information processing on the information to be processed through these recalled interfaces to be called, so as to prune the recalled interfaces to be called based on the interface processing results of the recalled interfaces to be called, so as to finally use the pruned interfaces to be called to perform final information processing on the information to be processed. In this way, since the interfaces to be called are recalled and pruned in sequence from the set of interfaces to be called, the interfaces to be called that match the information to be processed are screened out, so the pruned interfaces to be called are the calling interfaces in the set of interfaces to be called that best match the information to be processed and can most accurately perform information processing on the information to be processed, so calling these pruned interfaces to be called to perform information processing on the information to be processed can greatly improve the accuracy of information processing on the user's information to be processed. On the other hand, since the number of recalled interfaces to be called is usually large, pruning the recalled interfaces to be called in batch mode can greatly improve the screening speed of a large number of recalled interfaces to be called, thereby increasing the speed of determining the pruned interfaces to be called, and further improving the information processing efficiency of the information to be processed.
[0086] The following is an example of an application scenario of the information processing method provided in the embodiment of the present application. The embodiment of the present application can be applied to at least any of the following exemplary scenarios:
[0087] Scenario 1: The information processing system includes at least a terminal and a server. In order to realize accurate information processing of the information to be processed requested by the user, the embodiment of the present application provides an information processing platform, which can be implemented as an information processing application. The information processing application is installed on the terminal, and the server is the background server of the information processing application. The server of the information processing application can call the calling interface (such as API interface) of other applications. The user can input the information to be processed on the client of the information processing application through the terminal. After receiving the information to be processed by the user, the terminal can encapsulate the information to be processed into an information processing request, and send the information processing request to the server through the terminal. When the server receives the information processing request, in response to the information processing request, the information processing method provided by the embodiment of the present application is used to recall and prune the interfaces to be called in the interface set to be called in turn, so as to obtain the pruned interface to be called, and call the pruned interface to be called to perform information processing on the user's information to be processed, so as to obtain the information processing result. After obtaining the information processing result, the server can send the information processing result to the terminal to display the information processing result to the user on the terminal.
[0088] Scenario 2: The information processing system includes at least a terminal and a server. In order to accurately process the information to be processed requested by the user, the embodiment of the present application provides an information processing platform, which can also be implemented as a small program for implementing information processing. An instant messaging application is installed on the terminal, and the small program can be triggered to enter or run through the instant messaging application. The server is the background server of the instant messaging application or can also be the background server of the small program. The server can call the calling interface (such as API interface) of other applications or other small programs. The user can operate the small program by operating on the client of the instant messaging application, and input the information to be processed on the client of the small program. After receiving the user's information to be processed, the terminal can encapsulate the information to be processed into an information processing request, and send the information processing request to the server through the terminal. When the server receives the information processing request, in response to the information processing request, the information processing method provided in the embodiment of the present application is used to recall and prune the interfaces to be called in the interface set to be called in turn, thereby obtaining the pruned interface to be called, and calling the pruned interface to be called to perform information processing on the user's information to be processed, thereby obtaining the information processing result. After obtaining the information processing result, the server may send the information processing result to the terminal so that the information processing result can be displayed to the user on the terminal.
[0089] Scenario 3: The information processing system includes at least a terminal and a server. In order to realize accurate information processing of the information to be processed requested by the user, the embodiment of the present application provides an information processing platform, which can be implemented as an information processing application. The information processing application is installed on the terminal, and the server is the background server of the information processing application. The server of the information processing application can call the calling interface of other applications. The user can input the information to be processed and the interface identifiers of all the interfaces to be called in the interface set to be called in the client of the information processing application through the terminal. After receiving the information to be processed and the interface identifier of the user, the terminal can encapsulate the information to be processed and the interface identifier into an information processing request, and send the information processing request to the server through the terminal. When the server receives the information processing request, in response to the information processing request, the information processing method provided by the embodiment of the present application is used to recall and prune the interfaces to be called in the interface set to be called corresponding to the interface identifier in the information processing request in turn, thereby obtaining the pruned interface to be called, and calling the pruned interface to be called to process the information to be processed by the user, thereby obtaining the information processing result. After obtaining the information processing result, the server may send the information processing result to the terminal so that the information processing result can be displayed to the user on the terminal.
[0090] The following will take the above scenario 1 as an example to illustrate the information processing method of an embodiment of the present application. Figure 5 is another optional flow chart of the information processing method provided in the embodiment of the present application, such as Figure 5 As shown, the method includes the following steps S201 to S216:
[0091] Step S201: The terminal receives information input operation from the user through the client of the information processing application.
[0092] The information input operation allows the user to input the information to be processed, or to input the information to be processed and the interface identifiers of all the interfaces to be called in the interface set to be called, or to input the information to be processed and select all the interfaces to be called in the interface set to be called.
[0093] In an embodiment of the present application, an input area for information to be processed may be provided on the client of the information processing application, and the user may input the information to be processed in the input area. At the same time, an interface identifier input area for the interface to be called or an interface selection button to be called may also be provided on the client of the information processing application. The user may input the interface identifier in the interface identifier input area to generate a corresponding set of interfaces to be called, or the user may also operate the selection button to pull down and select interface identifiers of different interfaces to be called to generate a corresponding set of interfaces to be called.
[0094] In some embodiments, the information to be processed input by the user may be at least one of the following types of information: voice, text, image, video. After the user inputs the information to be processed, the information type of the information to be processed may be determined. If the information type of the information to be processed is not a text type, the information to be processed may also be converted to a text type.
[0095] Step S202: The terminal encapsulates the information to be processed into an information processing request.
[0096] Step S203: the terminal sends an information processing request to the server.
[0097] Step S204: the server obtains the interface information of the to-be-called interface in the to-be-called interface set in response to the information processing request.
[0098] The interface information of the interface to be called is the document content corresponding to the interface to be called, including but not limited to at least one of the following: input parameters, output content, interface restriction conditions and other information of the interface to be called. The interface information of the interface to be called can be stored in a preset storage unit of the server, and the interface identifier of the interface to be called and the interface information can be mapped and stored in the preset storage unit. In an embodiment of the present application, the interface information of all interfaces to be called in the set of interfaces to be called can be obtained from the preset storage unit in parallel.
[0099] In some embodiments, after obtaining the interface information of the interface to be called in the set of interfaces to be called, the following processing can also be performed on the interface to be called in the set of interfaces to be called: first, the interfaces to be called in the set of interfaces to be called are classified to obtain subsets of interfaces to be called with different interface types; then, a quality assessment is performed on each interface to be called in the subset of interfaces to be called, and the interfaces to be called whose quality assessment results are less than the quality assessment threshold in each subset of interfaces to be called are deleted to obtain a filtered subset of interfaces to be called; finally, the interface information of the interfaces to be called in the filtered subset of interfaces to be called is compressed to obtain interface compression information of the interfaces to be called.
[0100] Here, classifying the interfaces to be called in the interface set to be called actually divides the interfaces to be called in the interface set to be called into multiple different interface subsets to be called, each of which includes at least one interface to be called, and each interface subset to be called corresponds to an interface type.
[0101] In the embodiment of the present application, when quality evaluation is performed on the interfaces to be called in each subset of interfaces to be called, the interfaces to be called can be screened out through manual evaluation. For example, interfaces to be called that cannot return results normally can be screened out, interfaces to be called whose execution time is greater than the execution time threshold can be screened out, interfaces to be called whose document content richness of interface information is less than the richness threshold can be screened out, and interfaces to be called whose interface information does not contain at least one of input parameters, input parameters, and interface usage information can be screened out. For these screened out interfaces to be called, these screened out interfaces to be called can be deleted from the subset of calling interfaces.
[0102] In some embodiments, the quality of the interface to be called can also be evaluated by a pre-trained interface quality evaluation model. In the implementation process, the interface information of the interface to be called can be input as an input parameter into the interface quality evaluation model to obtain a quality evaluation result, and then the interface to be called whose quality evaluation result is less than the quality evaluation threshold is deleted from the subset of interfaces to be called to obtain a screened subset of interfaces to be called. The interface quality evaluation model here can also be a pre-trained large language model, and the interface information of the interface to be called can be input as an input parameter into the pre-trained large language model, and the quality evaluation result is output by the pre-trained large language model.
[0103] In some embodiments, because the text length of the description document text in the interface information of some interfaces to be called is too long, for example, the text length will be greater than the text length threshold, which will result in the inability to be directly put into the large language model for subsequent similarity calculation, so the interface information of the interface to be called needs to be compressed. In the implementation process, the description document text of the interface information of the interface to be called can also be compressed using a pre-trained large language model (which can be a document compression processing model), and the specific purpose of the corresponding interface to be called and the input parameters, output parameters and other information are condensed through short text.
[0104] It should be noted that the several different large language models mentioned in the embodiments of the present application may be language models with the same model structure. The difference is that the functions of the various large language models are different during use; at the same time, when training these different large language models, the training data and training methods used are also different. Therefore, even if they have the same model structure, after different training processes, the parameters in the model are completely different, that is, they can actually be considered to be completely different large language models after training.
[0105] Step S205: The server determines the correlation between the information to be processed and each interface to be called based on the interface information of the interface to be called.
[0106] In some embodiments, see Figure 6 , Figure 6 The process of determining the relevance in step S205 is shown, which can be implemented by following steps S2051 to S2054:
[0107] Step S2051, inputting the information to be processed and the interface information into a pre-trained language representation model.
[0108] Step S2052 , performing text feature extraction on the information to be processed and the interface information respectively through the feature extraction layer of the language representation model, and obtaining a feature vector to be processed and an interface feature vector correspondingly.
[0109] Step S2053, performing pooling processing on the feature vector to be processed and the interface feature vector respectively through the pooling layer of the language representation model to obtain the pooled feature vector to be processed and the interface pooled feature vector.
[0110] Step S2054, classify the pooled feature vectors to be processed and the interface pooled feature vectors through the classification layer of the language representation model to obtain the similarity between the information to be processed and the interface information, and determine the similarity as the correlation between the information to be processed and the interface to be called.
[0111] In an embodiment of the present application, the language representation model may also be a model obtained after training a large language model. For example, the language representation model may be a BERT-BASE classifier obtained based on Sentence-BERT (SBERT). The input of the classifier may be the information to be processed input by the user and the interface information of the interface to be called. The output is a classification result. The classification result is the similarity (also referred to as correlation) between the information to be processed and the interface information of the interface to be called. That is, the classification result may be used to determine whether the information to be processed input by the user is related to the interface information of the interface to be called, thereby determining whether the interface to be called needs to proceed to the next step of operation, that is, whether it needs to be recalled.
[0112] In some embodiments, after obtaining the interface information of the interface to be called in the set of interfaces to be called, the interfaces to be called in the set of interfaces to be called are also classified, quality evaluated and information compression of the interface information is performed. Therefore, in step S205, the server determines the correlation between the information to be processed and each interface to be called based on the interface information of the interface to be called. The server can also determine the correlation between the information to be processed and each interface to be called based on the interface compression information of the interface to be called in the filtered subset of interfaces to be called.
[0113] In some embodiments, a method for obtaining sample data for training a language representation model is further provided, wherein the method for obtaining sample data can also be executed by the above-mentioned server, such as Figure 7 As shown, the acquisition method includes the following steps S301 to S304:
[0114] Step S301, obtaining sample interface information of a sample calling interface.
[0115] Step S302, input the sample interface information into the pre-trained information generation model, and predict the predicted text information corresponding to the sample interface information through the information generation model. The predicted text information is the text information predicted by the information generation model to have a positive correlation with the sample interface information; the predicted text information and the sample interface information constitute a positive sample pair.
[0116] Step S303, randomly generate random text information corresponding to the sample interface information; the random text information and the sample interface information constitute a negative sample pair.
[0117] Step S304: determine all positive sample pairs and all negative sample pairs as sample data for training a language representation model.
[0118] In an embodiment of the present application, the sample data may also include the pre-labeled correlation between the predicted text information and the sample interface information in each positive sample pair, and the pre-labeled correlation between the random text information and the sample interface information in each negative sample pair. The above-mentioned language representation model includes a feature extraction layer, a pooling layer, and a classification layer connected in sequence. The present application further provides a method for training a language representation model. The training method for the language representation model can be implemented by a model training module, and the model training module can be a module in an electronic device. That is to say, the execution subject of the training method for the language representation model can be a server or a terminal. The embodiment of the present application takes the example that the execution subject of the training method for the language representation model is also a server as an example. Figure 8 As shown, the training method of the language representation model includes the following steps S401 to S406:
[0119] Step S401: input sample data into the language representation model to be trained.
[0120] Here, the sample data is taken as a positive sample pair as an example for explanation.
[0121] Step S402 , extracting text features from the predicted text information and the sample interface information respectively through the feature extraction layer of the language representation model to be trained, and obtaining a predicted text feature vector and a sample interface feature vector correspondingly.
[0122] Step S403 , performing pooling processing on the predicted text feature vector and the sample interface feature vector respectively through the pooling layer of the language representation model to obtain a predicted text pooling feature vector and a sample interface pooling feature vector.
[0123] Step S404: Classify the predicted text pooling feature vector and the sample interface pooling feature vector through the classification layer of the language representation model to obtain the sample similarity between the predicted text information and the sample interface information. The sample similarity is the sample correlation between the predicted text information and the sample interface information.
[0124] Step S405: input the sample correlation and the pre-labeled correlation in the sample data into a preset loss model to perform loss calculation to obtain a loss result.
[0125] Step S406, based on the loss result, the model parameters in the language representation model to be trained are corrected until the corrected language representation model meets the preset model convergence conditions, then the training of the language representation model is stopped, and the language representation model at the time of stopping the training is determined as the trained language representation model.
[0126] In the embodiment of the present application, the language representation model is trained by sample data with positive sample pairs and negative sample pairs. Since the positive sample pairs in the sample data are generated by a pre-trained information generation model (which can also be a model obtained after training a large language model), the information generation model can ensure the accuracy and diversity of the predicted text information in the positive sample pairs; since the negative sample pairs in the sample data are randomly generated random text information corresponding to the sample interface information, the random text information has randomness. Therefore, the data in the sample data has a balance between positive and negative samples, thereby ensuring that during the model training process, the overfitting of the model is avoided, the training accuracy of the model is improved, and then a language representation model that can accurately determine the similarity between the information to be processed and the interface information is obtained.
[0127] Please continue to refer to Figure 5 , the information processing method further comprises the following steps:
[0128] Step S206: The server recalls the to-be-called interfaces whose relevance is greater than the relevance threshold from the to-be-called interface set.
[0129] Step S207: the server obtains the interface information of the recalled interface to be called, and determines the input parameters for calling the recalled interface to be called based on the interface information.
[0130] Step S208, the server uses a multi-threaded parallel calling method to call each recalled interface to be called, and inputs the input parameters to the corresponding interface to be called. The interface to be called processes the information to be processed in parallel based on the input parameters to obtain the interface processing result of each recalled interface to be called.
[0131] Step S209: the server uses a batch processing method to input the interface processing results and the information to be processed of the recalled interface to be called into the pre-trained text evaluation model.
[0132] Step S210: The server outputs the evaluation classification result between the interface processing result of the recalled interface to be called and the information to be processed through the text evaluation model.
[0133] In some embodiments, see Fig. 9 , Fig. 9 The process of determining the evaluation classification result in step S210 is shown, which can be implemented by the following steps S2101 to S2103:
[0134] Step S2101, through the feature extraction layer of the text evaluation model, synchronously extract the feature vector of the interface processing result of each recalled interface to be called and the interface feature vector of the information to be processed.
[0135] In some embodiments, when extracting the feature vector of the interface processing result, the feature vector of each interface processing result can also be extracted in the following manner: first, determine the text length of the interface processing result of each recalled interface to be called; then, determine the feature dimension of the feature vector of the interface processing result with the maximum text length; finally, use the feature dimension as the feature extraction standard to perform sequence filling on the feature vectors of other extracted interface processing results to obtain feature vectors of other interface processing results.
[0136] Step S2102, through the pooling layer of the text evaluation model, the feature vector of the interface processing result and the interface feature vector of each recalled interface to be called are pooled to obtain an interface processing pooling feature vector and an interface pooling feature vector.
[0137] Step S2103, through the classification layer of the text evaluation model, the interface processing pooling feature vector and the interface pooling feature vector of each recalled interface processing result of the interface to be called are evaluated and classified to obtain the evaluation classification result between each recalled interface processing result of the interface to be called and the information to be processed.
[0138] In an embodiment of the present application, the text evaluation model may also be a model obtained after training a large language model. The text evaluation model and the above-mentioned language representation model may have the same basic structure, but the parameters in the model are different. Therefore, it can achieve model processing capabilities that the above-mentioned language representation model cannot achieve, that is, it can determine the evaluation classification results between the interface processing results of the recalled interface to be called and the information to be processed.
[0139] Step S211: The server prunes the recalled interfaces to be called based on the evaluation and classification results to obtain pruned interfaces to be called.
[0140] Pruning refers to deleting the recalled interfaces to be called that do not meet the preset conditions from all the recalled interfaces to be called, so as to retain some of the recalled interfaces to be called that meet the preset conditions, thereby implementing another screening of the recalled multiple interfaces to be called.
[0141] During the pruning process, the evaluation classification result of each recalled interface to be called can be obtained first. The evaluation classification result can correspond to an evaluation value. The recalled interface to be called with an evaluation value less than the evaluation value threshold can be determined as an interface to be called that does not meet the preset conditions, and these recalled interfaces to be called that do not meet the preset conditions can be deleted.
[0142] Step S212: the server updates the information to be processed based on the interface processing result of the to-be-called interface after pruning to obtain updated information to be processed.
[0143] Here, updating the information to be processed may be rewriting the information to be processed into information required for the next step. In the implementation process, the information to be processed may be rewritten according to its content, for example, by replacing synonyms, deleting invalid words, and other rewriting methods.
[0144] Step S213: Based on the updated information to be processed, the server performs secondary recall and secondary pruning on the pruned interfaces to be called, and obtains the interfaces to be called after secondary pruning.
[0145] In some embodiments, secondary recall and secondary pruning processing can be achieved through the following steps: first, based on the updated information to be processed, the pruned interface to be called is subjected to the secondary recall to obtain the interface to be called after the secondary recall; then, the interface to be called after the secondary recall is called, and information processing is performed on the updated information to be processed to obtain the interface update processing result of the interface to be called after the secondary recall; finally, in batch processing mode, based on the interface update processing result of the interface to be called after the secondary recall, the secondary pruning processing is performed on the interface to be called after the secondary pruning to obtain the interface to be called after the secondary pruning.
[0146] In an embodiment of the present application, the number of secondary recalls is at least one, and the number of secondary pruning processes is at least one; when the secondary pruned interface to be called obtained after any secondary recall and secondary pruning process meets the preset interface query stop condition, the secondary recall and secondary pruning process are stopped, and the secondary pruned interface to be called at the time of stopping is determined as the interface to be called for the final query.
[0147] In some embodiments, an information update evaluation may also be performed on the updated information to be processed to obtain an information update evaluation value; then, the number of updated information to be processed whose information update evaluation value is less than the evaluation value threshold is determined; if the number is greater than the number threshold, the updated information to be processed is deleted, and based on the information to be processed, the pruned interface to be called is sequentially subjected to the secondary recall and the secondary pruning processing to obtain a secondary pruned interface to be called.
[0148] Step S214, the server calls the to-be-called interface of the final query, performs information processing on the updated to-be-processed information, and obtains the information processing result of the to-be-processed information.
[0149] In the embodiment of the present application, the implementation process of calling the interface to be called of the final query to process the information to be processed is the same as the implementation process of calling the interface to be called of the recall to process the information to be processed.
[0150] The number of interfaces to be called in the final query can be one or more. When the number of interfaces to be called in the final query is one, this one interface to be called can be directly called to process the updated information to be processed; when the number of interfaces to be called in the final query is multiple, multiple interfaces to be called can be called in parallel to realize parallel information processing of the updated information to be processed, thereby improving the efficiency of information processing.
[0151] In some embodiments, the information to be processed can be updated after each pruning process, and when the information to be processed is updated, the updated object is not the original information to be processed input by the user, but the information to be processed after the most recent update. In this way, at least one recall and pruning process is performed on the interface to be called, and accordingly, at least one update is performed on the information to be processed, so that information that is easier to identify and understand for other applications corresponding to the interface to be called can be obtained, so that when the interface to be called that is finally queried is called to process the information to be processed after the final update, the information can be accurately understood and accurately processed, thereby obtaining accurate information processing results.
[0152] Step S215: the server sends the information processing result to the terminal.
[0153] Step S216: The terminal displays the information processing result on the current interface.
[0154] The information processing method provided in the embodiment of the present application can greatly improve the efficiency of information processing by performing information processing on the information to be processed in a batch processing manner, and can also judge and prune the recalled interfaces to be called in a batch processing manner. In this way, the efficiency of information processing can be greatly improved. When the information to be processed is information to be retrieved, the retrieval efficiency can be greatly improved. In other words, if the method of the embodiment of the present application is applied to a retrieval application, the user experience of the retrieval application can be greatly improved. In addition, the embodiment of the present application uses a large language model (language representation model) to determine the correlation between the information to be processed and the interface to be called, so as to recall the interface to be called from the set of interfaces to be called. In this way, since the large language model is usually a pre-trained model with a large amount of data, the performance is stable, and the computational efficiency is high, it can accurately and quickly realize the recall of the interface to be called. Similarly, since the embodiment of the present application also uses a large language model (text evaluation model) to evaluate the recalled interfaces to be called, that is, to determine the evaluation classification results between the interface processing results of the recalled interfaces to be called and the information to be processed, it can also accurately implement the evaluation of the recalled interfaces to be called, thereby being able to select more accurate interfaces to be called from a large number of recalled interfaces to be called, and to implement accurate pruning of the recalled interfaces to be called, thereby further improving the final accuracy of information processing on the information to be processed and improving the user experience of information processing.
[0155] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0156] The embodiment of the present application proposes a solution (i.e., an information processing method) that utilizes breadth-first search combined with a large language model to select questions raised by users by arranging calls to different APIs. The method is mainly divided into the following steps: first, collating API information (i.e., interface information of the interface to be called); then, recalling the API; and finally, executing and eliminating low-quality results through breadth-first search.
[0157] Among them, for sorting API information: In this step, the embodiment of the present application first sorts and classifies the available APIs, including API function descriptions, input parameters, output results and other information. By sorting out the API information, the present invention provides clear and structured API data for subsequent steps, which is convenient for recalling and executing the API. For recalling APIs: In this step, the embodiment of the present application uses a classification model to perform semantic analysis and understanding on the questions raised by the user, so as to identify the key information in the question. Based on these key information, the question is associated with the sorted API information to achieve accurate API recall. For breadth-first execution and elimination of low-quality results: In this step, the embodiment of the present application adopts a breadth-first search strategy to execute the recalled API. For example, first execute each API and obtain preliminary results, then screen the API according to the quality of the results, and select effective high-quality APIs for continued execution. In this process, the embodiment of the present application will eliminate API results that return poor results to reduce computational complexity and improve execution efficiency.
[0158] Through the above steps, the embodiment of the present application implements a solution that uses breadth-first search combined with a large language model, which can quickly and accurately call different APIs for selection and processing according to the questions raised by the user (i.e., the information to be processed). The embodiment of the present application is to split the problem handling task into multiple subtasks, and adopt a breadth-first search strategy and a large language model technology to achieve efficient and accurate problem solving. In addition, the embodiment of the present application also has a strong generalization ability, can be applied to a variety of fields and scenarios, and provide users with convenient and intelligent problem-solving solutions.
[0159] The information processing method provided in the embodiments of the present application will be described in detail below.
[0160] In the process of using large language models, it is found that since the models are already trained and fixed, new knowledge outside the training data cannot be obtained through large language models, but large language models can also understand the input information very well and make some decisions from it. Therefore, through prompt information, large language models can recognize the basic information of the API that can be called, including its input and output, purpose, restrictions, etc., so that large language models can call APIs to better complete the questions raised by users. The final form is that the user proposes a sentence or a goal. Large language models can use other tools to better complete this task. There are mainly the following advantages: 1) Improve problem solving efficiency: Using the method of calling APIs with large language models, the model can directly extract key information from the questions raised by users and automatically select the appropriate API to complete the task. This greatly improves the efficiency of problem solving and reduces the cost of manual intervention. 2) Improve the quality of problem solving: With the powerful semantic understanding ability of large language models, it can more accurately understand the questions raised by users, and generate more accurate and user-friendly solutions by calling appropriate APIs. 3) Expand model functions: By calling APIs, large language models can use other tools and services to complete various complex tasks, thereby greatly expanding the functions and application scope of the model. 4) Flexible adaptation to various scenarios: The method of calling API based on large language models has strong generalization ability and can be applied to various fields and scenarios to meet the needs of different users. Whether it is data query, text processing, image recognition and other tasks, they can be achieved by calling the corresponding API.
[0161] Fig.10 is a system framework diagram of the information processing system provided by the embodiment of the present application, such as Fig.10 As shown, the input of the information processing system is the problem that the user wants to solve and the API information, where the problem that the user wants to solve is output in natural language, and the API information is the specific document content of the API, including the input parameters, output content, restrictions and other information of the API.
[0162] First, API information (ie, interface information of the interface to be called) is integrated.
[0163] The main purpose of API information integration is to enable the large language model to better understand all aspects of API information and accurately select the corresponding API. The main steps of sorting API information are as follows: 1. API stratification. This step is mainly to divide APIs according to their different functions. For example, APIs are related to economics, analysis, etc. This step can be divided manually or by using a large language model to distinguish the specific types of APIs. 2. API screening. This step is mainly to filter out some APIs of low quality to prevent these APIs from adding negative effects to the subsequent execution process. The main approach is to: remove APIs that cannot return results normally; remove APIs that take too long to execute; remove APIs with poor documentation. If the corresponding documents do not clearly state the input, output, and specific uses, the API will be removed. 3. API information compression. Since the text of some API description documents is too long to be directly put into the large language model, the API information needs to be compressed: first, the large language model is used to compress the API documents, and the specific uses of the corresponding APIs are condensed through short texts, plus the input and output information. This mainly involves the interaction of two large language models: API classification and API information compression.
[0164] For API classification, for example, the input is: "You are a classification robot. Your task is to give the specific category to which the API belongs based on the API description document. The category candidates are {api_types}. The following is the API document: {api_info}. Please give the specific classification and corresponding reasons, and output them in json format"; the expected output is: "{category: API category, reason: judgment reason}".
[0165] For API information compression, for example, the input is: "You are a summary robot, your task is to summarize the specific functions and precautions of the API based on the API description document. The following is the API document: {api_info}, and it is output in json format"; the expected output is: "{Function: API function, Precautions: API precautions}".
[0166] After API information integration, then, API recall is performed.
[0167] A small model can be used to complete the API recall task. The embodiment of the present application can provide a BERT-BASE classifier based on Sentence-BERT (SBERT) (corresponding to the above-mentioned language representation model). The input of the classifier can be the question query input by the user (that is, the above-mentioned information to be processed) and the API information obtained in the previous step. The output is a classification result, which indicates whether the query is related to the API information, that is, whether the question input by the user is related to the API, so as to determine whether the API needs to enter the next step of operation.
[0168] In the implementation process, the operational steps of API recall may include: First, the main idea of Sentence-Bert is to fine-tune BERT so that it can generate sentence-level vector representations. These vector representations can be used directly to calculate the similarity between sentences without the need for pairwise comparison of each sentence. This greatly improves the efficiency of semantic search and similarity calculation on large-scale data sets. Compared with the traditional BERT method, SBERT is faster in semantic search and similarity calculation on large-scale data sets. In addition, SBERT can be easily applied to various downstream tasks such as text classification, clustering, and information retrieval. Fig.11 , which is a schematic diagram of the structure of the SBERT provided in an embodiment of the present application.
[0169] In the process of constructing sample data for training the BERT-BASE classifier, the present embodiment uses a large language model (i.e., the information generation model) to construct the sample data for training and the test data. Fig.12 As shown, it is a schematic diagram of the process of constructing sample data provided by an embodiment of the present application. The specific solution is: for different API information documents, put them into a large language model, and let the large language model generate query information that can be achieved by the API, that is, generate a data set through a large language model for training. The purpose is to obtain sample pairs of query-API information. However, since only relevant queries, that is, positive sample pairs, can be generated here, for negative samples, the embodiment of the present application randomly extracts (i.e., randomly samples) to generate queries and non-matching API information to form negative sample pairs.
[0170] The method for constructing sample data of positive and negative sample pairs provided in the embodiment of the present application only needs to call a large language model once to generate a query as a positive sample, and the negative sample is obtained by random sampling. A classifier can be obtained by training with the above data, and the classifier can obtain the degree of association between the user query and the corresponding API by calculating the similarity of the embedded features of the API information document (i.e., the interface feature vector) and the embedded features of the user input query (i.e., the feature vector to be processed), so that a series of APIs can be obtained through the query input by the user.
[0171] After the API recall, the process of API execution and LLM judgment is then carried out to reflect the breadth priority proposed in the embodiment of the present application.
[0172] Since the recalled API information and user input queries are already available here, a large language model is used for batch prediction to improve throughput. The previous method is to use a large language model for output serially or in parallel. The embodiment of the present application adopts a batch processing method to improve efficiency. The longest text in the recalled API information plus the user input information is taken as the standard, the remaining APIs are filled in sequence, and batch processing is performed on this basis.
[0173] The embodiment of the present application can obtain information such as the method for calling the API, the parameters that need to be input, and then put the relevant parameters into the API for execution. Here, a multi-threaded method can be used to call the API for execution to improve the overall execution efficiency.
[0174] After obtaining the execution results of the recalled APIs (i.e., the interface processing results of the recalled interfaces to be called), the batch processing method is used again to allow the large language model to rewrite the query based on the results output by each API, and rewrite the query into the information required for the next step.
[0175] Finally, the termination conditions and pruning process of the API screening process are explained.
[0176] For the classifier mentioned in the above API recall step, since the output of the classifier is a number from 0 to 1, this number is used to determine whether the query is related to the interface to be called (the judgment value of whether it is related here can be called the correlation, denoted as logit). The logit can also be regarded as the confidence of the classifier, that is, the degree of correlation between the API and the query given by the classifier, and the logit can be used to control the stopping selection.
[0177] Pruning is done through a large language model. In the LLM judgment in the above steps, the large language model can additionally output whether the branch problem-solving process meets the current requirements. If not, it outputs that it can be pruned.
[0178] The following is an example of the information processing method provided in the embodiment of the present application:
[0179] The sorted API set (i.e., the set of interfaces to be called) includes: ① query personal location; ② query current altitude; ③ query temperature; ④ query weather; ⑤ query humidity; ⑥ query wind speed; ⑦ query air ticket prices; ⑧ query movie box office; ⑨ query date information.
[0180] The user query is: Will it rain tomorrow?
[0181] The first round of API recall results include: ⑨ query time information (0.9); ④ query weather (0.9); ⑤ query humidity (0.8); ③ query temperature (0.75); ② query current altitude (0.4). The numbers in brackets are the logits calculated during the recall.
[0182] The results of the first round of execution (i.e., the interface processing results) include: ⑨ Today is 20230925, and tomorrow is 20230926; ④ Today's weather is sunny; ⑤ Today's humidity is 73%; ③ Today's temperature is 23 degrees Celsius.
[0183] The results of the first round of evaluation include: ⑨ Rewrite query: query the weather on 20230926; ④ Rewrite query: query the weather on 20230926; ⑤ Pruning; ③ Pruning.
[0184] The results of the second round of recall: ④ was recalled for ⑨; ⑨ was recalled for ④.
[0185] Finally, execute the two APIs ④ and ⑨ respectively to get the correct answer. It should be noted that the input query executed by ④ and ⑨ at this time is the rewritten query, that is, the rewritten query of API ⑨ "Query 20230926 weather" and the rewritten query of API ④ "Query 20230926 weather".
[0186] The beneficial effects brought by the technical solution of the embodiment of the present application can be summarized as follows:
[0187] Improve retrieval efficiency: By using large language models and Sentence-BERT technology, the system can more quickly filter out APIs related to user queries from the API collection, thereby greatly improving retrieval efficiency. Improve retrieval accuracy: Large language models and Sentence-BERT technology can better understand the semantics of user queries, thereby improving the accuracy of API screening and ensuring that APIs related to the query content are provided to users. Automated API calls: The system can automatically call relevant APIs based on user queries without the need for users to manually select and operate, reducing the difficulty of use and improving user experience. Scalability: The system can automatically locate and monitor API updates, and can easily add new APIs to the API collection to ensure that the APIs in the API pool are always up to date to meet changing user needs.
[0188] It can be understood that in the embodiments of the present application, the content involving user information, such as the query input by the user, the interface information of the interface to be called in the set of interfaces to be called, and other information, if it involves data related to user information or enterprise information, when the embodiments of the present application are applied to specific products or technologies, it is necessary to obtain user permission or consent, or to blur this information to eliminate the correspondence between this information and the user; and the relevant data collection and processing 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 subject of personal information, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the subject of personal information.
[0189] The following is a description of an exemplary structure of the information processing device 354 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 3 As shown, the information processing device 354 includes: an acquisition module 3541, which is used to acquire the interface information of the interface to be called in the information to be processed and the interface information of the interface to be called in the set of interfaces to be called; a recall module 3542, which is used to recall the interface to be called related to the information to be processed from the set of interfaces to be called based on the interface information of the interface to be called; an information processing module 3543, which is used to call the recalled interface to be called, perform information processing on the information to be processed, and obtain the interface processing result of the recalled interface to be called; a pruning processing module 3544, which is used to adopt a batch processing method, based on the interface processing result of the recalled interface to be called, to perform pruning processing on the recalled interface to be called, and obtain the pruned interface to be called; the information processing module 3543 is also used to call the pruned interface to be called, perform information processing on the information to be processed, and obtain the information processing result of the information to be processed.
[0190] In some embodiments, the recall module is further used to: determine the correlation between the information to be processed and each of the interfaces to be called based on the interface information of the interfaces to be called; and recall the interfaces to be called whose correlation is greater than a correlation threshold from the set of interfaces to be called.
[0191] In some embodiments, the recall module is also used to: input the information to be processed and the interface information into a pre-trained language representation model; perform text feature extraction on the information to be processed and the interface information respectively through the feature extraction layer of the language representation model, and obtain a feature vector to be processed and an interface feature vector correspondingly; perform pooling processing on the feature vector to be processed and the interface feature vector respectively through the pooling layer of the language representation model, and obtain a pooled feature vector to be processed and an interface pooled feature vector; perform classification processing on the pooled feature vector to be processed and the interface pooled feature vector through the classification layer of the language representation model, and obtain the similarity between the information to be processed and the interface information, and determine the similarity as the correlation between the information to be processed and the interface to be called.
[0192] In some embodiments, the device also includes a sample data construction module, which is used to obtain sample data for training the language representation model through the following steps: obtaining sample interface information of a sample call interface; inputting the sample interface information into a pre-trained information generation model, and predicting predicted text information corresponding to the sample interface information through the information generation model; the predicted text information is text information predicted by the information generation model to have a positive correlation with the sample interface information; the predicted text information and the sample interface information constitute a pair of positive sample pairs; randomly generating random text information corresponding to the sample interface information; the random text information and the sample interface information constitute a pair of negative sample pairs; and determining all positive sample pairs and all negative sample pairs as sample data for training the language representation model.
[0193] In some embodiments, the information processing module is also used to: obtain interface information of the recalled interface to be called, and determine input parameters for calling the recalled interface to be called based on the interface information; call each recalled interface to be called in a multi-threaded parallel calling manner, and input the input parameters to the corresponding interface to be called, and perform information processing on the information to be processed in parallel based on the input parameters through the interface to be called to obtain the interface processing result of each recalled interface to be called.
[0194] In some embodiments, the pruning processing module is also used to: use a batch processing method to input the interface processing results of the recalled interface to be called and the information to be processed into a pre-trained text evaluation model; output the evaluation classification result between the interface processing results of the recalled interface to be called and the information to be processed through the text evaluation model; and prune the recalled interface to be called based on the evaluation classification result to obtain the pruned interface to be called.
[0195] In some embodiments, the pruning processing module is also used to: synchronously extract the feature vector of the interface processing result of each recalled interface to be called and the interface feature vector of the information to be processed through the feature extraction layer of the text evaluation model; respectively perform pooling processing on the feature vector of the interface processing result of each recalled interface to be called and the interface feature vector through the pooling layer of the text evaluation model to obtain the interface processing pooling feature vector and the interface pooling feature vector; perform evaluation and classification processing on the interface processing pooling feature vector of the interface processing result of each recalled interface to be called and the interface pooling feature vector through the classification layer of the text evaluation model to obtain the evaluation and classification result between the interface processing result of each recalled interface to be called and the information to be processed.
[0196] In some embodiments, the device also includes: a feature processing module, which is used to determine the text length of each recalled interface processing result of the interface to be called when extracting the feature vector of the interface processing result; determine the feature dimension of the feature vector of the interface processing result with the maximum text length; and use the feature dimension as the feature extraction standard to sequence fill the feature vectors of other extracted interface processing results to obtain the feature vectors of the other interface processing results.
[0197] In some embodiments, the device also includes: an information update module, which is used to update the information to be processed based on the interface processing result of the pruned interface to be called after pruning the recalled interface to be called, so as to obtain updated information to be processed; a secondary processing module, which is used to perform secondary recall and secondary pruning on the pruned interface to be called in sequence based on the updated information to be processed, so as to obtain the interface to be called after secondary pruning; the information processing module is also used to: call the interface to be called after the secondary pruning, perform information processing on the updated information to be processed, and obtain the information processing result of the information to be processed.
[0198] In some embodiments, the secondary processing module is also used to: based on the updated information to be processed, perform the secondary recall on the pruned interface to be called to obtain the secondary recalled interface to be called; call the secondary recalled interface to be called, perform information processing on the updated information to be processed, and obtain the interface update processing result of the secondary recalled interface to be called; adopt a batch processing method, based on the interface update processing result of the secondary recalled interface to be called, perform the secondary pruning processing on the secondary recalled interface to be called, and obtain the secondary pruned interface to be called.
[0199] In some embodiments, the number of secondary recalls is at least one, and the number of secondary pruning processes is at least one; the device also includes: a control module, which is used to stop the secondary recall and secondary pruning processes when the secondary pruned interface to be called obtained after any secondary recall and secondary pruning process meets the preset interface query stop condition, and determine the secondary pruned interface to be called as the interface to be called for the final query; the information processing module is also used to: call the interface to be called for the final query, perform information processing on the updated information to be processed, and obtain the information processing result of the information to be processed.
[0200] In some embodiments, the device also includes: an information update evaluation module, which is used to perform information update evaluation on the updated information to be processed to obtain an information update evaluation value; a quantity determination module, which is used to determine the number of updated information to be processed whose information update evaluation value is less than the evaluation value threshold; a deletion processing module, which is used to delete the updated information to be processed if the number is greater than the number threshold, and based on the information to be processed, perform the secondary recall and the secondary pruning processing on the pruned interface to be called in sequence to obtain the secondary pruned interface to be called.
[0201] In some embodiments, the device also includes: an interface classification module, which is used to classify the interfaces to be called in the set of interfaces to be called before recalling the interfaces to be called related to the information to be processed from the set of interfaces to be called, so as to obtain subsets of interfaces to be called with different interface types; an interface quality assessment module, which is used to perform quality assessment on the interfaces to be called in each subset of interfaces to be called, and delete the interfaces to be called whose quality assessment results are less than the quality assessment threshold in each subset of interfaces to be called, so as to obtain a screened subset of interfaces to be called; an information compression module, which is used to compress the interface information of the interfaces to be called in the screened subset of interfaces to be called, so as to obtain interface compression information of the interfaces to be called; the recall module is also used to: based on the interface compression information of the interfaces to be called in the screened subset of interfaces to be called, recall the interfaces to be called related to the information to be processed from the screened subset of interfaces to be called.
[0202] It should be noted that the description of the device of the embodiment of the present application is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment, so it is not repeated. For technical details not disclosed in the embodiment of the device, please refer to the description of the method embodiment of the present application for understanding.
[0203] The embodiment of the present application provides a computer program product, which includes an executable instruction, which is a computer instruction; the executable instruction is stored in a computer-readable storage medium. When a processor of an electronic device reads the executable instruction from the computer-readable storage medium and the processor executes the executable instruction, the electronic device executes the method described in the embodiment of the present application.
[0204] The present application embodiment provides a storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the method provided by the present application embodiment, for example, Figure 4 The method shown.
[0205] In some embodiments, the storage medium can be a computer-readable storage medium, for example, a ferroelectric random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPR OM), a flash memory, a magnetic surface memory, an optical disk, or a compact disk read-only memory (CD-ROM), etc.; it can also be various devices including one or any combination of the above memories.
[0206] In some embodiments, 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.
[0207] As an example, executable instructions may, but need not correspond to, a file in a file system, may be stored as part of a file storing other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions). As an example, executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed at multiple locations and interconnected by a communication network.
[0208] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. An information processing method, It is characterized in that The method comprises: Obtaining the interface information of the to-be-called interface in the to-be-called interface set and the to-be-called information; Based on the interface information of the to-be-called interface, recalling the to-be-called interface related to the to-be-processed information from the to-be-called interface set; Calling the recalled interface to be called, performing information processing on the information to be processed, and obtaining an interface processing result of the recalled interface to be called; In batch processing mode, based on the interface processing results of the recalled interfaces to be called, the recalled interfaces to be called are pruned to obtain pruned interfaces to be called; The pruned interface to be called is called, information processing is performed on the information to be processed, and an information processing result of the information to be processed is obtained.
2. The method according to claim 1, It is characterized in that The step of recalling the to-be-called interface related to the to-be-processed information from the to-be-called interface set based on the interface information of the to-be-called interface includes: Based on the interface information of the to-be-called interface, determining the correlation between the to-be-processed information and each of the to-be-called interfaces; The to-be-called interfaces whose relevance is greater than a relevance threshold are recalled from the to-be-called interface set.
3. The method according to claim 2, It is characterized in that The determining, based on the interface information of the interface to be called, the correlation between the information to be processed and the interface to be called includes: Inputting the information to be processed and the interface information into a pre-trained language representation model; Performing text feature extraction on the information to be processed and the interface information respectively through the feature extraction layer of the language representation model, and obtaining a feature vector to be processed and an interface feature vector correspondingly; Through the pooling layer of the language representation model, the feature vector to be processed and the interface feature vector are respectively pooled to obtain a pooled feature vector to be processed and an interface pooled feature vector; The pooled feature vectors to be processed and the interface pooled feature vectors are classified and processed through the classification layer of the language representation model to obtain the similarity between the information to be processed and the interface information, and the similarity is determined as the correlation between the information to be processed and the interface to be called.
4. The method according to claim 3, It is characterized in that The method further comprises: obtaining sample data for training the language representation model by the following steps: Get sample interface information of sample calling interface; The sample interface information is input into a pre-trained information generation model, and the information generation model is used to predict predicted text information corresponding to the sample interface information; the predicted text information is text information predicted by the information generation model to have a positive correlation with the sample interface information; the predicted text information and the sample interface information constitute a positive sample pair; Randomly generate random text information corresponding to the sample interface information; the random text information and the sample interface information constitute a negative sample pair; All positive sample pairs and all negative sample pairs are determined as sample data for training the language representation model.
5. The method according to claim 1, It is characterized in that The calling of the recalled interface to be called, performing information processing on the information to be processed, and obtaining an interface processing result of the recalled interface to be called, includes: Acquire interface information of the recalled interface to be called, and determine input parameters for calling the recalled interface to be called based on the interface information; Each recalled interface to be called is called in parallel using a multi-threaded calling method, and the input parameters are input into the corresponding interface to be called. The interface to be called processes the information to be processed in parallel based on the input parameters to obtain the interface processing result of each recalled interface to be called.
6. The method according to claim 1, It is characterized in that The method adopts a batch processing mode, based on the interface processing result of the recalled interface to be called, performs pruning processing on the recalled interface to be called, and obtains the pruned interface to be called, including: In a batch processing manner, the interface processing results of the recalled interfaces to be called and the information to be processed are input into a pre-trained text evaluation model; Outputting the recalled interface processing result of the interface to be called and the evaluation classification result between the information to be processed through the text evaluation model; The recalled interfaces to be called are pruned based on the evaluation and classification results to obtain pruned interfaces to be called.
7. The method according to claim 6, It is characterized in that The evaluation and classification result between the interface processing result of the interface to be called and the information to be processed outputted and recalled by the text evaluation model includes: Synchronously extracting the feature vector of the interface processing result of each recalled interface to be called and the interface feature vector of the information to be processed through the feature extraction layer of the text evaluation model; Through the pooling layer of the text evaluation model, the feature vector of the interface processing result of each recalled interface to be called and the interface feature vector are respectively pooled to obtain an interface processing pooling feature vector and an interface pooling feature vector; Through the classification layer of the text evaluation model, the interface processing pooling feature vector of each recalled interface processing result of the interface to be called and the interface pooling feature vector are evaluated and classified to obtain an evaluation classification result between the interface processing result of each recalled interface to be called and the information to be processed.
8. The method according to claim 7, It is characterized in that The method further comprises: When extracting the feature vector of the interface processing result, determining the text length of the interface processing result of each recalled interface to be called; Determine the feature dimension of the feature vector of the interface processing result having the maximum text length; The feature dimension is used as a feature extraction standard, and the feature vectors of the extracted other interface processing results are sequentially filled to obtain the feature vectors of the other interface processing results.
9. The method according to claim 1, It is characterized in that After pruning the recalled to-be-called interface, the method further includes: Based on the interface processing result of the to-be-called interface after pruning, the to-be-processed information is updated to obtain updated to-be-processed information; Based on the updated information to be processed, the pruned interface to be called is sequentially subjected to secondary recall and secondary pruning to obtain a secondary pruned interface to be called; The calling of the pruned interface to be called, performing information processing on the information to be processed, and obtaining an information processing result of the information to be processed includes: The to-be-called interface after the secondary pruning is called, and information processing is performed on the updated information to be processed to obtain an information processing result of the information to be processed.
10. The method according to claim 9, It is characterized in that The method of sequentially performing secondary recall and secondary pruning processing on the pruned to-be-called interface based on the updated to-be-processed information to obtain the secondary pruned to-be-called interface includes: Based on the updated information to be processed, the pruned interface to be called is recalled for the second time to obtain the interface to be called that is recalled for the second time; Calling the to-be-called interface of the second recall, performing information processing on the updated to-be-processed information, and obtaining an interface update processing result of the to-be-called interface of the second recall; In batch processing mode, based on the interface update processing result of the secondarily recalled interface to be called, the secondarily recalled interface to be called is subjected to the second pruning processing to obtain the secondarily pruned interface to be called.
11. The method according to claim 10, It is characterized in that The number of secondary recalls is at least one, and the number of secondary pruning processes is at least one; the method further includes: When the to-be-called interface obtained after any secondary recall and secondary pruning process satisfies the preset interface query stop condition, the secondary recall and secondary pruning process are stopped, and the to-be-called interface after the secondary pruning is determined as the to-be-called interface for the final query; The calling of the pruned interface to be called, performing information processing on the information to be processed, and obtaining an information processing result of the information to be processed includes: The to-be-called interface of the final query is called, and information processing is performed on the updated information to be processed to obtain an information processing result of the information to be processed.
12. The method according to claim 9, It is characterized in that The method further comprises: Performing information update evaluation on the updated information to be processed to obtain an information update evaluation value; Determine the amount of updated information to be processed whose information update evaluation value is less than the evaluation value threshold; If the number is greater than the number threshold, the updated information to be processed is deleted, and based on the information to be processed, the pruned interface to be called is sequentially subjected to the secondary recall and the secondary pruning process to obtain the secondary pruned interface to be called.
13. The method according to any one of claims 1 to 12, It is characterized in that Before recalling the to-be-called interface related to the to-be-processed information from the to-be-called interface set, the method further includes: Classifying the interfaces to be called in the set of interfaces to be called to obtain subsets of interfaces to be called with different interface types; Performing a quality assessment on the interfaces to be called in each subset of interfaces to be called, and deleting the interfaces to be called whose quality assessment results are less than a quality assessment threshold in each subset of interfaces to be called, to obtain a filtered subset of interfaces to be called; Compressing the interface information of the interface to be called in the filtered subset of interfaces to be called to obtain interface compression information of the interface to be called; The step of recalling the to-be-called interface related to the to-be-processed information from the to-be-called interface set based on the interface information of the to-be-called interface includes: Based on the interface compression information of the to-be-called interfaces in the filtered to-be-called interface subset, the to-be-called interfaces related to the to-be-processed information are recalled from the filtered to-be-called interface subset.
14. An information processing device, It is characterized in that The device comprises: An acquisition module, used for acquiring information to be processed and interface information of the interface to be called in the set of interfaces to be called; A recall module, used for recalling the to-be-called interface related to the to-be-processed information from the to-be-called interface set based on the interface information of the to-be-called interface; An information processing module, used to call the recalled interface to be called, perform information processing on the information to be processed, and obtain an interface processing result of the recalled interface to be called; A pruning processing module is used to prune the recalled interfaces to be called based on the interface processing results of the recalled interfaces to be called in batch processing mode to obtain pruned interfaces to be called; The information processing module is further used to call the pruned interface to be called, perform information processing on the information to be processed, and obtain an information processing result of the information to be processed.
15. An electronic device, It is characterized in that include: A memory for storing executable instructions; A processor, configured to implement the information processing method according to any one of claims 1 to 13 when executing the executable instructions stored in the memory.
16. A computer-readable storage medium, It is characterized in that Executable instructions are stored, which are used to cause a processor to execute the executable instructions to implement the information processing method described in any one of claims 1 to 13.
17. A computer program product or a computer program, the computer program product or the computer program comprising executable instructions, the executable instructions being stored in a computer readable storage medium; When the processor of the electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the information processing method according to any one of claims 1 to 13 is implemented.