Multi-service calling method and device
Through multi-service calling methods and devices, the problem of high cost of deploying artificial intelligence services is solved, and the cost is reduced and resource utilization efficiency is improved while meeting different application needs.
Patent Information
- Application Number
- CN202311086916.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-08-25
AI Technical Summary
The deployment of artificial intelligence services requires extremely high capabilities in multiple dimensions such as algorithm design, computing power and storage resources, and the artificial intelligence capabilities required by each application are different, resulting in high deployment costs.
A multi-service calling method and device is provided to determine a related message processing policy by receiving message requests, and process message content to obtain feedback information based on the policy call multiple target services integrated with the policy.
The cost of deploying artificial intelligence services is reduced, and different needs of different applications for artificial intelligence services are met. Through unified message processing strategies and service calls, resource utilization efficiency is improved.
Smart Images

Figure CN117119057B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a multi-service invocation method and device. Background Art
[0002] Artificial intelligence has high commercial value and is increasingly being used in various fields. However, the deployment of artificial intelligence services requires extremely high capabilities in multiple dimensions, such as algorithm design, computing power, and storage resources. The artificial intelligence capabilities required by each application are different. Therefore, how to reduce the cost of deploying artificial intelligence services is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The present application provides a multi-service calling method and device to reduce the cost of deploying artificial intelligence services.
[0004] According to one aspect of the present application, a multi-service invocation method is provided, comprising:
[0005] Receiving a message request sent by the first terminal device to the second terminal device, wherein the message request includes message content and an identifier of the second terminal device;
[0006] Determine a message processing policy associated with the identifier of the second terminal device, wherein the message processing policy includes one or more target services;
[0007] In the case of multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, each target service is called to process the message content to obtain feedback information;
[0008] The feedback information is returned to the first terminal device.
[0009] According to another aspect of the present application, a multi-service invocation device is provided, comprising:
[0010] A transceiver module, configured to receive a message request sent by a first terminal device to a second terminal device, wherein the message request includes message content and an identifier of the second terminal device;
[0011] A determination module, used to determine a message processing strategy associated with the identifier of the second terminal device, wherein the message processing strategy includes one or more target services;
[0012] A calling module is used to call each target service to process the message content based on the calling conditions and connection relationship of each target service in the message processing strategy when there are multiple target services to obtain feedback information;
[0013] The above-mentioned transceiver module is used to return the feedback information to the first terminal device.
[0014] According to another aspect of the present application, there is provided an electronic device, including:
[0015] at least one processor; and
[0016] a memory communicatively connected to at least one processor; wherein,
[0017] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute the method of the above embodiment.
[0018] According to another aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method according to the above embodiment.
[0019] The technical solution provided by the embodiment of the present application brings at least the following beneficial effects: after receiving a message request including message content and the identifier of the second terminal device sent by the first terminal device to the second terminal device, determine the message processing strategy including one or more target services associated with the identifier of the second terminal device, and then, in the case of multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, call each target service to process the message content to obtain feedback information, and return the feedback information to the first terminal device. Thus, the calling device calls each integrated target service based on different message processing strategies corresponding to different second terminal devices. Thereby, while meeting the different needs of different applications for artificial intelligence services, the cost of deploying artificial intelligence services for each application is reduced.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0022] Figure 1 A flowchart of a multi-service calling method provided in an embodiment of the present application;
[0023] Figure 2 A schematic diagram of a multi-service call process provided in an embodiment of the present application;
[0024] Figure 3 A flowchart of another multi-service calling method provided in an embodiment of the present application;
[0025] Figure 4 A schematic diagram of another structure of multi-service integration provided in an embodiment of the present application;
[0026] Figure 5 A flowchart of another multi-service calling method provided in an embodiment of the present application;
[0027] Figure 6 A flowchart of another multi-service calling method provided in an embodiment of the present application;
[0028] Figure 7 Another interactive diagram of multiple service calls provided in an embodiment of the present application;
[0029] Figure 8 A schematic diagram of the structure of another multi-service calling device provided in an embodiment of the present application;
[0030] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0032] The following describes in detail the multi-service invocation method, device, electronic device and storage medium of the embodiments of the present application with reference to the accompanying drawings.
[0033] It should be noted that the multi-service calling method implemented in the present application is configured in a multi-service calling device (hereinafter referred to as the calling device) for illustration, and the calling device can be applied to electronic devices such as servers so that the electronic device can perform the function of multi-service calling.
[0034] Figure 1 A flowchart of a multi-service calling method provided in an embodiment of the present application.
[0035] like Figure 1 As shown, the method includes:
[0036] Step 101: Receive a message request sent by a first terminal device to a second terminal device, wherein the message request includes message content and an identifier of the second terminal device.
[0037] The first terminal device may be a personal user terminal device, and the second terminal device may be an enterprise user terminal device or an application deployed device. The identifier of the second terminal device may be any information that can be used to uniquely identify the second terminal device, such as an enterprise user account. The message request may be a dialog message request, etc., which is not limited in this application.
[0038] In the present application, when the first terminal device sends a message request to the second terminal device, the communication network can send the message to the second terminal device. After receiving the message, the second terminal device can forward the message to the calling device.
[0039] Alternatively, when the calling device has completed the uplink message subscription registration of the second terminal device in the message access service in the communication network, the calling device can take over the message request sent to the second terminal device. That is, the communication network directly sends the message request sent by the first terminal device to the second terminal device to the calling device.
[0040] Step 102: determine a message processing policy associated with the identifier of the second terminal device, wherein the message processing policy includes one or more target services.
[0041] In this application, the calling device can integrate multiple services, such as speech recognition service, speech synthesis service, image recognition service, text recognition service, etc., so as to uniformly provide rich artificial intelligence services for the second terminal device. There is no need to deploy the required artificial intelligence services separately for the application, thereby reducing the cost of deploying the artificial intelligence services required for the application.
[0042] In addition, the service integrated by the calling device may be an accessed external service or a service deployed locally, and the present disclosure does not limit this.
[0043] In this application, different applications require different artificial intelligence capabilities, or use different logics for business processing using artificial intelligence. Therefore, in order to meet the needs of each application, it is possible to support the provider of each application to select the services to be used and customize the processing logic that meets the business needs. This will meet the different needs of different applications for artificial intelligence services.
[0044] In this application, the provider of the application can pre-request to configure the message processing policy corresponding to the application in the calling device. The calling device can store the identifier of the second terminal device corresponding to the application in association with the message processing policy. Afterwards, the message processing policy associated with the identifier of the second terminal device can be determined by query.
[0045] Step 103: When there are multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, each target service is called to process the message content to obtain feedback information.
[0046] In the present application, when there is only one target service and the message processing strategy contains the calling conditions corresponding to the target service, first determine whether the message request meets the calling conditions. If it meets the calling conditions, call the interface of the target service and send the message content to the target service. After the target service processes the message content and obtains the processing result corresponding to the message content, it can feed back the processing result to the calling device. The calling device can determine the processing result fed back by the target service as the feedback information corresponding to the message request. Among them, the method for determining whether the message request meets the calling conditions can also be pre-set in the message processing strategy.
[0047] For example, if the target service is a Chinese-English translation service, and the calling condition corresponding to the target service is that the message content is English text or Chinese text, then it can be determined whether the message content is English text or Chinese text, and if so, the target service is called.
[0048] In the present application, when there are multiple target services, the target services can be called one by one to process the message content based on the connection relationship between the target services in the message processing strategy, and the processing result output by the last target service is determined as the feedback message corresponding to the message request. In addition, before calling each target service, if the message processing strategy contains the calling conditions corresponding to each target service, first determine whether the message request meets the calling conditions. If the calling conditions of the target service are met, the target service is called. If the calling conditions of the target service are not met, the target service is not called to process the message content.
[0049] For example, Figure 2 As shown in (a), assuming that the intelligent customer service application is deployed on the second terminal device, the data type of the message content can be determined. When the message content is an audio data type, the voice recognition service is called to process the message content and obtain the text information output by the voice recognition service. When the message content is a picture data type, the image recognition service is called to process the message content and obtain the text information output by the image recognition service. After that, the intelligent question and answer service is called to process the text information and obtain the processing result output by the intelligent question and answer service, and the processing result is determined as the feedback information corresponding to the message request.
[0050] like Figure 2As shown in (b), assuming that the smart search application is deployed on the second terminal device, the data type of the message content can be determined. When the message content is an audio data type, the speech recognition service is called to obtain the text information output by the speech recognition service. After that, the semantic analysis service is called to process the text information and obtain the parsing result output by the semantic analysis service. Then, the parsing result is input into the smart search service to obtain the processing result output by the smart search service, and the processing result is determined as the feedback information corresponding to the message request.
[0051] Optionally, the user can also request to customize the message processing module in the calling device. Then, the calling conditions corresponding to the message processing module and the connection relationship with other target services can be configured in the message processing strategy to meet the needs of complex message processing logic. Figure 2 The message processing strategy shown in (c) includes the connection relationship between the custom message processing module and other target services.
[0052] Step 104: Return the feedback information to the first terminal device.
[0053] Optionally, a service pair may be pre-set, wherein the service pair includes a service of first priority and a service of second priority. Afterwards, when the service of first priority is called, the information fed back by the service of first priority may be associated with the annotation information of the message content and saved in the system to generate a training data set. This facilitates subsequent optimization and training of the artificial intelligence model corresponding to the service of second priority based on the training data set. The function of joint training is realized, the difficulty and cost of collecting training data sets are reduced, and the accuracy of the service of second priority is improved. Among them, the service of first priority is a service with higher accuracy of feedback information. The service of second priority is a service with lower accuracy of feedback information.
[0054] In the present application, after receiving a message request including message content and the identifier of the second terminal device sent by the first terminal device to the second terminal device, a message processing strategy including one or more target services associated with the identifier of the second terminal device is determined. Afterwards, in the case of multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, each target service is called to process the message content to obtain feedback information, and the feedback information is returned to the first terminal device. Thus, the calling device calls each integrated target service based on different message processing strategies corresponding to different second terminal devices. Thus, while meeting the different needs of different applications for artificial intelligence services, the cost of deploying artificial intelligence services for each application is reduced.
[0055] Figure 3 A flowchart of a multi-service calling method provided in an embodiment of the present application.
[0056] like Figure 3 As shown, the method includes:
[0057] Step 301: Receive a message request sent by a first terminal device to a second terminal device, wherein the message request includes message content and an identifier of the second terminal device.
[0058] Step 302: determine a message processing policy associated with the identifier of the second terminal device, wherein the message processing policy includes one or more target services.
[0059] In the present application, the specific implementation process of step 301-step 302 can be found in the detailed description of any embodiment of the present application, and will not be repeated here.
[0060] Step 303, when there are multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, the message content is sent to the interface conversion module associated with the target service, and the interface conversion module forwards the message content to the target service to obtain feedback information.
[0061] like Figure 4 As shown, since the calling methods of the interfaces provided by each service are different, when integrating each service, the calling device can configure the interface conversion module corresponding to each service to achieve the decoupling of the integrated service code. When adding a new service, only the interface module corresponding to the service needs to be added without updating the program of the calling device, thereby reducing the difficulty of integrating each service.
[0062] In this application, when there are multiple target services, based on the calling conditions and connection relationships of each target service in the processing strategy, when calling the target service, the message content can be sent to the interface conversion module associated with the target service. The interface conversion module can call the interface according to the interface specification corresponding to the target service, and send the message content to the target service to obtain feedback information.
[0063] Step 304: Return the feedback information to the first terminal device.
[0064] In the present application, the specific implementation process of step 304 can be found in the detailed description of any embodiment of the present application and will not be repeated here.
[0065] In the present application, after receiving a message request including message content and the identifier of the second terminal device sent by the first terminal device, a message processing strategy including one or more target services associated with the identifier of the second terminal device is determined. Afterwards, in the case of multiple target services, based on the calling conditions and connection relationships of each target service in the processing strategy, the message content is sent to the interface conversion module associated with the target service, and the interface conversion module forwards the message content to the target service to obtain feedback information, and returns the feedback information to the first terminal device. Thus, based on different message processing strategies corresponding to different second terminal devices, each integrated target service is called. Thus, while meeting the different needs of different applications for artificial intelligence services, the cost of deploying artificial intelligence services for each application is reduced.
[0066] Figure 5 A flowchart of a multi-service calling method provided in an embodiment of the present application.
[0067] like Figure 5 As shown, the method includes:
[0068] Step 501: Receive a message request sent by a first terminal device to a second terminal device, wherein the message request includes message content and an identifier of the second terminal device.
[0069] Step 502: Determine a message processing policy associated with the identifier of the second terminal device, wherein the message processing policy includes one or more target services.
[0070] Step 503: When there are multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, each target service is called to process the message content to obtain feedback information.
[0071] In the present application, the specific implementation process of steps 501 to 503 can be found in the detailed description of any embodiment of the present application and will not be repeated here.
[0072] Step 504: When the feedback information contains the first preset keyword, the feedback information is replaced with a preset speech.
[0073] Among them, the first preset keyword is a prohibited sensitive word, such as gambling.
[0074] In this application, if the feedback information contains the first preset keyword, it means that the content of the feedback information involves non-compliant content. Therefore, the feedback information can be replaced with preset words (such as "Sorry, I can't answer your question") to intercept the feedback content information and achieve safe management of the feedback information.
[0075] Step 505: When the feedback information contains the second preset keyword, the feedback information is rewritten using the rewriting rule associated with the identifier of the second terminal device.
[0076] The second preset keyword may be a keyword related to the service that is requested to be set in the calling device by the provider of the application.
[0077] In this application, the service integrated by the calling device is a public service, and the feedback information generated is general information. The provider of the application can request to set a rewriting rule in the calling device. In the case where the feedback information contains the second preset keyword, the calling device can rewrite the feedback information using the rewriting rule associated with the identifier of the second terminal device. Thus, the feedback information is more beneficial to the provider of the application.
[0078] For example, assuming that the provider of the application deployed on the second terminal device is a bank, the rewriting rule associated with the identifier of the second terminal device is: when the feedback information contains the keyword "financial products", add "recommend the purchase of ×× financial products from ×× Bank" to the feedback information. When the message content in the message request sent by the first terminal device to the second terminal device is "how to make money", and the feedback information obtained by the calling device through calling the service is "you can buy financial products", the above rewriting rule can be used to rewrite the feedback information, and the rewritten feedback information is "you can buy financial products, recommend the purchase of ×× financial products from ×× Bank".
[0079] Step 506: Return the feedback information to the first terminal device.
[0080] In the present application, the specific implementation process of step 506 can be found in the detailed description of any embodiment of the present application, and will not be repeated here.
[0081] In this application, after obtaining feedback information, if the feedback information contains the first preset keyword, the feedback information is replaced with the preset words, and if the feedback information contains the second preset keyword, the feedback information is rewritten using the rewriting rules associated with the identification of the second terminal device. This achieves safe management and control of feedback information, making the feedback information more beneficial to the provider of the application.
[0082] Figure 6 A flowchart of a multi-service calling method provided in an embodiment of the present application.
[0083] like Figure 6 As shown, the method includes:
[0084] Step 601: Receive a service configuration message sent by a second terminal device, wherein the service configuration message includes one or more target services, calling conditions and connection relationships of the target services, and rewriting rules for feedback information.
[0085] In this application, the client corresponding to the calling device can be installed in the second terminal device, and the provider of the application can select one or more of the services provided by the calling device as the target service in the client, and set the calling conditions and connection relationship of each target service, the rewriting rules of the feedback information, etc. After completing the above settings, the provider of the application triggers the control corresponding to the service configuration request. After detecting that the control corresponding to the service configuration request is triggered, the client can generate a service configuration message containing one or more target services, the calling conditions and connection relationship of the target service, and the rewriting rules of the feedback information, and send the service configuration message to the calling device.
[0086] Step 602: Generate a message processing policy associated with the identifier of the second terminal device based on the service configuration message.
[0087] In the present application, after receiving the service configuration request, the calling device can parse the service configuration request to determine one or more target services, the calling conditions and connection relationship of the target services, and the rewriting rules of the feedback information. After that, a message processing strategy including the target services, the calling conditions and connection relationship of the target services can be generated, and the message processing strategy and the rewriting rules are associated with the identifier of the second terminal device and stored.
[0088] Step 603: Receive a message request sent by the first terminal device to the second terminal device, wherein the message request includes message content and an identifier of the second terminal device.
[0089] Step 604: Determine a message processing policy associated with the identifier of the second terminal device, wherein the message processing policy includes one or more target services.
[0090] Step 605: When there are multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, each target service is called to process the message content to obtain feedback information.
[0091] Step 606: Return the feedback information to the first terminal device.
[0092] In the present application, the specific implementation process of steps 603 to 606 can be found in the detailed description of any embodiment of the present application and will not be repeated here.
[0093] In this application, the application provider can set feedback rules for feedback information in the client corresponding to the calling device deployed on the second terminal device. After detecting that the control corresponding to the service configuration request is triggered, the client can generate a service configuration message containing feedback rules for feedback information.
[0094] After receiving the service configuration message sent by the client, the calling device can parse the feedback rules of the feedback information from the service configuration message. If the feedback rules indicate that the information should be returned to the source (i.e., the feedback information should be sent to the second terminal device), the message content and feedback information can be sent to the second terminal device.
[0095] In the present application, a service configuration message including one or more target services, calling conditions and connection relationships of the target services, and rewriting rules of feedback information sent by the second terminal device can be received, and based on the service configuration message, a message processing strategy associated with the second terminal device can be generated. After that, after receiving a message request including message content and the identifier of the second terminal device sent by the first terminal device to the second terminal device, a message processing strategy including one or more target services associated with the identifier of the second terminal device is determined. Then, in the case of multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, each target service is called to process the message content to obtain feedback information, and the feedback information is returned to the first terminal device. Thus, the calling device calls each integrated target service based on different message processing strategies corresponding to different second terminal devices. Thereby, while meeting the different needs of different applications for artificial intelligence services, the cost of deploying artificial intelligence services for each application is reduced.
[0096] Figure 7 A schematic diagram of a multi-service call interaction provided in an embodiment of the present application.
[0097] like Figure 7 As shown in (a), the second terminal device can send a service configuration message to the calling device, and the calling device generates a message processing strategy associated with the identifier of the second terminal device based on the service configuration message. In addition, the calling device can also send an uplink message subscription request to the message access service, and the message access service sets the uplink message of the second terminal device to be routed to the calling device.
[0098] like Figure 7As shown in (b), the first terminal device sends a message request to the second terminal device, and the basic communication layer can submit the message to the message access service. The message access service matches the routing strategy based on the subscription information. In the case where the calling device has subscribed to the uplink message of the second terminal device, the message access service sends the message request to the calling device. After receiving the message request, the calling device determines the message processing strategy associated with the identifier of the second terminal device, and then forwards the message content to each target service for processing based on the calling conditions of each target service in the message processing strategy and the connection relationship of the target service. After processing the message content, the target service returns the processing result to the calling device. The calling device rewrites the processing result using the rewriting rule associated with the identifier of the second terminal device, and sends the feedback information determined after the rewriting to the message access service. The message access service sends the feedback information to the basic communication layer, and the basic communication layer sends the feedback message to the first terminal device.
[0099] Figure 8 A schematic diagram of the structure of a multi-service calling device provided in an embodiment of the present application.
[0100] like Figure 8 As shown, the multi-service calling device 800 includes: a transceiver module 810 , a determination module 820 , and a calling module 830 .
[0101] The transceiver module 810 is used to receive a message request sent by the first terminal device to the second terminal device, wherein the message request includes message content and an identifier of the second terminal device;
[0102] A determination module 820, configured to determine a message processing policy associated with the identifier of the second terminal device, wherein the message processing policy includes one or more target services;
[0103] The calling module 830 is used to call each target service to process the message content based on the calling conditions and connection relationship of each target service in the message processing strategy when there are multiple target services to obtain feedback information;
[0104] The above-mentioned transceiver module 810 is used to return feedback information to the first terminal device.
[0105] In a possible implementation of the embodiment of the present application, the calling module 830 is used to:
[0106] The message content is sent to the interface conversion module associated with the target service, and the interface conversion module forwards the message content to the target service.
[0107] In a possible implementation of the embodiment of the present application, it also includes:
[0108] The security monitoring module is used to replace the feedback information with a preset speech when the feedback information contains a first preset keyword.
[0109] In a possible implementation of the embodiment of the present application, it also includes:
[0110] The rewriting module is used to rewrite the feedback information by using the rewriting rule associated with the identifier of the second terminal device when the feedback information contains the second preset keyword.
[0111] In a possible implementation of the embodiment of the present application, a configuration module is further included, which is used to:
[0112] Receiving a service configuration message sent by the second terminal device, wherein the service configuration message includes one or more target services, calling conditions and connection relationships of the target services, and rewriting rules of feedback information;
[0113] Based on the service configuration message, a message processing policy associated with the identifier of the second terminal device is generated.
[0114] In a possible implementation manner of the embodiment of the present application, the service configuration message also includes a feedback rule of the feedback information, and the above-mentioned transceiver module 810 is used to:
[0115] When the feedback rule indicates to return the information to the source, the message content and the feedback information are sent to the second terminal device.
[0116] It should be noted that the explanation of the aforementioned multi-service calling method embodiment is also applicable to the device of this embodiment, so it will not be repeated here.
[0117] In the present application, after receiving a message request including message content and the identifier of the second terminal device sent by the first terminal device to the second terminal device, a message processing strategy including one or more target services associated with the identifier of the second terminal device is determined. Afterwards, in the case of multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, each target service is called to process the message content to obtain feedback information, and the feedback information is returned to the first terminal device. Thus, the calling device calls each integrated target service based on different message processing strategies corresponding to different second terminal devices. Thus, while meeting the different needs of different applications for artificial intelligence services, the cost of deploying artificial intelligence services for each application is reduced.
[0118] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
[0119] Fig. 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9As shown, the electronic device may include:
[0120] A memory 901 storing executable program codes;
[0121] A processor 902 coupled to the memory 901;
[0122] The processor 902 calls the executable program code stored in the memory 901 to execute the multi-service calling method provided by any embodiment of the present application.
[0123] The computer device embodiment and the above method embodiment are embodiments based on the same inventive concept, and the relevant parts can be referenced to each other. The above computer device embodiment corresponds to the method embodiment and has the same technical effect as the method embodiment. For specific description, please refer to the method embodiment.
[0124] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the multi-service calling method provided by any embodiment of the present application.
[0125] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0126] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A multi-service calling method, characterized in that: include: Receiving a message request sent by the first terminal device to the second terminal device, wherein the message request includes message content and an identifier of the second terminal device; Determine a message processing strategy associated with the identifier of the second terminal device, wherein the message processing strategy includes one or more target services, wherein the target services include a speech recognition service and an image recognition service; In the case where there are multiple target services, based on the calling conditions and connection relationships of each target service in the message processing strategy, calling each target service to process the message content to obtain feedback information; Returning the feedback information to the first terminal device; Receiving a service configuration message sent by the second terminal device, wherein the service configuration message includes one or more target services, calling conditions and connection relationships of the target services, and rewriting rules for feedback information; Based on the service configuration message, generating a message processing policy associated with the identifier of the second terminal device; The calling of each of the target services to process the message content includes: The message content is sent to the interface conversion module associated with the target service, and the interface conversion module forwards the message content to the target service. The calling method of the interface provided by each service is different. When integrating each service, the calling device configures the interface conversion module corresponding to each service to achieve decoupling of the integrated service codes. When adding a new service, it is only necessary to add the interface module corresponding to the service without updating the program of the calling device.
2. The method according to claim 1, characterized in that Before returning the feedback information to the first terminal device, the method further includes: In the case where the feedback information includes the first preset keyword, the feedback information is replaced by a preset speech.
3. The method according to claim 1, characterized in that Before returning the feedback information to the first terminal device, the method further includes: In a case where the feedback information includes the second preset keyword, the feedback information is rewritten using a rewriting rule associated with the identifier of the second terminal device.
4. The method according to claim 1, characterized in that The service configuration message also includes a feedback rule for feedback information, and the method further includes: When the feedback rule indicates to return information to the source, the message content and the feedback information are sent to the second terminal device.
5. A multi-service calling device, characterized in that: include: A transceiver module, configured to receive a message request sent by a first terminal device to a second terminal device, wherein the message request includes message content and an identifier of the second terminal device; A determination module, used to determine a message processing strategy associated with the identifier of the second terminal device, wherein the message processing strategy includes one or more target services, wherein the target services include a speech recognition service and an image recognition service; A calling module, used for calling each of the target services to process the message content based on the calling conditions and connection relationships of each of the target services in the message processing strategy when there are multiple target services, so as to obtain feedback information; The transceiver module is used to return the feedback information to the first terminal device; Receiving a service configuration message sent by the second terminal device, wherein the service configuration message includes one or more target services, calling conditions and connection relationships of the target services, and rewriting rules for feedback information; Based on the service configuration message, generating a message processing policy associated with the identifier of the second terminal device; The calling module is used to: The message content is sent to the interface conversion module associated with the target service, and the interface conversion module forwards the message content to the target service. The calling method of the interface provided by each service is different. When integrating each service, the calling device configures the interface conversion module corresponding to each service to achieve decoupling of the integrated service codes. When adding a new service, it is only necessary to add the interface module corresponding to the service without updating the program of the calling device.
6. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-4.
Citation Information
Patent Citations
Customer service intelligent distribution method and device, computer equipment and storage medium
CN112632245A
Examination and approval processing method and device, equipment and storage medium
CN113077241A