Search

CN-115712905-B - Anti-counterfeit code generation method, electronic device and computer readable medium

CN115712905BCN 115712905 BCN115712905 BCN 115712905BCN-115712905-B

Abstract

Embodiments of the present disclosure disclose an anti-counterfeit code generation method, an electronic device, and a computer readable medium. The method comprises the steps of responding to a user question sent by a user terminal, generating a question answer, conducting encryption processing on the user question and the question answer to obtain a user question encryption code and a question answer encryption code, generating an anti-counterfeiting code based on the user question encryption code and the question answer encryption code, and sending the question answer and the anti-counterfeiting code to the user terminal so that the user terminal displays the question answer and a rendering result corresponding to the anti-counterfeiting code in a chat interface. The embodiment can backup the generated anti-counterfeiting code as the data of the rendering result of the anti-counterfeiting code displayed on the user terminal, thereby providing a verification basis for verifying the authenticity and the integrity of the question-answer screenshot.

Inventors

  • PENG MINGCHAO

Assignees

  • 多点生活(成都)科技有限公司

Dates

Publication Date
20260512
Application Date
20210823

Claims (9)

  1. 1. An anti-counterfeiting code generation method comprises the following steps: responding to the received user questions sent by the user terminal, and generating answers to the questions; Encrypting the user questions and the answers to the questions to obtain user question encryption codes and answer encryption codes; generating an anti-counterfeiting code based on the user question encryption code and the question answer encryption code; The answer to the question and the anti-counterfeiting code are sent to the user terminal, so that the user terminal displays the answer to the question and a rendering result corresponding to the anti-counterfeiting code in a chat interface; responding to receiving a question and answer screenshot, and extracting a screenshot user question and a screenshot question answer from the question and answer screenshot, wherein the question and answer screenshot comprises the screenshot user question, the screenshot question answer and a screenshot anti-counterfeiting code rendering result; generating a screenshot anti-counterfeiting code based on the screenshot anti-counterfeiting code rendering result; Respectively carrying out encryption processing on the screenshot user questions and the screenshot question answers to obtain screenshot user question encryption codes and screenshot question answer encryption codes; generating a question-answer anti-counterfeiting code based on the screenshot user question encryption code and the screenshot question answer encryption code; and in response to the screenshot anti-counterfeiting code and the question-answer anti-counterfeiting code being the same, sending first prompt information representing that the screenshot user questions and the screenshot questions answers in the question-answer screenshot are not tampered to the associated display equipment.
  2. 2. The method of claim 1, wherein the generating an answer to a question comprises: and inputting the user questions into an intention recognition model to obtain the answers to the questions.
  3. 3. The method of claim 1, wherein the encrypting the user question and the answer to the question comprises: And carrying out key encryption processing on the user questions and the answers to the questions to obtain user question encryption codes and answer encryption codes.
  4. 4. The method of claim 1, wherein prior to the generating the security code, the method further comprises: Extracting characters with a first preset character number from the user problem encryption codes according to the first position information to obtain a first character string; Extracting characters with a second preset character number from the question answer encryption codes according to the second position information to obtain a second character string; converting the first character string to obtain a third character string; and converting the second character string to obtain a fourth character string.
  5. 5. The method of claim 4, wherein the generating the security code comprises: and performing splicing treatment on the third character string and the fourth character string to obtain the anti-counterfeiting code.
  6. 6. The method of claim 1, wherein the method further comprises: Responding to the fact that a fifth character string corresponding to third position information in the screenshot anti-counterfeiting code is different from a sixth character string corresponding to the third position information in the question-answering anti-counterfeiting code, and sending second prompt information representing that a screenshot user problem in the question-answering screenshot is tampered to the display equipment; responding to the fact that a seventh character string corresponding to fourth position information in the screenshot anti-counterfeiting code is different from an eighth character string corresponding to the fourth position information in the question-answering anti-counterfeiting code, and sending third prompt information representing that screenshot question answers in question-answering screenshots are tampered to the display equipment; And responding to the fifth character string being different from the sixth character string and the seventh character string being different from the eighth character string, and sending fourth prompt information representing that both the screenshot user questions and the screenshot questions in the question-answering screenshot are tampered to the display device.
  7. 7. The method of claim 6, wherein the sending, to the display device, fourth prompt information characterizing that both a screenshot user question and a screenshot question answer in the question-answer screenshot are tampered with, comprises: And controlling the associated alarm equipment to execute alarm operation corresponding to the fourth prompt information.
  8. 8. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1 to 7.
  9. 9. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1 to 7.

Description

Anti-counterfeit code generation method, electronic device and computer readable medium Technical Field Embodiments of the present disclosure relate to the field of computer technology, and in particular, to an anti-counterfeit code generation method, an electronic device, and a computer readable medium. Background Along with the continuous promotion of artificial intelligence technology, intelligent question-answering systems are developed, widely applied to various industries, and capable of reducing labor cost and improving consultation efficiency. At present, the basic question-answering flow of the intelligent question-answering system is that a user inputs a user question on a chat interface of a user terminal, the question-answering system only generates answer information after receiving the user question, and the answer information is sent to the user terminal. The user can screen the chat interface to obtain a question-answer screen containing question-answer information. Since the question and answer information on the question and answer screenshot can be tampered with, verification of the authenticity and integrity of the question and answer screenshot is required. The current verification method is mainly characterized in that the chat log of the user is queried according to the information, date and question-answer content of the user through log query, and the authenticity and the integrity of the question-answer screenshot are verified. However, when the above-described question-answering system is adopted, there are often the following technical problems: Firstly, the lack of the anti-counterfeiting code further causes the lack of a rendering result corresponding to the anti-counterfeiting code on the question-answer screenshot, and the authenticity and the integrity of the question-answer screenshot are difficult to verify according to the rendering result; Secondly, the verification method based on the anti-counterfeiting code is lacked, and the verification efficiency and the reliability of the verification result of the log inquiry are low. Disclosure of Invention The disclosure is in part intended to introduce concepts in a simplified form that are further described below in the detailed description. The disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Some embodiments of the present disclosure propose a security code generation method, an electronic device, and a computer readable medium to solve one or more of the technical problems mentioned in the background section above. In a first aspect, some embodiments of the present disclosure provide a method for generating an anti-counterfeit code, where the method includes generating a question answer in response to receiving a user question transmitted from a user terminal, performing encryption processing on the user question and the question answer to obtain a user question encryption code and a question answer encryption code, generating the anti-counterfeit code based on the user question encryption code and the question answer encryption code, and transmitting the question answer and the anti-counterfeit code to the user terminal, so that the user terminal displays the question answer and a rendering result corresponding to the anti-counterfeit code in a chat interface. In a second aspect, some embodiments of the present disclosure provide an electronic device comprising one or more processors, and a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect. In a third aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above. The anti-counterfeiting code generation method has the advantages that the generated anti-counterfeiting code can be used as the data backup of the rendering result of the anti-counterfeiting code displayed on the user terminal through the anti-counterfeiting code generation method of some embodiments of the present disclosure, so that a verification basis can be provided for verifying the authenticity and integrity of the question-answer screenshot. Specifically, the reason why the authenticity and the integrity of the question-answer screenshot are difficult to verify is that the lack of the anti-fake code further causes the lack of a rendering result corresponding to the anti-fake code on the question-answer screenshot, and the authenticity and the integrity of the question-answer screenshot are difficult to verify according to the rendering result. Based on this, some embodiments of the present disclo