Disclosure of Invention
The embodiment of the application provides a service system and a service method based on a block chain and a chat robot, which can solve the problem that the current chat robot cannot guarantee the safety and the transparency of financial transactions.
In a first aspect of the present application, there is provided a service system based on a block chain and a chat robot, including: the system comprises a chat robot and a block chain, wherein the chat robot and the block chain are communicated through a decentralized application program interface;
the chat robot is used for acquiring user account information and user request information, wherein the user request information comprises a query request, a transaction request and a message reminding request; the system is also used for replying the request information to generate reply information, and the reply information comprises a query result, fund transfer and message reminding; and the block chain is used for calling a digital certificate corresponding to the reply information according to the reply information to obtain service information corresponding to the reply information, wherein the digital certificate is a hash value of the service information of the mechanism to which the transaction entity belongs.
By adopting the technical scheme, the chat robot communicates with the block chain through a decentralized application program interface, and the chat robot is used for acquiring user account information and user request information; the device is also used for replying the request information to generate reply information; the block chain is used for calling the digital certificate corresponding to the reply information according to the reply information to obtain the service information corresponding to the reply information, and in conclusion, the block chain technology and the chat robot technology are combined, and the security problem of the chat robot for financial transactions is solved by utilizing the distributed characteristic of a block chain system, the secure transaction and time stamp records provided by the block chain technology and a strong integrity and invariance support mechanism of the block chain, so that the problem that the security and the transparency of the financial transactions cannot be guaranteed by the current chat robot can be improved, and the effect of guaranteeing the security and the transparency of the financial transactions of the current chat robot is achieved.
In one possible implementation, the blockchain is specifically configured to:
obtaining a transaction certificate from a certification authority according to the reply information;
calling a digital certificate corresponding to the reply message from a service organization according to the transaction certificate;
and acquiring the service information corresponding to the reply information according to the digital certificate corresponding to the reply information.
In one possible implementation, the block chain is further configured to:
obtaining a hash value of the service information;
and performing data chaining on the hash value.
In one possible implementation, the blockchain is a federation chain.
In a possible implementation manner, the chat robot is a transaction chat robot, the transaction chat robot is obtained by training according to a user data set and a robot data set, and the transaction chat robot is used for representing a mapping relationship between the request information and the reply information.
In a second aspect of the present application, there is provided a service method based on a block chain and a chat robot, including:
acquiring user account information and user request information, wherein the user request information comprises a query request, a transaction request and a message reminding request;
replying the request message to generate reply message, wherein the reply message comprises a query result, fund transfer and message reminding;
and calling a digital certificate corresponding to the reply information according to the reply information to obtain service information corresponding to the reply information, wherein the digital certificate is a hash value of the service information of the mechanism to which the transaction entity belongs.
In a possible implementation manner, the invoking a digital certificate corresponding to the reply information according to the reply information to obtain service information corresponding to the reply information includes:
obtaining a transaction certificate from a certification authority according to the reply information;
calling a digital certificate corresponding to the reply message from a service organization according to the transaction certificate;
and acquiring the service information corresponding to the reply information according to the digital certificate corresponding to the reply information.
In a possible implementation manner, before the obtaining of the user account information and the user request information, the method includes:
obtaining a hash value of the service information;
and performing data chaining on the hash value.
In a third aspect of the present application, a method for training a affairs chat robot is provided, including:
training the chatting robot according to the user data set and the robot data set to obtain a transaction chatting robot, wherein the transaction chatting robot is used for representing the mapping relation between the user request information and the reply information.
In one possible implementation, the user data set includes historical user request information and the robot data set includes historical reply information responsive to the historical user request information.
It should be understood that the statements described in this summary are not intended to limit the scope of the disclosure, or the various features described in this summary. Other features of the present application will become apparent from the following description.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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.
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by one of ordinary skill in the art that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference herein to "a plurality" means greater than or equal to two. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The service system based on the block chain and the chat robot can be applied to the technical field of financial transactions.
A chat bot is a popular technology that enables a website or a user to obtain user information in a conversational manner. In recent years, chat robots have been used to perform financial transactions. However, there are still some security issues with performing financial transactions based on chat robots. For example, issues related to security verification, data consistency, system availability and transparency, and the like. Therefore, before the technology of the chat robot is adopted on a large scale, careful planning is required.
In order to solve the technical problem, the embodiment of the application provides a service system based on a block chain and a chat robot. In recent years, blockchain technology has shown its potential to subvert many application areas, particularly in the financial area, due to inherent advantages in some security aspects. Therefore, based on the cooperation mode of the 'block chain technology + the chat robot technology', the method can play a role in safety guarantee and transparency application in the financial transaction process.
Fig. 1 is a block diagram illustrating a service system based on a block chain and a chat robot in an embodiment of the present application. Referring to fig. 1, the service system based on a block chain and a chat robot in this embodiment includes:
chat robot 101 and blockchain 102, chat robot 101 and blockchain 102 communicate through a decentralized application program interface. The chat robot 101 obtains user account information and user request information, where the user request information includes a query request, a transaction request, and a message reminding request. The chat robot 101 then replies to the request message, generating a reply message, which includes the query result, the funds transfer, and the message alert. Then, according to the reply information, the blockchain 102 calls a digital certificate corresponding to the reply information to obtain service information corresponding to the reply information, wherein the digital certificate is a hash value of the service information of the institution to which the transaction entity belongs.
By adopting the technical scheme, the chat robot communicates with the block chain through a decentralized application program interface, and the chat robot is used for acquiring user account information and user request information; the device is also used for replying the request information to generate reply information; the block chain is used for calling the digital certificate corresponding to the reply information according to the reply information to obtain the service information corresponding to the reply information, and in conclusion, the block chain technology and the chat robot technology are combined, and the security problem of the chat robot for financial transactions is solved by utilizing the distributed characteristic of a block chain system, the secure transaction and time stamp records provided by the block chain technology and a strong integrity and invariance support mechanism of the block chain, so that the problem that the security and the transparency of the financial transactions cannot be guaranteed by the current chat robot can be improved, and the effect of guaranteeing the security and the transparency of the financial transactions of the current chat robot is achieved.
In the present embodiment, chat robot 101 is essentially a Web site (Web) application, but it does not have a mechanism to interact with the blockchain platform. Therefore, based on a decentralized application (DApp), an interactive interface is created between chat robot 101 and blockchain 102, i.e., chat robot 101 and blockchain 102 communicate through a decentralized application interface.
Specifically, DApp is a Web server configured to expose an Application Programming Interface (API) to a Web Application. And DApp is also the interface to the blockchain platform. The Web application uses these APIs to submit user account information and user request information, which is converted by the DAPP into blockchain transactions. The DAPP then uses the blockchain API to submit these transactions (i.e., reply messages corresponding to the user request messages) and, through the API, investigates blockchain platform-related functions (i.e., service messages for the entity to which the transaction entity belongs).
Alternatively, a chat robot developed by a beginner-friendly chat robot platform (DialogFlow) agent from google was chosen.
In the embodiment of the present application, a chat robot developed by a DialogFlow agent uses a Natural Language Understanding (NLU) background module with a strong Google, and has a function of implementing that the chat robot 101 uses an input information (i.e., user account information and user request information) as a query, and gives a response to the input information (i.e., reply information) as a return based on a trained machine learning technology for processing data.
Specifically, the chat robot developed by the DialogFlow agent includes three basic elements, namely, intent, entity, and training. Intent refers to the mapping between the user's query and the agent's response (i.e., the mapping between the user account information and the user request information as the user's query and the reply information as the agent's response). Each intent looks like a cluster, but where the probability of matching appears to be high for different queries mapped to a single preset output. In other words, a user may request the system to initiate a transaction in a number of ways, but the agent should detect that the user is attempting to create a transaction and respond with a single output. Wherein the entities in the chat robot developed by the DialogFlow agent are input from the natural language of one user.
For example, a query for a transaction (e.g., "send account 1123158964, 1000 units") will have several corresponding entities: account number (1123158964) and amount (1000 units).
FIG. 2 shows a flow diagram of chat robot interaction in an embodiment of the application. Referring to fig. 2, the chat robot performs user interaction through the browser, and replies according to the submitted different user account information and user request information to generate reply information.
Specifically, in the process of chat robot interaction, a user sends user account information and user request information to Dapp, and the Dapp receives the user account information and the user request information sent by the user and then sends the information to a chat robot (chat robot developed by DialogFlow agent). The chat robot receives user account information and user request information sent by a user through a Web browser, performs intention identification on the user account information and the user request information, and generates reply information based on entity identification.
Wherein, the chat robot is a transaction chat robot. In the chat robot developed by the DialogFlow agent, training refers to training the chat robot according to a user data set and a robot data set based on machine learning to obtain a transaction chat robot.
Fig. 3 shows a flow chart of financial transactions of the service system based on the block chain and the chat robot in the embodiment of the application. Referring to fig. 1 and 3, after the Dapp obtains the user account information and the user request information input by the user, the Dapp authenticates the identity of the user, that is, verifies the user account information. If the authentication is passed, Dapp sends the user account information and the user request information to the chat robot.
Then, the chat robot 101 acquires user account information and user request information. And obtaining reply information corresponding to the user request information through an intention recognition, entity recognition and trained chat robot model (namely a trained model carried by the affair chat robot). The query result included by the reply information corresponds to the query request included by the user request information, the fund transfer included by the reply information corresponds to the transaction request included by the user request information, and the message prompt included by the reply information corresponds to the message prompt request included by the user request information.
The chat robot 101 then sends a reply message to the blockchain 102 via Dapp. The block chain 102 calls the digital certificate corresponding to the reply information, and obtains the service information corresponding to the reply information according to the digital certificate. The service information is the service information corresponding to the reply information that is allowed to be obtained by the chat robot 101 after the certificate is verified according to the digital certificate corresponding to the reply information. After obtaining the service information sent by the blockchain 102, Dapp replies to the relevant question of the user (i.e. the user request information).
During the process that the chat robot 101 replies to the user, Dapp performs Hash chaining on the data during the interaction process and stores the data in the service system based on the block chain and the chat robot.
In summary, the service system based on the blockchain and the chat robot in the embodiment of the application applies the blockchain technology to the field of the chat robot aiming at the safety problem of the chat robot in the financial transaction process, not only explores the combination method of the blockchain-based chat robot, but also designs and optimizes the integration process which utilizes respective advantages, optimizes the user identity verification process of the blockchain system, and ensures the safety of the user in the financial transaction in the DAPP, aiming at assisting customer service staff to work, so that the financial transaction service has timeliness, effectiveness and intelligence.
In some embodiments, the blockchain is specifically configured to:
and obtaining the transaction certificate from the certification authority according to the reply message.
And calling the digital certificate corresponding to the reply message from the service organization according to the transaction certificate.
And acquiring the service information corresponding to the reply information according to the digital certificate corresponding to the reply information.
In the embodiment of the application, the certification mechanism is a certificate issuing system externally connected with a service system based on the block chain and the chat robot, and the service mechanism is a certificate verification system externally connected with the service system based on the block chain and the chat robot. Based on the double confirmation of the certificate issuing system and the certificate verification system (namely after obtaining the transaction certificate and the digital certificate), the service system based on the block chain and the chat robot can only call service information from the affiliated organizations of all entities externally connected with the service system based on the block chain and the chat robot, and send the service information to the user through the chat robot.
By adopting the technical scheme and adopting a double confirmation mechanism, the safety of the service system based on the block chain and the chat robot can be ensured.
In some embodiments, the blockchain is further to:
obtaining a hash value of the service information;
and performing data chaining on the hash value.
In the embodiment of the application, before interaction, the service system based on the block chain and the chat robot can be used for connecting a plurality of certification authorities, a plurality of service authorities and a plurality of entities belonging to the same, so as to form a financial transaction interaction network based on the block chain. And then, Hash chaining is carried out on the information of the authentication mechanisms, the service mechanisms and the mechanisms to which the entities belong, and the information is stored in the block chain, so that the service system based on the block chain and the chat robot can conveniently interact with the user through the chat robot in the service system based on the block chain and the chat robot according to the request of the user at any time.
By adopting the technical scheme, the characteristics of the block chain and the chat robot are combined with the integrated block chain chat robot, so that the effect of ensuring the safety and the transparency of financial transactions by using the block chain while flexibly using the chat robot is achieved.
In some embodiments, the blockchain 102 is a federation chain.
In an embodiment of the present application, the blockchain platform includes a public chain and a federation chain. Because the transaction times Per Second (TPS for short) of the public link is slow, the storage cost is high, and no alliance link is more suitable as the block chain system of the chat robot, the alliance link can be selected as a subsystem of a service system based on the block chain and the chat robot, and the requirements of the chat robot can be met in terms of security and TPS.
By adopting the technical scheme and selecting the alliance chain, the transaction times per second in the financial transaction process of the service system based on the block chain and the chat robot can be accelerated, and the storage cost of the service system based on the block chain and the chat robot is reduced.
In some embodiments, chat robot 101 is a transaction chat robot obtained by training a user data set and a robot data set, and the transaction chat robot is used for representing a mapping relationship between request information and reply information.
In the embodiment of the present application, training in the chat robot developed by the DialogFlow agent enables the chat robot to understand what the user suggests, and to approach the user in a structured manner.
For example, using machine learning techniques, a chat robot developed by a DialogFlow agent can use its own language model to associate similar cluster intents and processing entities with a user's query request. As another example, developers of chat robots developed by the DialogFlow agent may enter training data appropriate for a particular application.
Based on the two aspects, the chat robot developed by the DialogFlow agent trains itself to process user queries (i.e., user request information) and generate responses (i.e., reply information). Meanwhile, the training model of the chat robot developed by the DialogFlow agent is dynamically improved, namely, the performance and reliability of the chat robot developed by the DialogFlow agent can be improved as more and more users talk with the chat robot developed by the DialogFlow agent.
In the embodiment of the present application, the chat robot developed by the DialogFlow agent is a Transactional chat robot (Transactional Chatbot). The DAPP sends the interaction information fed back by the transaction chat robot to the user by calling a corresponding API with necessary information for interaction with the transaction chat robot. The machine learning model in the transactional chat robot will be trained using two data sets, namely a user data set and a robot data set.
In some embodiments, the user data set includes historical user request information and the robot data set includes historical reply information responsive to the historical user request information.
In the embodiment of the present application, the history user request information is an interactive entity (question) actually issued by the user, and the history reply information is a sentence (answer) generated by the chat robot in response to the interactive entity actually issued by the user.
Once the user is securely logged in (i.e., the user account information is authenticated), the user may submit user request information for a different user interface to the DAPP through the chat robot. The user request information is transmitted to the affair chatting robot and processed correspondingly.
For example, when the user request information is a query request, the transaction chat robot responds to the query request, analyzes the query request, obtains the service information of the response from the block chain, and feeds back the analyzed query result to the user through the user interface by the DAPP. When the user request message is a transaction request, the response of the transactional chat robot is sufficient to create a blockchain (Fabric) transaction. The DAPP then converts the response to a transaction, and the transaction flow then takes place through the connected peers (i.e., the institution to which the transacting entity belongs).
It should be noted that, for the sake of simplicity, the communication between the systems is described as a series of actions in the foregoing embodiments of the systems, but those skilled in the art should understand that the present application is not limited by the described order of actions, because some communication between the systems may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that the acts and modules referred to are not necessarily required in this application.
The foregoing is a description of system embodiments, and the following is a further description of the embodiments described herein, by way of example of methods.
Fig. 4 is a flowchart illustrating a service method based on a block chain and a chat robot in an embodiment of the present application. Referring to fig. 4, the service method based on the block chain and the chat robot in this embodiment includes:
step S401: user account information and user request information are obtained, wherein the user request information comprises a query request, a transaction request and a message reminding request.
Step S402: and replying the request message to generate reply message which comprises a query result, fund transfer and message reminding.
Step S403: and calling a digital certificate corresponding to the reply information according to the reply information to obtain service information corresponding to the reply information, wherein the digital certificate is a hash value of the service information of the mechanism to which the transaction entity belongs.
In some embodiments, step S403 includes: step a 1-step A3.
Step A1: and obtaining the transaction certificate from the certification authority according to the reply message.
Step A2: and calling the digital certificate corresponding to the reply message from a service organization according to the transaction certificate.
Step A3: and acquiring the service information corresponding to the reply information according to the digital certificate corresponding to the reply information.
In some embodiments, before step S401, further comprising: step B1-step B2.
Step B1: and obtaining the hash value of the service information.
Step B2: and performing data chaining on the hash value.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described method may refer to the corresponding process in the foregoing system embodiment, and is not described herein again.
The above is an introduction about an embodiment of a service method based on a block chain and a chat robot, and the scheme of the present application is further explained by an embodiment of a training method of a transaction chat robot.
Fig. 5 illustrates a training method of a business chat robot in an embodiment of the present application, and referring to fig. 5, the training method of the business chat robot in the embodiment includes:
step 501: training the chatting robot according to the user data set and the robot data set to obtain a transaction chatting robot, wherein the transaction chatting robot is used for representing the mapping relation between the user request information and the reply information.
In some embodiments, in step 501, the user data set includes historical user request information and the robot data set includes historical reply information responsive to the historical user request information.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described method may refer to the corresponding process in the foregoing system embodiment, and is not described herein again.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.