Disclosure of Invention
The embodiment of the application provides an information processing method, an information processing system and a storage medium, which are used for achieving the purposes of improving the instruction configuration flexibility of a chat robot, reducing the complexity and realizing difficulty.
In a first aspect, an embodiment of the present application provides an information processing method, including:
when instruction configuration information is received, the instruction configuration information comprises instruction parameters and identification information of at least one chat robot, and the instruction configuration information is stored as an instruction according to a preset data structure;
When the instruction is called, searching an instruction execution module corresponding to the instruction, and operating the instruction execution module to process the instruction parameters to obtain an instruction execution result, wherein each instruction execution module corresponds to at least one instruction;
and searching and calling the chat robot through the identification information of the chat robot included by the instruction.
In the method provided by the embodiment of the application, the instruction is not solidified by writing codes in the code writing process of the instruction execution module, but is configured by configuration information. The instruction is flexible and changeable, when a new instruction needs to be added, the instruction execution module can be multiplexed without being independently developed for the new instruction, and only the needed instruction configuration information is configured, so that the integrated management of a plurality of instructions with the same or similar functions is facilitated. In addition, by adopting the method provided by the embodiment of the application, each instruction can correspond to a plurality of robots and be multiplexed in different scenes. Therefore, the method provided by the embodiment of the application improves the flexibility of the instruction configuration of the chat robot based on the instant messaging tool, and reduces the difficulty and complexity of the instruction configuration.
Optionally, the instruction configuration information indicates an instruction type, and the searching the instruction execution module corresponding to the instruction includes:
And searching an instruction execution module corresponding to the instruction type.
The method provided by the embodiment of the application can divide different instructions into the instruction types, and the instructions of the same instruction type correspond to the same instruction execution module, so that multiplexing and centralized management of the instructions are realized.
Optionally, the instruction type includes at least one of: text instructions for text alerting, hypertext transfer protocol instructions for implementing responsive hypertext transfer protocol (HTTP) based requests and feedback, instructions for implementing custom functions. Wherein the custom functions are distinguished by entry function names.
Optionally, the instruction parameters include an entry function name of an objective entry function and an entry function parameter, the entry function name indicates an instruction type, and the objective entry function is an entry function of an instruction execution module corresponding to the instruction.
Optionally, the instruction configuration information includes code of an entry function of an instruction execution module corresponding to the instruction, and the method further includes:
and generating and storing the instruction execution module according to the code of the entry function.
Optionally, the method further comprises:
when receiving the chat robot configuration information, adding the chat robot indicated by the chat robot configuration information into a chat robot set, wherein the identification information of the chat robot included in the instruction configuration information is the identification information of the chat robot in the robot set.
Optionally, the method further comprises:
when receiving grouping configuration information, adding a target user indicated by the grouping configuration information to a specified user group;
the instruction configuration information also comprises identification information of the specified user group, and when the instruction is called according to the user instruction, whether the user belongs to the user group corresponding to the identification information is judged, and the instruction execution module is operated only when the user belongs to the user group corresponding to the identification information.
Optionally, the method further comprises:
and under the condition that the session link of the instant messaging tool corresponding to the chat robot is disconnected, feeding back the instruction execution result in the instant messaging tool corresponding to the chat robot through a designated callback interface.
In a second aspect, an embodiment of the present application provides an information processing system, including:
the instruction configuration module is used for storing the instruction configuration information as an instruction according to a preset data structure when receiving the instruction configuration information, wherein the instruction configuration information comprises instruction parameters and identification information of at least one chat robot;
the instruction processing module is used for searching an instruction execution module corresponding to the instruction when the instruction is called, and operating the instruction execution module to process the instruction parameters to obtain an instruction execution result, wherein each instruction execution module corresponds to at least one instruction;
And the execution result feedback module is used for searching and calling the chat robot through the identification information of the chat robot included in the instruction.
In the system provided by the embodiment of the application, the instruction is not solidified by writing codes in the code writing process of the instruction execution module, but is configured by configuration information. The instruction is flexible and changeable, when a new instruction needs to be added, the instruction execution module can be multiplexed without being independently developed for the new instruction, and only the needed instruction configuration information is configured, so that the integrated management of a plurality of instructions with the same or similar functions is facilitated. In addition, by adopting the system provided by the embodiment of the application, each instruction can correspond to a plurality of robots and be multiplexed in different scenes. Therefore, the system provided by the embodiment of the application improves the flexibility of instruction configuration of the chat robot based on the instant messaging tool, and reduces the difficulty and complexity of instruction configuration.
Optionally, the instruction configuration information indicates an instruction type, and the instruction processing module searches an instruction execution module corresponding to the instruction, including:
and searching an instruction execution module corresponding to the instruction type.
Optionally, the instruction type includes at least one of: text instructions for text alerting, hypertext transfer protocol instructions for implementing responsive hypertext transfer protocol based requests and feedback, instructions for implementing custom functions. Wherein the custom functions are distinguished by entry function names.
Optionally, the instruction parameters include an entry function name of the objective function and an entry function parameter, the entry function name indicates an instruction type, and the objective entry function is an entry function of an instruction execution module corresponding to the instruction.
Optionally, the instruction configuration information includes code of an entry function of an instruction execution module corresponding to the instruction, and the instruction configuration module is further configured to:
and generating and storing the instruction execution module according to the code of the entry function.
Optionally, the system further comprises a robot information configuration module, configured to:
when receiving the chat robot configuration information, adding the chat robot indicated by the chat robot configuration information into a chat robot set, wherein the identification information of the chat robot included in the instruction configuration information is the identification information of the chat robot in the robot set.
Optionally, the system further includes a packet information configuration module configured to:
when receiving grouping configuration information, adding a target user indicated by the grouping configuration information to a specified user group;
the instruction configuration information also comprises identification information of the specified user group, and when the instruction is called according to the user instruction, whether the user belongs to the user group corresponding to the identification information is judged, and the instruction execution module is operated only when the user belongs to the user group corresponding to the identification information.
Optionally, the execution result feedback module is further configured to:
and under the condition that the session link of the instant messaging tool corresponding to the chat robot is disconnected, feeding back the instruction execution result in the instant messaging tool corresponding to the chat robot through a designated callback interface.
In a third aspect, an embodiment of the present application provides an electronic system, including a processor and a memory;
the memory is used for storing a program for executing the method according to each method embodiment of the first aspect; the processor is configured to execute a program stored in the memory.
In the system provided by the embodiment of the application, the instruction is not solidified by writing codes in the code writing process of the instruction execution module, but is configured by configuration information. The instruction is flexible and changeable, when a new instruction needs to be added, the instruction execution module can be multiplexed without being independently developed for the new instruction, and only the needed instruction configuration information is configured, so that the integrated management of a plurality of instructions with the same or similar functions is facilitated. In addition, by adopting the system provided by the embodiment of the application, each instruction can correspond to a plurality of robots and be multiplexed in different scenes. Therefore, the system provided by the embodiment of the application improves the flexibility of instruction configuration of the chat robot based on the instant messaging tool, and reduces the difficulty and complexity of instruction configuration.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a program for executing the method according to the embodiments of the first aspect.
In the program stored in the computer readable storage medium provided by the embodiment of the application, the instructions are not written in the code writing process of the instruction execution module for solidification, but are configured through configuration information. The instruction is flexible and changeable, when a new instruction needs to be added, the instruction execution module can be multiplexed without being independently developed for the new instruction, and only the needed instruction configuration information is configured, so that the integrated management of a plurality of instructions with the same or similar functions is facilitated. In addition, by adopting the method in the program, each instruction can correspond to a plurality of robots and be multiplexed in different scenes. Therefore, the method in the program improves the flexibility of instruction configuration of the chat robot based on the instant messaging tool, and reduces the difficulty and complexity of instruction configuration.
Detailed Description
In order to better understand the above technical solutions, the following detailed description of the technical solutions of the embodiments of the present application is made by using the accompanying drawings and the specific embodiments, and it should be understood that the specific features of the embodiments of the present application are detailed descriptions of the technical solutions of the embodiments of the present application, and not limit the technical solutions of the present application, and the technical features of the embodiments of the present application may be combined with each other without conflict.
The embodiment of the application provides an information processing method, which is used for realizing related functions such as injection project development progress inquiry, translation, vulnerability detection, timing reminding, target resource acquisition and the like through a chat robot based on an instant messaging tool.
Taking a project development scenario as an example, in the process of project development, all members of a project group can use a common instant messaging tool to perform work communication matching. Based on the instant messaging tool, a chat robot is created, a corresponding instruction execution module is preset for the required function, an instruction is created through instruction configuration, and work interaction is performed through the instruction. For example, a chat robot based on an instant messaging is customized, and a member can inquire the progress of a current project version by private chat with the chat robot or triggering a progress instruction in a chat group with the chat robot.
As shown in fig. 1, the information processing method provided by the embodiment of the present application includes the following operations:
step 101, when instruction configuration information is received, the instruction configuration information comprises instruction parameters and identification information of at least one chat robot, and the instruction configuration information is stored as an instruction according to a preset data structure.
The method provided by the embodiment of the application supports the configuration of the same instruction to a plurality of chat robots.
The embodiment of the application does not limit the data structure of the instruction.
Step 102, when the instruction is called, searching an instruction execution module corresponding to the instruction, and operating the instruction execution module to process the instruction parameters to obtain an instruction execution result, wherein each instruction execution module corresponds to at least one instruction.
According to the method provided by the embodiment of the application, each instruction execution module realizes different functions, and the same instruction execution module can be multiplexed by the instructions corresponding to the same or similar functions.
The embodiment of the application comprises a trigger instruction and a timing task instruction. The user calls the triggering instruction in the instant messaging tool by sending the chat message containing the instruction information in the conversation window of the chat robot or the conversation window of the chat group where the chat robot is located. The timing task instruction is called at a preset trigger time (for example, a preset time point), and a message execution result is fed back in a conversation window through the chat robot in the instant messaging tool.
Step 103, searching and calling the chat robot through the identification information of the chat robot included in the instruction.
Correspondingly, the instruction execution result is fed back in the instant messaging tool corresponding to the searched chat robot.
The method shown in fig. 1 may be implemented on a server.
In the method provided by the embodiment of the application, the instruction is not solidified by writing codes in the code writing process of the instruction execution module, but is configured by configuration information. The instruction is flexible and changeable, when a new instruction needs to be added, the instruction execution module can be multiplexed without being independently developed for the new instruction, and only the needed instruction configuration information is configured, so that the integrated management of a plurality of instructions with the same or similar functions is facilitated. In addition, by adopting the method provided by the embodiment of the application, each instruction can correspond to a plurality of robots and be multiplexed in different scenes. Therefore, the method provided by the embodiment of the application improves the flexibility of the instruction configuration of the chat robot based on the instant messaging tool, and reduces the difficulty and complexity of the instruction configuration.
In the existing implementation scheme, each chat robot instruction does not have good permission isolation, and all users can use the corresponding instruction. In order to improve the security of the system, the embodiment of the application performs authority isolation on the instruction, and the authority isolation can be realized by at least one of the following ways: the chat robots corresponding to the configuration instructions, the user groups corresponding to the configuration instructions (the user groups can be chat groups in the instant messaging tool, project groups for project development and the like), and the user lists configured with the permission calling instructions.
The implementation mode of the chat robot corresponding to the configuration instruction is as follows: when receiving the chat robot configuration information, adding the chat robot indicated by the chat robot configuration information into a chat robot set, wherein the chat robot included in the instruction configuration information is the chat robot in the robot set. By way of example and not limitation, chat robot configuration information includes a robot name, identification information (e.g., ID) of the instant messaging tool, and the like.
Chat robots are used for receiving instructions and returning instruction execution results, one robot can be shared by the same item, and some robots can be multiplexed among a plurality of items. The embodiment of the application can provide a unified robot management interface, and the configuration, management and viewing of the chat robot can be realized through the robot management interface. It should be noted that the premise of configuring a robot through the robot management interface is that the chat robot has been created.
By configuring chat robots to be added to the chat robot set and allowing only chat robots in the chat robot set to participate in instruction processing, the safety and reliability of information processing can be ensured.
Accordingly, in the instruction configuration stage, one or more chat robots need to be configured to feed back the instruction execution result, and for the trigger type instruction, the configured chat robots also need to receive chat messages containing instruction information to implement instruction calling, and then in the instruction configuration stage, the chat robots are selected from the chat robots added to the chat robot set.
In practical applications, for the triggered instruction, the instruction return result returns to the conversation window that sends the chat message, for example, if the chat message is sent through the conversation window of the chat group where the chat robot is located, the instruction execution result returns to the conversation window of the chat group, and if the chat message is sent through the private chat conversation window of the chat robot, the instruction execution result returns to the private chat conversation window. For a timed task instruction, in the instruction configuration stage, one or more chat groups need to be configured for the instruction, so that an instruction execution result is returned to the configured chat group, and in particular, the chat group configured for the instruction is the chat group in which the chat robot configured for the instruction is located.
The user list configured with the permission calling instruction can be realized in the instruction configuration stage.
Each instruction, while configured with a corresponding chat robot, should not be executable by all group members who can see the chat robot. Such as restarting a server instruction, should only have rights to execute for several group members associated with the server development, thus requiring that the instruction be configured with a rights whitelist (i.e., a list of users that have rights to invoke the instruction).
The implementation mode of the user group corresponding to the configuration instruction is as follows: when receiving grouping configuration information, adding a target user indicated by the grouping configuration information to a specified user group; the instruction configuration information also comprises identification information of the specified user group, and when the instruction is called according to the user instruction, whether the user belongs to the user group corresponding to the identification information is judged, and the instruction execution module is operated only when the user belongs to the user group corresponding to the identification information.
The instruction also comprises identification information for designating the user group.
The instruction authority cannot be well managed by only relying on the authority white list. For example, a certain instruction should be that all members of a certain project group have corresponding rights, if it is very troublesome to add the instructions one by one through a rights white list, instruction rights groups (i.e. user groups) should be established, and each group has corresponding group members.
For each group, a group member may be added so that each instruction can select an existing group.
Further, one instruction may configure two or more user groups, and when the user invokes the instruction through the chat message, the user group where the user is located may be searched, and further, the instruction corresponding to the user group may be searched, so that the instruction corresponding to the user may be accurately executed. In addition, in the case of the optical fiber,
when a user belongs to a plurality of user groups, if a certain instruction configures the plurality of user groups, an interactive interface needs to be popped up for interactive selection. For example: the item J1 and the item J2 both have a loophole searching instruction, the user A has the authority of calling the loophole searching instruction of the item J1 and the item J2 at the same time, and when the user A calls the instruction in the chat group, an interaction interface is popped up to prompt the user to select between the item J1 and the item J2, so that the corresponding instruction is selected for execution, and the error execution instruction is avoided.
The method provided by the embodiment of the application can divide the instruction types for different instructions, and the instructions of the same instruction type correspond to the same instruction execution module, so that multiplexing and centralized management of the instructions are realized. Correspondingly, the instruction configuration information indicates an instruction type, and the searching the instruction execution module corresponding to the instruction includes: and searching an instruction execution module corresponding to the instruction type, wherein the instruction types of the instructions corresponding to the same instruction execution module are the same.
By way of example and not limitation, instructions may be divided into the following types: text instructions, HTTP instructions, instructions to implement a certain custom function (where different custom functions are distinguished by entry function names to which the custom function corresponds). Each class of instructions corresponds to an instruction execution module to implement a corresponding function.
The method provided by the embodiment of the application can realize the configuration of the instructions through the front-end configuration interface, and in practical application, various instructions can use the same configuration template, and various instructions can also use different configuration templates.
The text instruction is used for carrying out text reminding in the dialogue window, and the text instruction can be a trigger instruction or a timing task instruction. The instruction execution module corresponding to the text instruction can realize the text reminding function. When a user needs to create a text instruction, calling a text instruction configuration template shown in fig. 2, and inputting the following instruction configuration information through the text instruction configuration template by the user: instruction name, text content, whether it is a timed task, timed execution time, chat robot selected, user whitelist, notification object, corresponding user grouping.
Wherein the instruction parameters include at least text content.
The text content is the content which needs to be displayed in the dialogue window.
If the timing task instruction is not executed, the timing execution time is not required to be input.
The selected robot is the chat robot included in the instruction configuration information.
The notification object may be a chat group or may be specific to a user.
The text instruction only carries out fixed text reminding and is generally used for timing reminding. The configured text instructions may send the text content filled out by the user into a specific group and @ owner through @ robots or timed tasks. Although the text instruction is simple, the text instruction can be used frequently in practice, such as reminding a person to claim the demand and to follow up the bug, which is equivalent to a group member calendar reminder combined with the instant messaging tool.
The HTTP instruction is used for sending a GET or POST request to the URL filled by the user and feeding back the request result, and the HTTP instruction can be a trigger instruction or a timing task instruction. The instruction execution module corresponding to the HTTP instruction can realize HTTP-based request and feedback. When a user needs to create an HTTP instruction, an HTTP instruction configuration template shown in FIG. 3 is called, and the user inputs the following instruction configuration information through the HTTP instruction configuration template: instruction name, instruction description, request URL, request method (GET or POST), request header, request body parameters, user whitelist, whether task is timed, time of execution is timed, chat robot selected, notification object, corresponding user group.
Unlike text instructions, HTTP instructions can configure the URL of the request, the request method (get/post), and if a post request, the request header and parameters, thus supporting the configuration of all HTTP requests, and certainly timing tasks.
Wherein, the instruction parameters at least comprise: instruction description, request URL, request method, request header, request body parameters.
The instruction for realizing a certain customized function may be an instruction in which the instruction execution module is created in advance, or may be an instruction in which the instruction execution module is not created yet. In the embodiment of the present application, the former is referred to as an internal instruction, and the latter is referred to as an external instruction.
Text instructions and HTTP instructions can only accommodate some very general scenarios, and more often require implementation of specific instruction logic, custom instruction execution modules. When a user needs to create an instruction for realizing a certain customized function, an instruction configuration template shown in fig. 4 is called, and the user inputs the following instruction configuration information through the HTTP instruction configuration template: instruction name, entry function name, instruction description, user whitelist, whether task is timed, time is timed to be executed, entry function parameters, chat robot selected, notification object, corresponding user group.
Wherein, the instruction parameters at least comprise: entry function name, instruction description, entry function parameters.
Each built-in instruction corresponds to an entry function that is part of the instruction execution module. The entry function names indicate the instruction types, and the same entry function names mean that instruction execution modules are identical and realize the same or similar functions. Different built-in instructions corresponding to the same entry function can be distinguished by configuring different entry function parameters, an instruction execution module does not need to be independently written for each instruction, and the instructions with the same or similar functions can be combined and multiplexed to a certain extent. Taking a bug (bug) detection instruction as an example, the bug detection instructions of different items have similar functions, but the corresponding items are different, so that the bug detection instructions of different items can be distinguished through entry function parameters.
The entry function of the instruction execution module corresponding to the built-in instruction is directly realized in the server background, although the existing functions can be abstracted and multiplexed in a mode of function parameters as far as possible, some functions always need to be completely customized, and whether the corresponding specific instruction function is realized in the server background or the corresponding function is realized by building a new instruction background, the implementation is very inconvenient. The method provided by the embodiment of the application realizes the corresponding function at the front end, and can be directly used after being stored. The external instruction basic flow is the same as other types of instructions, except that instruction editing and instruction debugging functions are provided at the front end. The detailed codes of the corresponding entry functions and the instruction basic information edited by the front end are stored in the background database. That is, the above instruction configuration information further includes a code of an entry function of an instruction, and the instruction execution module is generated and stored according to the code of the entry function.
When a message request of the robot is received, the message analysis module informs the instruction access module to take out all instructions from the database for instruction matching, if the corresponding instructions are matched, the instruction access system takes out the corresponding instruction code character strings from the database and transmits the corresponding instruction code character strings to the instruction processing system, and the instruction processing system analyzes the instruction code character strings in the background, executes the corresponding instruction functions and returns the results. In the running process of the program, the code character strings of the same or different languages are analyzed, the execution is carried out, and the result is received, which is the key of external instruction processing. Currently, there are rich language libraries that can assist in this process. Such as: python can execute the character string of python grammar through exec method, pyV library can be introduced to execute code character transmission of JavaScript grammar, and other libraries can parse and execute more language code character strings.
Optionally, the feeding back the instruction execution result in the instant messaging tool corresponding to the chat robot includes:
and under the condition that the session link of the instant messaging tool corresponding to the chat robot is disconnected, feeding back the instruction execution result in the instant messaging tool corresponding to the chat robot through a designated callback interface.
In one implementation manner, each instruction can be marked to distinguish whether the corresponding instruction execution result is an instant feedback result, when the instruction execution result needs to be fed back, whether the instruction execution result is an instant feedback result is judged according to the corresponding mark, and for non-instant feedback results, the conversation link of the instant communication tool corresponding to the chat robot is disconnected; in another implementation, when the instruction execution result needs to be fed back, whether the session link of the instant messaging tool corresponding to the chat robot is disconnected is checked.
In addition to configuring instruction functions at the front end, the robot may also provide a callback interface to handle asynchronous message calls. The REST API for calling the robot to send information is provided as follows:
when an instruction is executed asynchronously, the execution may end by invoking the http interface to return a message to the specified group.
The method provided by the embodiment of the application is explained below in connection with a specific application scenario. In the application scenario, a B/S architecture, i.e., a web browser/web server architecture, is employed. As shown in fig. 5, the front-end configuration interface is displayed through a web browser, so that the front-end configuration such as chat robot configuration, instruction configuration, user grouping configuration and the like is realized, and the instructions of the front-end configuration are stored into the database through the instruction access module of the server. For the trigger type instruction, after the chat robot sends an instruction message, the information such as the instruction name, the parameter and the like is analyzed through the message analysis module of the server, then the information is sent to the instruction access module of the server for instruction matching, the matched result is sent to the instruction processing module of the server for execution, and the instruction execution result is returned through the corresponding robot. For the timing task instruction, when the designated time is reached, the instruction access module performs instruction matching, sends a matching result to the instruction processing module for execution, and returns an instruction execution result through the corresponding robot.
The user interacts through @ designated robot + message, so that the problem that a plurality of robots exist in a group and different robots have the same instruction to cause disorder can be solved.
The embodiment of the application combines the configuration modes of the two instructions, and can realize the configuration of the trigger type instruction and the configuration of the timing task instruction through the same instruction configuration template.
According to the method provided by the embodiment of the application, all robots and instructions share one background, and the new instructions can realize the functions of corresponding instructions by directly configuring texts and HTTP requests at the front end, multiplexing internal instructions or realizing external instructions by customizing functions at the front end. The robot, the instruction and the authority group are completely divided, so that the maximum multiplexing of the instruction can be realized, and a new robot can be freely configured. The execution authority of each instruction is controlled through the white list and the grouping, so that the safety of instruction execution is ensured. The instruction timing task is only configured at the front end directly, supports time configuration modes of various formats, and is convenient to change. And an interface for asynchronous callback is provided, so that asynchronous message return can be conveniently processed.
Based on the same inventive concept as the method, an embodiment of the present application provides an information processing system, as shown in fig. 6, including:
The instruction configuration module 601 is configured to store, as an instruction, instruction configuration information according to a predetermined data structure, the instruction configuration information including instruction parameters and identification information of at least one chat robot;
the instruction processing module 602 is configured to, when the instruction is called, find an instruction execution module corresponding to the instruction, run the instruction execution module to process the instruction parameter, obtain an instruction execution result, where each instruction execution module corresponds to at least one instruction;
and the execution result feedback module 603 is configured to search and call the chat robot through the identification information of the chat robot included in the instruction.
In the system provided by the embodiment of the application, the instruction is not solidified by writing codes in the code writing process of the instruction execution module, but is configured by configuration information. The instruction is flexible and changeable, when a new instruction needs to be added, the instruction execution module can be multiplexed without being independently developed for the new instruction, and only the needed instruction configuration information is configured, so that the integrated management of a plurality of instructions with the same or similar functions is facilitated. In addition, by adopting the system provided by the embodiment of the application, each instruction can correspond to a plurality of robots and be multiplexed in different scenes. Therefore, the system provided by the embodiment of the application improves the flexibility of instruction configuration of the chat robot based on the instant messaging tool, and reduces the difficulty and complexity of instruction configuration.
Optionally, the instruction configuration information indicates an instruction type, and the instruction processing module searches an instruction execution module corresponding to the instruction, including:
and searching an instruction execution module corresponding to the instruction type.
Optionally, the instruction type includes at least one of: text instructions for text alerting, hypertext transfer protocol instructions for implementing responsive hypertext transfer protocol based requests and feedback, instructions for implementing custom functions. Wherein the custom function is differentiated by the name of the entry function.
Optionally, the instruction parameters include an entry function name of the target entry function and an entry function parameter, the entry function name indicates an instruction type, and the target entry function is an entry function of an instruction execution module corresponding to the instruction.
Optionally, the instruction configuration information includes code of an entry function of an instruction execution module corresponding to the instruction, and the instruction configuration module is further configured to:
and generating and storing the instruction execution module according to the code of the entry function.
Optionally, the system further comprises a robot information configuration module, configured to:
when receiving the chat robot configuration information, adding the chat robot indicated by the chat robot configuration information into a chat robot set, wherein the identification information of the chat robot included in the instruction configuration information is the identification information of the chat robot in the robot set.
Optionally, the system further includes a packet information configuration module configured to:
when receiving grouping configuration information, adding a target user indicated by the grouping configuration information to a specified user group;
the instruction configuration information also comprises identification information of the specified user group, and when the instruction is called according to the user instruction, whether the user belongs to the user group corresponding to the identification information is judged, and the instruction execution module is operated only when the user belongs to the user group corresponding to the identification information.
Optionally, the execution result feedback module is further configured to:
and under the condition that the session link of the instant messaging tool corresponding to the chat robot is disconnected, feeding back the instruction execution result in the instant messaging tool corresponding to the chat robot through a designated callback interface.
The modules described above may be implemented as software components executing on one or more general-purpose processors, as hardware, such as programmable logic devices and/or application specific integrated circuits, that perform certain functions or combinations thereof. In some embodiments, these modules may be embodied in the form of a software product that may be stored in a non-volatile storage medium including instructions for causing a computer device (e.g., personal computer, server, network device, mobile terminal, etc.) to perform the methods described in embodiments of the invention. In one embodiment, the modules described above may also be implemented on a single device or may be distributed across multiple devices. The functions of these modules may be combined with each other or further split into a plurality of sub-modules.
The system in the above embodiments may include a network device such as a server.
It will be clear to those skilled in the art that, for convenience and brevity of description, the specific working procedure of the modules of the system described above may refer to the corresponding procedure in the foregoing method embodiment, which is not described herein again.
Based on the same inventive concept as the method, an embodiment of the present application provides an electronic system including a processor and a memory;
the memory is used for storing a program for executing the method of each method embodiment; the processor is configured to execute a program stored in the memory. When the program instructions stored in the memory are run by the processor, the processor performs the methods described in the above-mentioned respective method embodiments and is also used to implement the corresponding modules in the terminal device according to the embodiments of the present application. The processor may be a processing unit including a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device to perform the desired functions. The memory may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by a processor to implement the functions of the embodiments of the present disclosure described above and/or other desired functions.
In the system provided by the embodiment of the application, the instruction is not solidified by writing codes in the code writing process of the instruction execution module, but is configured by configuration information. The instruction is flexible and changeable, when a new instruction needs to be added, the instruction execution module can be multiplexed without being independently developed for the new instruction, and only the needed instruction configuration information is configured, so that the integrated management of a plurality of instructions with the same or similar functions is facilitated. In addition, by adopting the system provided by the embodiment of the application, each instruction can correspond to a plurality of robots and be multiplexed in different scenes. Therefore, the system provided by the embodiment of the application improves the flexibility of instruction configuration of the chat robot based on the instant messaging tool, and reduces the difficulty and complexity of instruction configuration.
Based on the same inventive concept as the method, the embodiments of the present application provide a computer readable storage medium storing a program for executing the method according to the respective embodiments of the first aspect.
In the program stored in the computer readable storage medium provided by the embodiment of the application, the instructions are not written in the code writing process of the instruction execution module for solidification, but are configured through configuration information. The instruction is flexible and changeable, when a new instruction needs to be added, the instruction execution module can be multiplexed without being independently developed for the new instruction, and only the needed instruction configuration information is configured, so that the integrated management of a plurality of instructions with the same or similar functions is facilitated. In addition, by adopting the method in the program, each instruction can correspond to a plurality of robots and be multiplexed in different scenes. Therefore, the method in the program improves the flexibility of instruction configuration of the chat robot based on the instant messaging tool, and reduces the difficulty and complexity of instruction configuration.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present description have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the disclosure.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present specification without departing from the spirit or scope of the specification. Thus, if such modifications and variations of the present specification fall within the scope of the claims and the equivalents thereof, the present specification is also intended to include such modifications and variations.