CN113542301A - Interaction method and device, electronic equipment and storage medium - Google Patents

Interaction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113542301A
CN113542301A CN202110871920.0A CN202110871920A CN113542301A CN 113542301 A CN113542301 A CN 113542301A CN 202110871920 A CN202110871920 A CN 202110871920A CN 113542301 A CN113542301 A CN 113542301A
Authority
CN
China
Prior art keywords
interaction
request
information
interactive
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110871920.0A
Other languages
Chinese (zh)
Other versions
CN113542301B (en
Inventor
陈家涛
杨晓璐
刘杰
汶林丁
刘云峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhuiyi Technology Co Ltd
Original Assignee
Shenzhen Zhuiyi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhuiyi Technology Co Ltd filed Critical Shenzhen Zhuiyi Technology Co Ltd
Priority to CN202110871920.0A priority Critical patent/CN113542301B/en
Publication of CN113542301A publication Critical patent/CN113542301A/en
Application granted granted Critical
Publication of CN113542301B publication Critical patent/CN113542301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses an interaction method, an interaction device, electronic equipment and a storage medium, which relate to the technical field of man-machine interaction and comprise the following steps: the method comprises the steps of obtaining an interaction request sent by an interaction client as a first interaction request, converting the interaction request into a second interaction request, and sending the second interaction request to a query server, wherein a network transmission protocol corresponding to the first interaction request is different from a network transmission protocol corresponding to the second interaction request; then, acquiring interactive information fed back by the query server in response to the second interactive request as first interactive information; and converting the first interactive information into second interactive information, and sending the second interactive information serving as interactive output information to the interactive client to indicate the interactive client to output the interactive output information, wherein the network transmission protocol corresponding to the second interactive information is the same as the network transmission protocol corresponding to the first interactive request, and the network transmission protocol corresponding to the first interactive information is the same as the network transmission protocol corresponding to the second interactive request, so that communication among devices with different protocols is realized.

Description

Interaction method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of human-computer interaction technologies, and in particular, to an interaction method, an interaction device, an electronic device, and a storage medium.
Background
At present, the communication protocol has no unified standard, and the communication protocols used by different devices produced by different manufacturers may be inconsistent. Generally, only devices of the same protocol can communicate with each other, but devices of different communication protocols cannot communicate with each other normally.
Disclosure of Invention
In view of the foregoing, the present application provides an interaction method, an interaction device, an electronic device, and a storage medium, which enable devices with different communication protocols to communicate with each other.
In a first aspect, an embodiment of the present application provides an interaction method, which is applied to an electronic device, where the electronic device is used to connect with an interaction client and a query server, respectively, and the method includes: acquiring an interactive request sent by the interactive client as a first interactive request; converting the first interaction request into a second interaction request, and sending the second interaction request to the query server, wherein a network transmission protocol corresponding to the first interaction request is different from a network transmission protocol corresponding to the second interaction request; acquiring interaction information fed back by the query server in response to the second interaction request as first interaction information; and converting the first interaction information into second interaction information, and sending the second interaction information serving as interaction output information to the interaction client to indicate the interaction client to output the interaction output information, wherein a network transmission protocol corresponding to the second interaction information is the same as a network transmission protocol corresponding to the first interaction request, and a network transmission protocol corresponding to the first interaction information is the same as a network transmission protocol corresponding to the second interaction request.
Optionally, the number of the query servers is multiple, the converting the first interaction request into a second interaction request, and sending the second interaction request to the query servers includes: acquiring a target query server corresponding to the first interaction request from a plurality of query servers; and converting the first interaction request into the second interaction request based on a network transmission protocol corresponding to the target query server, and sending the second interaction request to the target query server.
Optionally, the obtaining, in the plurality of query servers, a target query server corresponding to the first interaction request includes: converting the first interactive request into a third interactive request, wherein a network transmission protocol corresponding to the first interactive request is different from a network transmission protocol corresponding to the third interactive request; and acquiring the target query server corresponding to the third interactive request from the plurality of query servers.
Optionally, the converting the first interaction information into second interaction information, and sending the second interaction information as interaction output information to the interaction client includes: acquiring request information carried by the first interactive request; acquiring third interaction information corresponding to the request information, wherein a network transmission protocol corresponding to the third interaction information is the same as a network transmission protocol corresponding to the first interaction request; and sending the second interaction information and the third interaction information as the interaction output information to the interaction client.
Optionally, the obtaining, by the query server, interaction information fed back by responding to the second interaction request as first interaction information includes: the method comprises the steps of obtaining privacy levels corresponding to each request message in a plurality of request messages, wherein the privacy levels comprise a first privacy level; and acquiring interactive information fed back by the inquiry server in response to the request information with the privacy level being the first privacy level in the plurality of request information as first interactive information.
Optionally, the privacy levels further include a second privacy level, where the first privacy level is higher than the second privacy level, and the obtaining third interaction information corresponding to the request information includes: and acquiring third interactive information corresponding to the request information with the privacy level of the second privacy level in the plurality of request information from the local electronic equipment.
Optionally, the electronic device includes a core service system, where the core service system is configured to store a plurality of interactive response information, the first interactive request carries user identity information, and the obtaining, from the local electronic device, interactive information corresponding to request information with a privacy level of a second privacy level in the plurality of request information as third interactive information includes: obtaining a plurality of intermediate interactive outputs corresponding to request information with a privacy level of a second privacy level in the plurality of request information from the plurality of interactive response information of the core service system; and in the plurality of intermediate interactive outputs, taking the intermediate interactive output corresponding to the user identity information as the third interactive output.
Optionally, the core service system includes an online mode, and the obtaining, from the multiple interactive response messages of the core service system, multiple intermediate interactive outputs corresponding to request messages of which privacy levels are second privacy levels in the multiple request messages includes: and when the core service system is in the online mode, acquiring the intermediate interactive outputs corresponding to the request information with the privacy level being the second privacy level in the request information from the interactive response information of the core service system.
Optionally, the core service system further includes an offline mode, and the method further includes: and when the core service system is in the off-line mode, acquiring updated interactive response information, and storing the updated interactive response information in the core service system.
Optionally, the electronic device is configured to connect to a client server, and the acquiring an interaction request sent by the interaction client as a first interaction request includes: and acquiring the interactive request sent by the interactive client and received by the client server as a first interactive request.
Optionally, the sending the second interaction information to the interaction client as interaction output information to instruct the interaction client to output the interaction output information includes: and sending the second interaction information as interaction output information to the client so as to instruct a client robot of the client to output the interaction output information.
Optionally, the electronic device includes a kafka log system, and the method further includes: binding the second interaction request with the first interaction information to obtain binding information; and storing the binding information in the kafka log system.
Optionally, the electronic device includes an API interface, and the converting the first interaction request into a second interaction request includes: and the API interface converts the first interactive request into the second interactive request.
In a second aspect, an embodiment of the present application provides an interaction apparatus, which is applied to an electronic device, where the electronic device is used to connect with an interaction client and a query server, respectively, and the apparatus includes: the acquisition module is used for acquiring the interactive request sent by the interactive client as a first interactive request; the first conversion module is used for converting the first interaction request into a second interaction request and sending the second interaction request to the query server, wherein a network transmission protocol corresponding to the first interaction request is different from a network transmission protocol corresponding to the second interaction request; the response module is used for acquiring the interactive information fed back by the query server in response to the second interactive request as first interactive information; and the second conversion module is used for converting the first interaction information into second interaction information and sending the second interaction information serving as interaction output information to the interaction client so as to indicate the interaction client to output the interaction output information, wherein a network transmission protocol corresponding to the second interaction information is the same as a network transmission protocol corresponding to the first interaction request, and a network transmission protocol corresponding to the first interaction information is the same as a network transmission protocol corresponding to the second interaction request.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the above-described method.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.
The application provides an interaction method, an interaction device, electronic equipment and a storage medium, which are applied to the electronic equipment, wherein the electronic equipment is connected with an interaction client and a query server, and firstly, an interaction request sent by the interaction client is obtained as a first interaction request; secondly, converting the first interactive request into a second interactive request, and sending the second interactive request to the query server, wherein the network transmission protocol corresponding to the first interactive request is different from the network transmission protocol corresponding to the second interactive request; then, acquiring interactive information fed back by the query server in response to the second interactive request as first interactive information; and converting the first interactive information into second interactive information, and sending the second interactive information as interactive output information to the interactive client to indicate the interactive client to output the interactive output information, wherein a network transmission protocol corresponding to the second interactive information is the same as a network transmission protocol corresponding to the first interactive request, a network transmission protocol corresponding to the first interactive information is the same as a network transmission protocol corresponding to the second interactive request, and when the interactive client and the query server have different communication protocols, the protocol conversion is performed through the electronic equipment, so that data interaction can be performed on information between the interactive client and the query server, and communication between equipment with different protocols is realized.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an application environment of an interaction method provided by an embodiment of the present application;
FIG. 2 is a block diagram of an interactive system provided in an embodiment of the present application;
FIG. 3 is a flow chart illustrating an interaction method provided by an embodiment of the present application;
FIG. 4 is a flow chart illustrating an interaction method according to another embodiment of the present application;
FIG. 5 is a flow chart illustrating an interaction method according to another embodiment of the present application;
FIG. 6 is a flow chart illustrating an interaction method according to yet another embodiment of the present application;
FIG. 7 is a flow chart illustrating an interaction method provided by yet another embodiment of the present application;
FIG. 8 is a flow chart illustrating an interaction method according to yet another embodiment of the present application;
FIG. 9 shows a schematic diagram of an electronic device provided herein;
FIG. 10 is a flow chart illustrating an interaction method according to another embodiment of the present application;
FIG. 11 is a block diagram of an interaction device provided by an embodiment of the present application;
fig. 12 is a block diagram of an electronic device for executing an interaction method according to an embodiment of the present application;
fig. 13 illustrates a storage unit for storing or carrying program code for implementing an interaction method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, the communication protocol has no unified standard, and the communication protocols used by different devices produced by different manufacturers may be inconsistent. Generally, only devices of the same protocol can communicate with each other, but devices of different communication protocols cannot communicate with each other normally.
In order to solve the above problems, the inventor of the present application has made research and development, and when the communication protocols of the interactive client and the query server are different, the protocol is converted by the electronic device, that is, the data sent by the interactive client is converted into the data corresponding to the communication protocol of the query service area, and then forwarded to the query server; similarly, the data sent by the query server is converted into the data corresponding to the communication protocol of the interactive client, and then the data is forwarded to the interactive client, so that the data communication between the interactive client and the query server is realized.
In order to better understand an interaction method, an interaction device, an interaction electronic device, and a storage medium provided in the embodiments of the present application, an application environment suitable for the embodiments of the present application is described below.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application environment of an interaction method according to an embodiment of the present disclosure. The interaction method, the interaction device, the electronic device and the storage medium provided by the embodiment of the application can be applied to the video system 300 shown in fig. 1. The video system 300 comprises an intelligent terminal 301 and a server 302, wherein the server 302 is in communication connection with the intelligent terminal 301. The server 302 may be implemented by an independent server or a server cluster composed of a plurality of servers. In addition, the server may be a cloud server, and may also be a traditional machine room server, which is not specifically limited herein.
In some embodiments, the smart terminal 301 may be a variety of electronic devices having a display screen and supporting data entry, including but not limited to smartphones, tablets, laptop portable computers, desktop computers, wearable electronic devices, and the like. Specifically, the data input may be based on voice input by a voice module configured by the intelligent terminal 301, character input by a character input module, image input by an image input module, video input by a video input module, and the like, or may be based on a gesture recognition module configured by the intelligent terminal 301, so that a user may implement an interactive mode such as gesture input.
Wherein, the intelligent terminal 301 may be installed with a client application program, and a user may communicate with the server 302 based on the client application program (e.g. APP such as WeChat, WeChat applet, etc.), specifically, the server 302 is installed with a corresponding server application program, the user may register a user account at the server 302 based on the client application program and communicate with the server 302 based on the user account, for example, the user logs in the user account at the client application program and inputs through the client application program based on the user account, and may input text information, voice information, image information, video information, etc., after receiving user input information, the client application program sends the input information corresponding to the communication protocol of the client to the electronic device, the electronic device converts the input information into input information corresponding to the communication protocol of the server 302 and forwards the input information to the server 302, the server 302 can receive the information, process and store the information, the server 302 can also receive the information, convert corresponding output information according to the information through a protocol of the electronic device and then return the output information to the intelligent terminal 301, and the intelligent terminal 301 outputs and displays the information.
In some embodiments, the server 302 may be configured to receive information input by a user, generate a picture of the simulated robot according to the information, convert the picture by an electronic device, and send the picture to the intelligent terminal 301, so as to provide a customer service to the intelligent terminal 301 and perform customer service communication with the user. Specifically, the intelligent terminal 301 may receive information input by the user, and present a screen of the simulated robot sent to the intelligent terminal 301 by the server 302. The simulation robot is a software program based on visual graphics, and the software program can present robot forms simulating biological behaviors or ideas to a user after being executed. The simulation robot may be a simulated robot simulating a real person, such as a simulated robot resembling a real person built according to the form of the user himself or other natural persons, or a simulated robot having an animation effect, such as a simulated robot having an animal form or a cartoon character form.
In some embodiments, as shown in fig. 1, after acquiring reply information corresponding to the information input by the user, the smart terminal 301 may display a simulated robot image corresponding to the reply information on a display screen of the smart terminal 301 or other image output device connected thereto. As an implementation manner, while the simulated robot image is played, the audio corresponding to the simulated robot image may be played through a speaker of the intelligent terminal 301 or other audio output devices connected thereto, and the text or the graphic corresponding to the reply information may be displayed on the display screen of the intelligent terminal 301, so that multi-state interaction with the user in multiple aspects of image, voice, text, and the like is realized.
The above application environments are only examples for facilitating understanding, and it is to be understood that the embodiments of the present application are not limited to the above application environments.
The interaction method, the interaction device, the electronic device, and the storage medium provided by the embodiments of the present application are described in detail below with specific embodiments.
To facilitate understanding of the interaction method, the present application first provides an interaction system, please refer to fig. 2, the interaction system includes: the interactive client 110, the client server 120, the electronic device 130 and the query server 140 are sequentially in communication connection, the interactive client 110, the client server 120, the electronic device 130 and the query server 140 send information to the electronic device 130 through the client server 120, the electronic device 130 converts the information and sends the information to the query server 140, and the information fed back by the query server 140 is converted and then forwarded to the interactive client 110 through the client server 120 for interaction.
Fig. 3 is a schematic flowchart illustrating an interaction method according to an embodiment of the present application, where when communication protocols of an interaction client and a query server are different, the protocol is converted by an electronic device, that is, data sent by the interaction client is converted into data corresponding to the communication protocol of a query service area, and then forwarded to the query server; similarly, the data sent by the query server is converted into the data corresponding to the communication protocol of the interactive client, and then the data is forwarded to the interactive client, so that the data communication between the interactive client and the query server is realized. In a specific embodiment, the interaction method is applied to the electronic device 130 shown in fig. 2, the interaction apparatus 200 shown in fig. 11, and the electronic device 130 configured with the interaction apparatus 200 shown in fig. 12. The present embodiment will describe a specific flow of the present embodiment by taking an example in which the node networking method is applied to the electronic device 130 shown in fig. 2. As will be described in detail with respect to the flow shown in fig. 3, the interaction method may specifically include the following steps:
step S110, the interactive request sent by the interactive client is obtained as a first interactive request.
The communication Protocol corresponding to the interactive client is a first communication Protocol, an interactive request is generated based on an input operation of a user, the electronic device may provide an Application Programming Interface (API), the interactive client sends the interactive request corresponding to the first communication Protocol to the electronic device through the API, and the electronic device takes the received interactive request sent by the interactive client as the first interactive request, where the first communication Protocol may be, but is not limited to, a Transmission Control Protocol (TCP/IP), a Hypertext Transfer Protocol (HTTP), an rpc (remote Procedure Call Protocol), etc., the interactive request carries identity information, request information, and other information of the user, and the other information may include political terms, salutation, etc.
The electronic equipment can directly establish communication connection with the interactive client, and the interactive client directly sends the interactive request to the electronic equipment. Or as shown in fig. 2, a communication connection is established between the client server 120 and the interactive client, and the interactive client forwards the interactive request to the electronic device through the client server 120, for example, when the interactive client is certain shopping software, the client server 120 is a server corresponding to the certain shopping software, and when the interactive client is certain bank software, the client server 120 is a server corresponding to the certain bank software.
In one embodiment, the interactive client may be an electronic device installed in a user's own electronic device, for example, the electronic device may include a smart phone, a tablet computer, a desktop computer, and the like, the user logs in application software through a pre-registered account and a password, performs an input operation on the application software by means of a voice input mode, a keyboard input mode, a touch screen input mode, and the like, and generates an interactive request based on the input operation, for example, when the user uses shopping software, the user sends an interactive request "parent, your good, and asks for what material the one-piece dress is, the interactive request may be a voice, a text, a picture, a symbol, a commodity link, and the like, where the request information carried by the interactive request includes client Identity information, query information, other information, and the like, the client Identity information may be account information, an electronic device Identity (Identity document, ID for short), SIM card number, etc., the query information is "one-piece dress" and "material", and the other information is the polite wording "you good" and call "parent".
In another embodiment, the interactive client may be installed in a public device, for example, the public device may be an autonomous server device placed in a business hall, a bank, a mall hall, or a company foreground, or may also be an ATM of a bank, taking the ATM of a bank as an example, after the user inserts a bank card into the ATM, the identity information of the client carried in the interactive request may be a card number of the bank card, and the request information is a balance of the user.
Step S120, converting the first interactive request into a second interactive request, and sending the second interactive request to the query server, wherein a network transmission protocol corresponding to the first interactive request is different from a network transmission protocol corresponding to the second interactive request.
The communication protocol corresponding to the query server is the second communication protocol, and the interactive client of the first communication protocol cannot directly communicate with the query server of the second communication protocol, so that the electronic device converts the first interactive request into the second interactive request through protocol conversion. The second communication protocol may be, but is not limited to, a TCP/IP protocol, an HTTP protocol, an RPC protocol, and the like.
The communication protocol stipulates a receiving and sending sequence of data information carried in the interactive request. Different communication protocols agree on different transceiving sequences. Obviously, in this embodiment, the agreed sequences between the first communication protocol and the second communication protocol are different, and the first interaction request corresponding to the first communication protocol is converted according to the agreed sequence of the second communication protocol, so as to obtain the second interaction request corresponding to the second communication protocol. Specifically, a correspondence between a transceiving sequence of the first communication protocol and a transceiving sequence of the second communication protocol is pre-established as a protocol conversion mapping relationship, and the second interactive request corresponding to the first interactive request is obtained based on the protocol conversion mapping relationship. It can be understood that the data information carried by the first interactive request and the data information carried by the second interactive request have different sequences, and after sequence conversion, the first interactive request that can be understood by the interactive client is converted into the second interactive request that can be understood by the query server.
It should be noted that the first communication protocol is different from the second communication protocol, for example, when the first communication protocol of the interactive client is a TCP/IP protocol, the second communication protocol of the query server may be an HTTP protocol or an RPC protocol; for another example, when the first communication protocol of the interactive client is the HTTP protocol, the second communication protocol of the query server may be the TCP/IP protocol or the RPC protocol.
Optionally, in order to protect the privacy of the user, privacy processing may be performed on information such as user identity information, a user address, a user contact address, and the like, for example, when the user gives a bad comment on a certain commodity on certain shopping software, in order to prevent a store from harassing the user, when the user or the store initiates a session based on a link or purchase information of the commodity, after privacy processing is performed on a user contact phone 1234567899, 123 × 899 is obtained, or the user contact phone 1234567899 is converted into other letters or characters, such as ABCDef gHiJ, to prevent other contact addresses of the user from being revealed.
Step S130, obtaining the interaction information fed back by the query server in response to the second interaction request as the first interaction information.
And after receiving the second interaction request, the query server acquires information carried by the second interaction request, acquires interaction information corresponding to the information carried by the second interaction request from a database in the query server, wherein the interaction information is generated when the query server is under a second communication protocol and is fed back to the electronic equipment, and the electronic equipment takes the interaction information as the second interaction information.
For example, the first interaction information is "balance in trouble inquiry card", the second interaction request carries information "balance" and a card number of a bank card inserted or input by a user, and the balance 8000 yuan of the bank card is acquired from a database of the inquiry server.
For another example, the interactive information is "material of the one-piece dress", the information carried by the second interactive request is a picture or a commodity link input by the user, and "material", and the second interactive information is generated based on the information, and may be introduction information or video of the material.
Step S140, converting the first interaction information into second interaction information, and sending the second interaction information as interaction output information to the interaction client, so as to instruct the interaction client to output the interaction output information.
The network transmission protocol corresponding to the second interactive information is the same as the network transmission protocol corresponding to the first interactive request, and the network transmission protocol corresponding to the first interactive information is the same as the network transmission protocol corresponding to the second interactive request.
Optionally, the API interface provided by the electronic device converts the first interaction information into the second interaction information, and sends the second interaction information to the client as interaction output information to instruct a client robot of the client to output the interaction output information, for example, to obtain facial expression parameters of the client robot corresponding to the interaction output information, drive the client robot to change facial expressions according to the facial expression parameters, and output audio carried by the interaction output information in cooperation with the facial expression changes, where the facial expression parameters include mouth shape change parameters, blink parameters, and the like.
The interaction method provided by the embodiment is applied to electronic equipment, the electronic equipment is connected with an interaction client and a query server, and an interaction request sent by the interaction client is firstly acquired as a first interaction request; secondly, converting the first interactive request into a second interactive request, and sending the second interactive request to the query server, wherein the network transmission protocol corresponding to the first interactive request is different from the network transmission protocol corresponding to the second interactive request; then, acquiring interactive information fed back by the query server in response to the second interactive request as first interactive information; and converting the first interactive information into second interactive information, and sending the second interactive information as interactive output information to the interactive client to indicate the interactive client to output the interactive output information, wherein a network transmission protocol corresponding to the second interactive information is the same as a network transmission protocol corresponding to the first interactive request, a network transmission protocol corresponding to the first interactive information is the same as a network transmission protocol corresponding to the second interactive request, and when the interactive client and the query server have different communication protocols, the protocol conversion is performed through the electronic equipment, so that data interaction can be performed on information between the interactive client and the query server, and communication between equipment with different protocols is realized.
Optionally, on the basis of the foregoing embodiment, the present application provides an interaction method, configured to determine, when the number of query servers is multiple, a target query server corresponding to an interaction request from the multiple query servers, so as to improve interaction efficiency, where fig. 4 shows a flowchart of an interaction method provided in another embodiment of the present application, and please refer to fig. 4, where the interaction method specifically includes the following steps:
step S210, obtaining the interaction request sent by the interaction client as a first interaction request.
For detailed description of step S210, please refer to step S110, which is not described herein again.
Step S220, obtaining a target query server corresponding to the first interaction request from a plurality of query servers.
The API interface provided by the electronic equipment is connected with a plurality of query servers, for example, the query servers comprise bank servers, shopping software servers and the like, when the electronic equipment receives a first interaction request of an interaction client, a target query server corresponding to the first interaction request is obtained from the plurality of query servers,
in an embodiment, an ID number of an interactive client carried by the first interactive request determines a target query server corresponding to the interactive client according to the ID number of the interactive client, for example, the device is determined to be a device of a certain bank according to the ID number of the interactive client, and the server of the bank is determined to be the target query server among the plurality of query servers.
In yet another embodiment, the first interaction request carries a version number of application software that a user logs in on the interaction client, and in the plurality of query servers, a server corresponding to the application software is determined as a target query server according to the version number, for example, an a server corresponding to the a software is determined as a target query server according to a certain version number of A3.3.0104.
In another embodiment, the server corresponding to the user account information is determined to be the target query server, for example, if the account information is a WeChat account, the server corresponding to the WeChat is determined to be the target query server.
Step S230, based on the network transmission protocol corresponding to the target query server, converting the first interaction request into the second interaction request, and sending the second interaction request to the target query server.
And based on the network transmission protocol corresponding to the target query server, converting the first interaction request into a second interaction request, wherein the first interaction request is a request transmitted under the network transmission protocol corresponding to the interaction client, and the second interaction request is a request transmitted under the network transmission protocol corresponding to the target query server, and transmitting the second interaction request to the target query server through the network transmission protocol corresponding to the target query server.
It should be noted that, when the network communication protocols corresponding to a part of the query servers are the same as the network communication protocol corresponding to the interactive client, and the network communication protocols corresponding to another part of the query servers are the same as the network communication protocol corresponding to the interactive client, when the network communication protocol corresponding to the target query server is different from the network communication protocol corresponding to the interactive client, the above-mentioned conversion step needs to be executed, and when the network communication protocol corresponding to the target query server is the same as the network communication protocol corresponding to the interactive client, the first interaction request of the interactive client may be directly sent to the target query server for communication through the electronic device.
Step S240, obtaining the interaction information fed back by the query server in response to the second interaction request as the first interaction information.
Step S250, converting the first interaction information into second interaction information, and sending the second interaction information as interaction output information to the interaction client to instruct the interaction client to output the interaction output information, wherein a network transmission protocol corresponding to the second interaction information is the same as a network transmission protocol corresponding to the first interaction request, and a network transmission protocol corresponding to the first interaction information is the same as a network transmission protocol corresponding to the second interaction request.
For detailed description of steps S240 to S250, please refer to steps S130 to S140, which are not described herein again.
In the interaction method provided by the embodiment, the electronic device is connected with the plurality of query servers, when a first interaction request is received, a target server corresponding to the first interaction request is obtained from the plurality of query servers, the first interaction request is converted into a second interaction request based on a network transmission protocol corresponding to the target query server, and the second interaction request is sent to the target query server, so that communication between the electronic device and the target query server is realized quickly, and the interaction efficiency is improved.
Optionally, on the basis of the foregoing embodiment, this embodiment provides an interaction method, when network communication protocols of an electronic device, an interaction client, and a query server are all different, and when the electronic device receives communication data of the interaction client and the query server, protocol conversion is required to be performed, fig. 5 shows a flowchart of an interaction method provided in another embodiment of the present application, please refer to fig. 5, where the interaction method specifically includes the following steps:
step S310, the interactive request sent by the interactive client is obtained as a first interactive request.
For detailed description of step S310, please refer to step S110, which is not described herein again.
Step S320, converting the first interactive request into a third interactive request, where a network transmission protocol corresponding to the first interactive request is different from a network transmission protocol corresponding to the third interactive request.
The interactive client operates under a first network transmission protocol, the electronic device operates under a third network transmission protocol, and when the interactive client communicates with the electronic device, protocol conversion is required. It is understood that the third interactive request is a sequence that can be understood by the electronic device.
Step S330, obtaining the target query server corresponding to the third interaction request from the plurality of query servers.
For the detailed description of step S330, please refer to step S220, which is not described herein again.
Step S340, converting the first interaction request into the second interaction request based on the network transmission protocol corresponding to the target query server, and sending the second interaction request to the target query server.
For detailed description of step S340, please refer to step S230, which is not described herein.
Step S350, obtaining the interaction information fed back by the target query server in response to the second interaction request as the first interaction information.
When the number of the interactive clients is multiple, in order to ensure the efficiency of communication between the interactive clients and the query server, the interactive information fed back by the target server needs to be forwarded to the target interactive client. In one embodiment, the electronic device converts the first interaction information into third interaction information, where the third interaction information corresponds to a third network transmission protocol, that is, the third interaction information is understandable by the electronic device; the electronic equipment acquires the ID number of the interactive client carried by the third interactive information; and determining a target interactive client according to the ID number of the interactive client in the plurality of interactive clients.
Step S360, converting the first interaction information into second interaction information, and sending the second interaction information to the interaction client as interaction output information to instruct the interaction client to output the interaction output information, wherein the network transmission protocol corresponding to the second interaction information is the same as the network transmission protocol corresponding to the first interaction request, and the network transmission protocol corresponding to the first interaction information is the same as the network transmission protocol corresponding to the second interaction request.
The electronic equipment determines a target interactive client according to the ID number of the interactive client, and in one implementation mode, based on a network communication protocol of the target interactive client, converts first interactive information into second interactive information, wherein the second interactive information is information which can be understood by the target interactive client.
In another embodiment, since the communication data carried by the first interactive information and the third interactive information are the same, the third interactive information is converted into the second interactive information based on the network communication protocol of the target interactive client.
For the detailed description of steps S350 to S360, please refer to steps S130 to S140, which are not described herein again.
In the interaction method provided in this embodiment, the electronic device obtains an interaction request sent by an interaction client as a first interaction request, because a network communication protocol corresponding to the electronic device is different from a network communication protocol corresponding to the interaction client, the electronic device cannot directly obtain communication data from the first interaction request, so that the first interaction request is converted into a third interaction request based on the network communication protocol corresponding to the electronic device, the electronic device can read data from the third interaction request, and a target query server corresponding to the third interaction request is obtained in the plurality of query servers, because the network communication protocol corresponding to the electronic device is different from the network communication protocol corresponding to the target query server, the target query server cannot directly read data from the third interaction request, and therefore, based on the network communication protocol corresponding to the target query server, and converting the third interactive request into a second interactive request, and sending the second interactive request to the target query server to ensure the normal operation of the communication between the interactive client and the target query server.
Optionally, fig. 6 shows a schematic flow chart of an interaction method provided in another embodiment of the present application, please refer to fig. 6, where the interaction method specifically includes the following steps:
step S410, the interactive request sent by the interactive client is obtained as a first interactive request.
Step S420, converting the first interaction request into a second interaction request, and sending the second interaction request to the query server, where a network transport protocol corresponding to the first interaction request is different from a network transport protocol corresponding to the second interaction request.
Step S430, obtaining the interaction information fed back by the query server in response to the second interaction request as the first interaction information, and converting the first interaction information into the second interaction information.
For detailed description of steps S410 to S430, please refer to steps S110 to S130, which are not described herein again.
And step S440, acquiring request information carried by the first interactive request.
The electronic equipment acquires request information carried by the first interactive request, and specifically, if a network communication protocol corresponding to the electronic equipment is the same as a network communication protocol corresponding to the interactive client, the electronic equipment can directly acquire the request information from the first interactive request; if the network communication protocol corresponding to the electronic device is different from the network communication protocol corresponding to the interactive client, the electronic device cannot directly acquire the request information from the first interactive request, and the first interactive request needs to be converted into an interactive request corresponding to the network communication protocol used by the electronic device, and then the request information is acquired based on the interactive request.
Step S450, obtaining third interaction information corresponding to the request information, where a network transmission protocol corresponding to the third interaction information is the same as a network transmission protocol corresponding to the first interaction request.
Interactive information corresponding to the request information is prestored in the electronic equipment, the electronic equipment can directly obtain the interactive information corresponding to the request information from local, and if a network communication protocol corresponding to the electronic equipment is the same as a network communication protocol corresponding to the interactive client, the interactive information is directly used as third interactive information; and if the network communication protocol corresponding to the electronic equipment is different from the network communication protocol corresponding to the interactive client, converting the interactive information into third interactive information corresponding to the network communication protocol of the interactive client.
Step S460, sending the second interaction information and the third interaction information to the interaction client as the interaction output information.
The communication protocols corresponding to the second interactive information and the third interactive information are the same as the network communication protocol corresponding to the interactive client, that is, the second interactive information and the third interactive information are sent to the interactive client as interactive output information.
It should be noted that the second interaction information is fed back by the query server based on the interaction request, the third interaction information is fed back by the electronic device based on the interaction request, and the feedback sequence of the query server and the electronic device is not sequential, so the sequence of step S420-step S430 and the sequence of step S440-step S450 may be exchanged, that is, step S440-step S450 may be executed first, and then step S420-step S430 are executed.
In the interaction method provided by this embodiment, an interaction client sends a first interaction request to an electronic device, the electronic device converts the first interaction request into a second interaction request that a query server can obtain data, sends the second interaction request to the query server, obtains first interaction information fed back by the query server in response to the second interaction request, converts the first interaction information into second interaction information, obtains request information carried by the first interaction request and third interaction information corresponding to the request information, feeds back the second interaction information and the third interaction information as interaction output information to an interaction client, and the electronic device and the query server simultaneously feed back the interaction request, so that the interaction output information can be quickly output, and the interaction efficiency is improved.
Optionally, the number of the requested information includes a plurality of privacy levels, where the privacy levels include a first privacy level and a second privacy level, and the first privacy level is higher than the second privacy level, fig. 7 shows a flowchart of an interaction method provided in yet another embodiment of the present application, and please refer to fig. 7, where the interaction method specifically includes the following steps:
step S510, obtaining the interaction request sent by the interaction client as a first interaction request.
Step S520, converting the first interaction request into a second interaction request, and sending the second interaction request to the query server, where a network transport protocol corresponding to the first interaction request is different from a network transport protocol corresponding to the second interaction request.
For the detailed description of steps S510 to S520, refer to steps S110 to S120, which are not described herein again.
Step S530, obtaining interaction information fed back by the query server in response to the request information with the first privacy level in the multiple request information as first interaction information, and converting the first interaction information into second interaction information, where the multiple request information is obtained by the query server from the second interaction request.
The first interactive request carries a plurality of request information, the format of the first interactive request is different from that of the second interactive request, but the request information carried by the first interactive request and the format of the second interactive request are the same, so the second interactive request also carries a plurality of request information, the query server obtains the plurality of request information carried by the second request information, obtains the interactive information fed back by the request information with the privacy level of the first privacy level in the plurality of request information as the first interactive information, specifically, the query server obtains the privacy levels corresponding to the plurality of request information, the privacy levels comprise the first privacy level and the second privacy level, the first privacy level is higher than the second privacy level, and the query server stores information with higher privacy levels, so the query server responds to the interactive information fed back by the request information with the privacy level of the first privacy level in the plurality of request information as the first interactive information, and sending the first interaction information to the electronic equipment.
The plurality of request messages include identity information, query information, other information and the like, the identity information of the client can be account information, ID, SIM card number and the like, the query information is 'one-piece dress', 'jeans coat', 'how much money', 'material', 'balance' and the like, the other messages include political terms 'you good', 'afternoon good' and the like, and the other messages further include called 'parent', 'respectful client' and the like.
For example, the content input by the user is "hello, the balance in the card is troubled to check", the obtained multiple pieces of request information include the identity of the client (the read bank card number of the bank card of the user), query information (balance), polite terms (hello), and the privacy level of the request information is obtained, the request information of the first privacy level is the "bank card number" and the "balance", and the request information of the second privacy level is the "hello". After the inquiry server inquires the balance corresponding to the bank card number, the fed back first interactive information is 'the balance is 500 yuan'.
Step S540, obtaining a plurality of request information carried by the second interactive request, and obtaining a privacy level corresponding to each request information in the plurality of request information.
The electronic equipment acquires a plurality of request information carried by the second interactive request, and if the network communication protocol corresponding to the electronic equipment is the same as the network communication protocol corresponding to the query server, the electronic equipment directly acquires the plurality of request information from the second interactive request; and if the network communication protocol corresponding to the electronic equipment is different from the network communication protocol corresponding to the query server, converting the second interaction request into interaction information corresponding to the communication protocol of the electronic equipment, and acquiring a plurality of request information from the interaction information.
Optionally, the multiple pieces of interaction information carried by the first interaction request are the same as the multiple pieces of interaction information carried by the second interaction request, and therefore, the electronic device may also obtain the multiple pieces of request information through the first interaction information.
Step S550, obtaining, from the local electronic device, third interaction information corresponding to the request information with the privacy level of the second privacy level in the plurality of request information.
Continuing with the above example, the request information of the first privacy level is the "bank card number" and the "balance", the request information of the second privacy level is the "hello", and the electronic device responds to the "hello" to obtain the third interactive information "hello".
Step S560, sending the second interaction information and the third interaction information as the interaction output information to the interaction client.
And sending the second interactive information and the third interactive information as the interactive output information to the interactive client, wherein the interactive client can interactively output in the forms of characters, voice, robot voice output and the like according to the third interactive information, and by continuing combining the above example, the balance of the first interactive information is 500 yuan, the balance of the third interactive information is hello, the obtained interactive output information is 'hello', and the balance in the card is 500 yuan.
In the embodiment, the electronic device and the query server simultaneously feed back the interaction request, interaction output information can be rapidly output, interaction efficiency is improved, the query server feeds back the request information with high privacy level, the electronic device feeds back the request information with low privacy level, and safety of the information with high privacy level in the server is guaranteed.
Optionally, fig. 8 shows a schematic flow chart of an interaction method provided by yet another embodiment of the present application, please refer to fig. 8, where the interaction method specifically includes the following steps:
step S610, acquiring the interaction request sent by the interaction client as a first interaction request.
Step S620, converting the first interactive request into a second interactive request, and sending the second interactive request to the query server.
Step S630, obtaining the interaction information fed back by the query server in response to the request information with the privacy level being the first privacy level in the plurality of request information as the first interaction information, and converting the first interaction information into the second interaction information.
Step S640, obtaining a plurality of request information carried by the second interactive request, and obtaining a privacy level corresponding to each request information in the plurality of request information.
For the detailed description of steps S610 to S640, refer to steps S510 to S540, which are not described herein again.
Step S650, obtaining a plurality of intermediate interactive outputs corresponding to request information with a second privacy level from the plurality of interactive response information of the core service system.
Illustratively, referring to FIG. 8, the electronic device 130 includes a business system 133-1, a Kafka log system 133-2, and an adapter 133-3 (adapter). Business system 133-1 is connected to Kafka log system 133-2 and adapter 133-3 (adapters), respectively.
The Kafka log system 133-2 is used to store interaction requests and interaction information.
The business system 133-1 includes a knowledge graph, a Bot-online computation module (robot online computation module), and a Bot-offline computation module (robot offline computation module). Wherein the knowledge-graph comprises: the system comprises a volume module Container, an entity service module inventory-server, a Data service module Data-server and an Annotation service module Annotation-server. The Bot-online computation module includes: the system comprises a session management module SMU (Session Manager Unit), a storage Model module PMU (predict Model Unit), an identification module QRM (query ReWrite), a recommendation module SmartBox, a loading module RBU (root Broker Unit), an index module Indexd, a vector index Faiss-Seacher and a vector storage module PMU-Faiss. The Bot-offline calculation module comprises: the system comprises a background Data release module DSU, a supply module Bmaster, a vector creation module Faiss-Builder, a special word pushing module Data-Proxy, a Data Center module Data-Center and a Data processing module Data-Processors. The QRM is used for word segmentation, entity identification and the like; the special word pushing module Data-Proxy is used for pushing, pulling and the like of the special words; the background data release module DSU is used for word slot release, front-end and back-end data consistency check and the like; the index module Indexd is used for storing index data, and the supply module Bmaster is used for providing soft load and routing for each component of online computation.
Adaptor133-3 (adapter) is used to provide API interfaces for interactive clients and query servers, Kafka log system 133-2 is used to store logs,
the received information sent by the interactive client and/or the query server is stored in the Kafka log system 133-2 through an API interface provided by the Adaptor 133-3. When the core business system comprises an online mode, a plurality of intermediate interactive outputs corresponding to request information with the privacy level of the second privacy level in a plurality of request information are obtained from a Bot online computing module of the Adaptor133-3, which is equivalent to a robot customer service, and interactive outputs are performed through interactive information pre-stored by the Bot online computing module. When the core service system comprises an offline mode, a plurality of intermediate interactive outputs corresponding to request information with the privacy level of the second privacy level in a plurality of request information are obtained from a Bot offline calculation module of the Adaptor133-3, which is equivalent to an artificial customer service, based on an interactive request input by an interactive client, the artificial customer service inputs interactive information through input equipment such as a keyboard, a display screen and the like, stores the interactive information in the Bot offline calculation module, and then obtains the interactive information from the Bot offline calculation module for output.
Step S660, in the plurality of intermediate interactive outputs, taking the intermediate interactive output corresponding to the user identity information as the third interactive output.
Optionally, the user identity information may be second privacy level information, and the third interaction output is output from the plurality of intermediate interaction outputs according to the user identity information.
For example, when the second privacy level information further includes "hello", the corresponding plurality of intermediate interaction outputs are "hello", and the user's identity information is a member, then a second interaction output "hello" corresponding to the member is output from the plurality of intermediate interaction outputs.
For another example, when the second privacy level information further includes "hello", the first effect, the second effect, and the third effect correspond to each other, and when the identity information of the user is a member, the first effect corresponding to the member may be output, and it should be noted that both the second effect and the third effect are available to the user of the member, and may be output according to the input of the user of the member.
Step S670, sending the second interaction information and the third interaction information as the interaction output information to the interaction client.
For detailed description of step S670, please refer to step S560, which is not described herein again.
In the embodiment, the electronic device and the query server simultaneously feed back the interaction request, so that interaction output information can be rapidly output, and interaction efficiency is improved.
Optionally, with continuing reference to fig. 9, the electronic device includes a kafka log system 133-2, fig. 10 is a schematic flow chart of an interaction method according to another embodiment of the present application, and referring to fig. 10, the interaction method may specifically include the following steps:
step S710, acquiring the interaction request sent by the interaction client as a first interaction request.
Step S720, converting the first interactive request into a second interactive request, and sending the second interactive request to the query server.
Step S730, obtaining the interaction information fed back by the query server in response to the second interaction request as the first interaction information.
Step S740, converting the first interaction information into second interaction information, and sending the second interaction information as interaction output information to the interaction client, so as to instruct the interaction client to output the interaction output information.
For the detailed description of steps S110 to S140, refer to steps S710 to S740, which are not described herein again.
Step S750, the second interaction request and the first interaction information are bound to obtain binding information.
And step S760, storing the binding information in the kafka log system.
The binding information is stored in the kafka log system, so that a user can conveniently check the interaction condition of the interaction client and the query server at any time. Optionally, the interaction information may further carry an electronic device, and when the user wants to query the interaction condition at a time when the electronic device receives the second interaction request and the first interaction information respectively, the query time is input to obtain the first interaction request and the first interaction information.
In this embodiment, the second interaction request is bound to the first interaction information to obtain binding information, and the binding information is stored in the kafka log system, so that the interaction condition can be conveniently checked at any time.
To implement the above method embodiment, this embodiment provides an interaction apparatus, which is applied to an electronic device, where the electronic device is used to connect with an interaction client and a query server, respectively, and fig. 11 shows a block diagram of the interaction apparatus provided in this embodiment of the present application, and referring to fig. 11, an interaction apparatus 200 includes: an acquisition module 210, a first conversion module 220, a response module 230, and a second conversion module 240.
An obtaining module 210, configured to obtain an interaction request sent by the interaction client as a first interaction request;
a first conversion module 220, configured to convert the first interaction request into a second interaction request, and send the second interaction request to the query server, where a network transport protocol corresponding to the first interaction request is different from a network transport protocol corresponding to the second interaction request;
a response module 230, configured to obtain interaction information fed back by the query server in response to the second interaction request, where the interaction information is used as first interaction information;
a second conversion module 240, configured to convert the first interaction information into second interaction information, and send the second interaction information to the interaction client as interaction output information to instruct the interaction client to output the interaction output information, where a network transmission protocol corresponding to the second interaction information is the same as a network transmission protocol corresponding to the first interaction request, and a network transmission protocol corresponding to the first interaction information is the same as a network transmission protocol corresponding to the second interaction request.
Optionally, the number of the query servers is multiple, and the first conversion module 220: and the target query server acquisition module is connected with the target query server connection module.
The target query server acquisition module is used for acquiring a target query server corresponding to the first interaction request from a plurality of query servers;
and the target query server connection module is used for converting the first interaction request into the second interaction request based on a network transmission protocol corresponding to the target query server and sending the second interaction request to the target query server.
Optionally, the target query server obtaining module includes: a third conversion module and a request sending module.
A third conversion module, configured to convert the first interaction request into a third interaction request, where a network transport protocol corresponding to the first interaction request is different from a network transport protocol corresponding to the third interaction request;
and the request sending module is used for acquiring the target query server corresponding to the third interactive request from the plurality of query servers.
Optionally, the second conversion module 240 comprises: the device comprises a request information acquisition module, an interactive information acquisition module and an output module.
A request information obtaining module, configured to obtain request information carried by the first interaction request;
the interactive information acquisition module is used for acquiring third interactive information corresponding to the request information, wherein a network transmission protocol corresponding to the third interactive information is the same as a network transmission protocol corresponding to the first interactive request;
and the output module is used for sending the second interaction information and the third interaction information as the interaction output information to the interaction client.
Optionally, the number of the request messages includes a plurality, and the response module 230 includes: the system comprises a privacy level acquisition module and an interactive information response module.
The privacy level acquisition module is used for acquiring the privacy level corresponding to each request message in a plurality of request messages, wherein the privacy level comprises a first privacy level;
and the interactive information response module is used for acquiring interactive information fed back by the inquiry server in response to the request information with the privacy level being the first privacy level in the plurality of request information as first interactive information.
Optionally, the privacy levels further include a second privacy level, the first privacy level is higher than the second privacy level, and the interaction information obtaining module includes: and the local interaction information acquisition module.
And the local interaction module is used for locally acquiring third interaction information corresponding to the request information with the privacy level of the second privacy level in the plurality of request information from the electronic equipment.
Optionally, the electronic device includes a core service system, the core service system is configured to store a plurality of interactive response messages, the first interactive request carries user identity information, and the local interaction module includes: the device comprises an intermediate interaction output module and a local interaction information acquisition module.
The intermediate interaction output module is used for acquiring a plurality of intermediate interaction outputs corresponding to request information with a privacy level being a second privacy level in the plurality of request information from the plurality of interaction response information of the core service system;
and the local interaction information acquisition module is used for taking the intermediate interaction output corresponding to the user identity information as the third interaction output in the plurality of intermediate interaction outputs.
Optionally, the core service system includes an online mode, and the intermediate interaction output module includes: and an online output module.
And the online output module is used for acquiring a plurality of intermediate interactive outputs corresponding to request information with a privacy level being a second privacy level in the plurality of request information from the plurality of interactive response information of the core service system when the core service system is in the online mode.
The core service system further includes an offline mode, and the interaction apparatus 200 further includes: and an offline output module.
And the offline output module is used for acquiring the updated interactive response information when the core service system is in the offline mode, and storing the updated interactive response information in the core service system.
Optionally, the electronic device is configured to connect to a client server, and the obtaining module includes: and an interactive request acquisition module.
And the interactive request acquisition module is used for acquiring the interactive request sent by the interactive client and received by the client server as a first interactive request.
Optionally, the second conversion module 240 comprises: and a robot interaction module.
And the robot interaction module is used for sending the second interaction information as interaction output information to the client so as to instruct a client robot of the client to output the interaction output information.
Optionally, the electronic device includes a kafka log system, and the interaction apparatus 200 further includes: the device comprises a binding module and a binding module.
The binding module is used for binding the second interaction request and the first interaction information to obtain binding information;
and the storage module is used for storing the binding information in the kafka log system.
Optionally, the electronic device includes an API interface, and the first conversion module 220 includes: and the API interface conversion module.
And the API interface conversion module is used for converting the first interactive request into the second interactive request by the API interface.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the modules/units/sub-units/components in the above-described apparatus may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Fig. 12 shows a block diagram of an electronic device for executing an interaction method according to an embodiment of the present application, please refer to fig. 12, which shows an electronic device provided by an embodiment of the present application, and the electronic device may include a processor 131, a communication module 132, a memory 133 and a bus. The bus may be an ISA bus, PCI bus, EISA bus, CAN bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. Wherein:
the memory 133 stores programs. In particular, the memory 133 may be used to store software programs as well as various data. The memory 133 may mainly include a program storage area and a data storage area, wherein the program storage area may store a program required to operate at least one function and may include a program code including computer operation instructions. In addition to storing programs, the memory 133 may temporarily store messages and the like that the communication module 132 needs to send. The memory 133 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory), such as at least one Solid State Disk (SSD).
The processor 131 is used to execute programs stored in the memory 133. The program when executed by a processor implements the steps of the interaction method of the embodiments described above.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the interaction methods in the embodiments, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium includes, for example, a Read-Only Memory (ROM), a Random Access Memory (RAM), an SSD, a charged Erasable Programmable Read-Only Memory (EEPROM), or a Flash Memory (Flash).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, SSD, Flash), and includes several instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the methods of the embodiments of the present application.
Fig. 13 shows a storage unit for storing or carrying program code for implementing an interaction method according to an embodiment of the present application, please refer to fig. 13, which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 400 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 400 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 400 includes a non-volatile computer-readable storage medium. The computer readable storage medium 400 has storage space for program code 410 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. Program code 410 may be compressed, for example, in a suitable form.
To sum up, the interaction method, the interaction device, the electronic device and the storage medium provided by the application are applied to the electronic device, the electronic device is connected with the interaction client and the query server, and firstly, the interaction request sent by the interaction client is obtained as a first interaction request; secondly, converting the first interactive request into a second interactive request, and sending the second interactive request to the query server, wherein the network transmission protocol corresponding to the first interactive request is different from the network transmission protocol corresponding to the second interactive request; then, acquiring interactive information fed back by the query server in response to the second interactive request as first interactive information; and converting the first interactive information into second interactive information, and sending the second interactive information as interactive output information to the interactive client to indicate the interactive client to output the interactive output information, wherein a network transmission protocol corresponding to the second interactive information is the same as a network transmission protocol corresponding to the first interactive request, a network transmission protocol corresponding to the first interactive information is the same as a network transmission protocol corresponding to the second interactive request, and when the interactive client and the query server have different communication protocols, the protocol conversion is performed through the electronic equipment, so that data interaction can be performed on information between the interactive client and the query server, and communication between equipment with different protocols is realized.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (16)

1. An interaction method is applied to an electronic device, wherein the electronic device is used for being respectively connected with an interaction client and a query server, and the method comprises the following steps:
acquiring an interactive request sent by the interactive client as a first interactive request;
converting the first interaction request into a second interaction request, and sending the second interaction request to the query server, wherein a network transmission protocol corresponding to the first interaction request is different from a network transmission protocol corresponding to the second interaction request;
acquiring interaction information fed back by the query server in response to the second interaction request as first interaction information;
and converting the first interaction information into second interaction information, and sending the second interaction information serving as interaction output information to the interaction client to indicate the interaction client to output the interaction output information, wherein a network transmission protocol corresponding to the second interaction information is the same as a network transmission protocol corresponding to the first interaction request, and a network transmission protocol corresponding to the first interaction information is the same as a network transmission protocol corresponding to the second interaction request.
2. The method of claim 1, wherein the query server is plural in number, and wherein converting the first interactive request into a second interactive request and sending the second interactive request to the query server comprises:
acquiring a target query server corresponding to the first interaction request from a plurality of query servers;
and converting the first interaction request into the second interaction request based on a network transmission protocol corresponding to the target query server, and sending the second interaction request to the target query server.
3. The method according to claim 2, wherein the obtaining, among the plurality of query servers, a target query server corresponding to the first interactive request comprises:
converting the first interactive request into a third interactive request, wherein a network transmission protocol corresponding to the first interactive request is different from a network transmission protocol corresponding to the third interactive request;
and acquiring the target query server corresponding to the third interactive request from the plurality of query servers.
4. The method according to claim 1, wherein the converting the first interaction information into second interaction information and sending the second interaction information as interaction output information to the interaction client comprises:
acquiring request information carried by the first interactive request;
acquiring third interaction information corresponding to the request information, wherein a network transmission protocol corresponding to the third interaction information is the same as a network transmission protocol corresponding to the first interaction request;
and sending the second interaction information and the third interaction information as the interaction output information to the interaction client.
5. The method according to claim 4, wherein the number of the request messages includes a plurality of request messages, and the obtaining the interaction message fed back by the query server in response to the second interaction request as the first interaction message includes:
the method comprises the steps of obtaining privacy levels corresponding to each request message in a plurality of request messages, wherein the privacy levels comprise a first privacy level;
and acquiring interactive information fed back by the inquiry server in response to the request information with the privacy level being the first privacy level in the plurality of request information as first interactive information.
6. The method of claim 5, wherein the privacy levels further include a second privacy level, wherein the first privacy level is higher than the second privacy level, and wherein the obtaining third interactive information corresponding to the request information comprises:
and acquiring third interactive information corresponding to the request information with the privacy level of the second privacy level in the plurality of request information from the local electronic equipment.
7. The method according to claim 6, wherein the electronic device includes a core service system, the core service system is configured to store a plurality of interactive response messages, the first interactive request carries user identity information, and the obtaining, from the local electronic device, the interactive information corresponding to the request message with the privacy level of the second privacy level in the plurality of request messages as third interactive information includes:
obtaining a plurality of intermediate interactive outputs corresponding to request information with a privacy level of a second privacy level in the plurality of request information from the plurality of interactive response information of the core service system;
and in the plurality of intermediate interactive outputs, taking the intermediate interactive output corresponding to the user identity information as the third interactive output.
8. The method of claim 7, wherein the core service system includes an online mode, and the obtaining, from the interactive response messages of the core service system, the intermediate interactive outputs corresponding to the request messages with the second privacy level in the request messages includes:
and when the core service system is in the online mode, acquiring the intermediate interactive outputs corresponding to the request information with the privacy level being the second privacy level in the request information from the interactive response information of the core service system.
9. The method of claim 8, wherein the core service system further comprises an offline mode, and wherein the method further comprises:
and when the core service system is in the off-line mode, acquiring updated interactive response information, and storing the updated interactive response information in the core service system.
10. The method of claim 1, wherein the electronic device is configured to connect to a client server, and the obtaining the interaction request sent by the interaction client as a first interaction request comprises:
and acquiring the interactive request sent by the interactive client and received by the client server as a first interactive request.
11. The method according to any one of claims 1 to 10, wherein the sending the second interaction information to the interaction client as interaction output information to instruct the interaction client to output the interaction output information comprises:
and sending the second interaction information as interaction output information to the client so as to instruct a client robot of the client to output the interaction output information.
12. The method of any of claims 1-10, wherein the electronic device comprises a kafka log system, the method further comprising:
binding the second interaction request with the first interaction information to obtain binding information;
and storing the binding information in the kafka log system.
13. The method of any of claims 1-10, wherein the electronic device includes an API interface, and wherein translating the first interactive request into a second interactive request comprises:
and the API interface converts the first interactive request into the second interactive request.
14. An interaction device applied to an electronic device, the electronic device being configured to be connected to an interaction client and a query server, respectively, the device comprising:
the acquisition module is used for acquiring the interactive request sent by the interactive client as a first interactive request;
the first conversion module is used for converting the first interaction request into a second interaction request and sending the second interaction request to the query server, wherein a network transmission protocol corresponding to the first interaction request is different from a network transmission protocol corresponding to the second interaction request;
the response module is used for acquiring the interactive information fed back by the query server in response to the second interactive request as first interactive information;
and the second conversion module is used for converting the first interaction information into second interaction information and sending the second interaction information serving as interaction output information to the interaction client so as to indicate the interaction client to output the interaction output information, wherein a network transmission protocol corresponding to the second interaction information is the same as a network transmission protocol corresponding to the first interaction request, and a network transmission protocol corresponding to the first interaction information is the same as a network transmission protocol corresponding to the second interaction request.
15. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the method of any of claims 1-13.
16. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1-13.
CN202110871920.0A 2021-07-30 2021-07-30 Interaction method and device, electronic equipment and storage medium Active CN113542301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110871920.0A CN113542301B (en) 2021-07-30 2021-07-30 Interaction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110871920.0A CN113542301B (en) 2021-07-30 2021-07-30 Interaction method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113542301A true CN113542301A (en) 2021-10-22
CN113542301B CN113542301B (en) 2023-06-02

Family

ID=78121576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110871920.0A Active CN113542301B (en) 2021-07-30 2021-07-30 Interaction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113542301B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883678A (en) * 2023-03-08 2023-03-31 国网瑞嘉(天津)智能机器人有限公司 Data processing system, method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107979520A (en) * 2016-10-25 2018-05-01 腾讯科技(深圳)有限公司 Message treatment method and message processing apparatus
CN109739971A (en) * 2019-01-03 2019-05-10 浙江百应科技有限公司 A method of full duplex Intelligent voice dialog is realized based on wechat small routine
CN110413841A (en) * 2019-06-13 2019-11-05 深圳追一科技有限公司 Polymorphic exchange method, device, system, electronic equipment and storage medium
CN110427472A (en) * 2019-08-02 2019-11-08 深圳追一科技有限公司 The matched method, apparatus of intelligent customer service, terminal device and storage medium
CN112199064A (en) * 2020-10-14 2021-01-08 Vidaa美国公司 Interaction method of browser application and system platform and display equipment
CN112311774A (en) * 2020-10-16 2021-02-02 北京金山云网络技术有限公司 Data processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107979520A (en) * 2016-10-25 2018-05-01 腾讯科技(深圳)有限公司 Message treatment method and message processing apparatus
CN109739971A (en) * 2019-01-03 2019-05-10 浙江百应科技有限公司 A method of full duplex Intelligent voice dialog is realized based on wechat small routine
CN110413841A (en) * 2019-06-13 2019-11-05 深圳追一科技有限公司 Polymorphic exchange method, device, system, electronic equipment and storage medium
CN110427472A (en) * 2019-08-02 2019-11-08 深圳追一科技有限公司 The matched method, apparatus of intelligent customer service, terminal device and storage medium
CN112199064A (en) * 2020-10-14 2021-01-08 Vidaa美国公司 Interaction method of browser application and system platform and display equipment
CN112311774A (en) * 2020-10-16 2021-02-02 北京金山云网络技术有限公司 Data processing method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883678A (en) * 2023-03-08 2023-03-31 国网瑞嘉(天津)智能机器人有限公司 Data processing system, method, device, equipment and medium

Also Published As

Publication number Publication date
CN113542301B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN109039671B (en) Group message display method, device, terminal and storage medium
CN109760041B (en) Chat robot-based cloud management system and operation method thereof
JP7219296B2 (en) Server, system, user terminal, method and program for messaging service
CN111445311B (en) Order generation method, merchant terminal and storage medium
US20220171011A1 (en) Positioning method and device, server, storage medium and terminal
CN111611514A (en) Page display method and device based on user login information and electronic equipment
CN114140947A (en) Interface display method and device, electronic equipment, storage medium and program product
CN113542301B (en) Interaction method and device, electronic equipment and storage medium
CN113467659A (en) Icon display method and device and storage medium
CN110493120A (en) A kind of method and apparatus for sending device operational order
CN113641439B (en) Text recognition and display method, device, electronic equipment and medium
CN112328871B (en) Reply generation method, device, equipment and storage medium based on RPA module
CN113590243A (en) Energy enterprise project creation method and device, computer equipment and medium
CN113888295A (en) Travel reimbursement method, travel reimbursement device, storage medium and electronic equipment
CN113919310A (en) Short message content determination method and device, electronic equipment and storage medium
CN115686229A (en) Expression input method, expression input device and computer program storage medium
CN106790428B (en) Data transmission method and device
CN112133306A (en) Response method and device based on express delivery user and computer equipment
CN111770007A (en) Custom service testing tool and method based on power system universal service protocol
CN113342965A (en) Intention prediction and feedback method, device, computer equipment and readable storage medium
CN117971215A (en) Page generation method, page generation device, computer equipment and storage medium
CN114819984A (en) Intelligent response method and device, electronic equipment and storage medium
CN116185653A (en) Data processing method, device and storage medium
CN115599573A (en) Event processing method, device, equipment and storage medium
CN114048096A (en) Data processing method and related equipment thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant