Anti-counterfeiting code generation method, electronic device and computer readable medium
By generating anti-counterfeiting codes and displaying their rendering results in the chat interface, a verification basis is provided for the question and answer screenshots of the intelligent question and answer system. This solves the problem of the difficulty in verifying the authenticity and completeness of question and answer screenshots, and improves the efficiency and reliability of verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MULTIPOINT LIFE (CHENGDU) TECH CO LTD
- Filing Date
- 2021-08-23
- Publication Date
- 2026-05-12
AI Technical Summary
Existing intelligent question-answering systems lack anti-counterfeiting codes, making it difficult to verify the authenticity and completeness of question-answering screenshots, and the verification efficiency and reliability of log queries are low.
The method for generating anti-counterfeiting codes involves encrypting user questions and answers to generate encrypted codes for user questions and answers, and then generating anti-counterfeiting codes based on these codes, which are displayed in the chat interface to provide a basis for verification.
It provides verification evidence for the authenticity and completeness of Q&A screenshots, improving the efficiency and reliability of verification and ensuring the security and reliability of user questions and answers.
Smart Images

Figure CN115712905B_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of computer technology, and more specifically to anti-counterfeiting code generation methods, electronic devices, and computer-readable media. Background Technology
[0002] With the continuous advancement of artificial intelligence technology, intelligent question-answering systems have emerged and are widely used in various industries, reducing labor costs and improving consultation efficiency. Currently, the basic question-answering process of an intelligent question-answering system is as follows: the user enters a question on the chat interface of their terminal; the system receives the question, generates only the answer information, and sends it to the user's terminal. Users can take screenshots of the chat interface to obtain screenshots containing the question-and-answer information. Since the question-and-answer information on the screenshots can be tampered with, it is necessary to verify the authenticity and completeness of the screenshots. Current verification methods primarily involve log queries, searching the user's chat logs based on user information, date, and question-and-answer content, and then verifying the authenticity and completeness of the screenshots.
[0003] However, when using the above question-answering system, the following technical problems often arise:
[0004] First, the lack of anti-counterfeiting codes results in the absence of rendering results corresponding to the anti-counterfeiting codes on the Q&A screenshots, making it difficult to verify the authenticity and completeness of the Q&A screenshots based on the rendering results.
[0005] Second, there is a lack of verification methods based on anti-counterfeiting codes, resulting in low efficiency and low reliability of verification results when using log queries for verification. Summary of the Invention
[0006] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0007] Some embodiments of this disclosure provide methods for generating anti-counterfeiting codes, electronic devices, and computer-readable media to address one or more of the technical problems mentioned in the background section above.
[0008] In a first aspect, some embodiments of this disclosure provide a method for generating an anti-counterfeiting code. The method includes: generating a question answer in response to receiving a user question sent by a user terminal; encrypting the user question and the question answer to obtain an encrypted user question code and an encrypted question answer code; generating an anti-counterfeiting code based on the encrypted user question code and the encrypted question answer 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 the rendering result corresponding to the anti-counterfeiting code in a chat interface.
[0009] Secondly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0010] Thirdly, some embodiments of this 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.
[0011] The above embodiments of this disclosure have the following beneficial effects: the anti-counterfeiting code generation method of some embodiments of this disclosure can use the generated anti-counterfeiting code as a data backup of the rendering result of the anti-counterfeiting code displayed on the user terminal, thereby providing a verification basis for verifying the authenticity and integrity of the question-and-answer screenshot. Specifically, the reason why it is difficult to verify the authenticity and integrity of the question-and-answer screenshot is that the anti-counterfeiting code is missing, which leads to the lack of the rendering result corresponding to the anti-counterfeiting code on the question-and-answer screenshot, making it difficult to verify the authenticity and integrity of the question-and-answer screenshot based on the rendering result. Based on this, some embodiments of this disclosure add a method for generating anti-counterfeiting codes. First, in response to receiving a user question sent by the user terminal, a question answer is generated. Then, the user question and question answer are encrypted to obtain an encrypted code for the user question and an encrypted code for the question answer. This ensures the security and reliability of the user question and question answer. Second, an anti-counterfeiting code is generated based on the encrypted code for the user question and the encrypted code for the question answer. This provides a basis for judging the integrity and authenticity of the question-and-answer process, and the generated anti-counterfeiting code can be used as a data backup of the rendering result of the anti-counterfeiting code displayed on the user terminal. Then, the answer to the question and the anti-counterfeiting code are sent to the user's terminal, causing the user's terminal to display the answer and the corresponding rendering result in the chat interface. This rendering result can then be used to verify the authenticity and completeness of the question-and-answer screenshot. Furthermore, it provides a basis for verifying the authenticity and completeness of the question-and-answer screenshot. Attached Figure Description
[0012] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0013] Figure 1 This is a schematic diagram illustrating an application scenario of the anti-counterfeiting code generation method according to some embodiments of this disclosure;
[0014] Figure 2 This is a flowchart of some embodiments of the anti-counterfeiting code generation method according to the present disclosure;
[0015] Figure 3 This is a flowchart of some other embodiments of the anti-counterfeiting code generation method according to the present disclosure;
[0016] Figure 4 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0017] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0018] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0019] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0020] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0021] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0022] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0023] Figure 1 This is a schematic diagram illustrating an application scenario of the anti-counterfeiting code generation method according to some embodiments of this disclosure.
[0024] exist Figure 1In the application scenario, firstly, the computing device 101 can receive a user question 103 sent by the user terminal 102 (for example, the user question 103 could be: "Hello, who are you?"), and generate a question answer 104 (for example, the question answer 104 could be: "I am an intelligent question-answering robot."). Then, the computing device 101 can encrypt the user question 103 and the question answer 104 to obtain a user question encryption code 105 and a question answer encryption code 106. After that, the computing device 101 can generate an anti-counterfeiting code 107 based on the user question encryption code 105 and the question answer encryption code 106. Finally, the computing device 101 can send the question answer 104 and the anti-counterfeiting code 107 to the user terminal 102, so that the user terminal 102 displays the question answer 104 and the rendering result 109 corresponding to the anti-counterfeiting code 107 in the chat interface 108 (for example, the rendering result 109 can be a barcode).
[0025] It should be noted that the aforementioned computing device 101 can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed within the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0026] It should be understood that Figure 1 The number of computing devices shown is merely illustrative. Any number of computing devices can be used depending on implementation needs.
[0027] Continue to refer to Figure 2 The diagram illustrates a flow 200 of some embodiments of the anti-counterfeiting code generation method according to the present disclosure. The anti-counterfeiting code generation method includes the following steps:
[0028] Step 201: In response to receiving a user question sent by the user terminal, generate a question answer.
[0029] In some embodiments, the entity executing the anti-counterfeiting code generation method (such as...) Figure 1The computing device 101 shown can generate a question answer in response to receiving a user question sent by a user terminal. The user terminal can be a smartphone. The user question can be a question entered by the user on the user terminal. For example, the user question could be: "Hello, who are you?". The question answer can be the answer generated by the executing entity in response to the user question. The question answer includes at least one sub-question answer. The sub-question answer can be one of the answers to the question answer. For example, when the user question is: "Hello, who are you?", the question answer could be: "I am an intelligent question-answering robot." In this case, "I am an intelligent question-answering robot" is a sub-question answer. When the user question is: "What's the weather like today?", the question answer could be: "Today's weather is cloudy turning to thunderstorms, 12-16 degrees Celsius," and "Remember to bring an umbrella when you go out!" In this case, "Today's weather is cloudy turning to thunderstorms, 12-16 degrees Celsius" is a sub-question answer, and "Remember to bring an umbrella when you go out!" is also a sub-question answer. In practice, the aforementioned execution entity can, in response to receiving a user question sent by a user terminal, search a preset question-and-answer database for an answer corresponding to the user question, obtaining at least one sub-question answer as the question answer. The preset question-and-answer database can be a database containing preset questions that the user might ask and corresponding answers. Thus, a question answer can be generated to reply to the user's question.
[0030] In some optional implementations of certain embodiments, the aforementioned execution entity can input a user question into an intent recognition model to obtain a question answer. In practice, the aforementioned execution entity can input a user question into an intent recognition model to obtain a question answer. The intent recognition model can be a pre-trained neural network model that takes text-type user questions as input data and outputs text-type question answers corresponding to the user questions as output data. The aforementioned neural network model can include, but is not limited to, a baseline model, an LSTM (long-short-term memory) model, and an LSTM-Attention (long-short-term memory-attention) model. As an example, the aforementioned execution entity can input the user question "Hello, may I ask who you are?" into the baseline model and obtain the question answer "I am an intelligent question-answering robot." This improves the accuracy of the question answer.
[0031] Step 202: Encrypt the user's question and answer to obtain the encrypted user question code and the encrypted answer code.
[0032] In some embodiments, the aforementioned executing entity can encrypt the user question and the question answer to obtain encrypted user question codes and encrypted question answer codes. In practice, the aforementioned executing entity can use the DES (Data Encryption Standard) algorithm to encrypt the aforementioned user question and the aforementioned question answer. In response to detecting that the aforementioned question answer includes a subquestion answer, the aforementioned executing entity can use the DES algorithm to encrypt the aforementioned question answer to obtain encrypted question answer codes. In response to detecting that the aforementioned question answer includes at least one subquestion answer, the aforementioned executing entity can first combine the aforementioned at least one subquestion answer into one answer. Then, it can use the DES algorithm to encrypt the aforementioned answer to obtain encrypted question answer codes. The method for combining the aforementioned at least one subquestion answer can be: sorting the subquestion answers in ascending order according to the number of characters in the question answer to obtain a subquestion answer sequence; concatenating the various subquestion answers in the aforementioned subquestion answer sequence into one answer. Both the aforementioned encrypted user question code and the aforementioned encrypted question answer code can be strings. The aforementioned encrypted user question code and the aforementioned encrypted question answer code generated using the aforementioned DES algorithm have the same code length. This ensures the security and reliability of user questions and answers.
[0033] In some optional implementations of certain embodiments, the executing entity can perform key encryption processing on the user question and the answer to obtain encrypted user question codes and encrypted answer codes. In practice, the executing entity can use a key encryption algorithm to encrypt the user question and the answer separately to obtain encrypted user question codes and encrypted answer codes. The key encryption algorithm can be HMAC-MD5 (Hash-based Message Authentication Code Message-Digest Algorithm 5). This improves the confidentiality and security of the user question.
[0034] Step 203: Generate an anti-counterfeiting code based on the encrypted code of the user's question and the encrypted code of the question's answer.
[0035] In some embodiments, the aforementioned execution entity can generate an anti-counterfeiting code based on the encrypted user question code and the encrypted question-answer code. In practice, the execution entity can perform cross-combination processing on the encrypted user question code and the encrypted question-answer code to obtain the anti-counterfeiting code. Specifically, the execution entity can sequentially extract characters from the encrypted user question code and the encrypted question-answer code as characters for the anti-counterfeiting code. The anti-counterfeiting code can be a string. For example, the encrypted user question code can be "12345". The encrypted question-answer code can be "abcde". The generated anti-counterfeiting code can be "1A2B3C4D5E". This provides a basis for verifying the integrity and authenticity of the question-and-answer process, and the generated anti-counterfeiting code can be used as a data backup of the rendering result of the anti-counterfeiting code displayed on the user's terminal.
[0036] In some optional implementations of certain embodiments, firstly, the execution entity can extract a first preset number of characters from the encrypted encoding of the user question based on the first position information to obtain a first string. The first position information can be the position number of any character in the encrypted encoding of the user question. For example, the first position information can be "eighth position". The first preset number of characters is the number of characters to be extracted from the encrypted encoding of the user question. For example, the first preset number of characters can be 5. The first string can be used to represent the user question. Then, the execution entity can extract a second preset number of characters from the encrypted encoding of the question answer based on the second position information to obtain a second string. The second position information can be the position number of any character in the encrypted encoding of the question answer. For example, the second position information can be "eighth position". The second preset number of characters is the number of characters to be extracted from the encrypted encoding of the question answer. For example, the second preset number of characters can be 5. The second string can be used to represent the question answer. Both the first string and the second string can be combinations of letters and numbers, where the letters are case-sensitive. Secondly, the execution entity can perform a conversion process on the first string to obtain a third string. For example, all lowercase letters in the first string can be converted to uppercase, resulting in the third string. Then, the second string can be converted to the fourth string. Finally, the executing entity can concatenate the third and fourth strings to obtain the anti-counterfeiting code. Specifically, the executing entity can use the third string as the first part of the anti-counterfeiting code and the fourth string as the second part. For example, the encrypted code for a user's question can be "12345". The encrypted code for the answer can be "abcde". The generated anti-counterfeiting code can be "12345ABCDE". This improves the confidentiality and reliability of the anti-counterfeiting code.
[0037] Step 204: Send the answer to the question and the anti-counterfeiting code to the user terminal, so that the user terminal displays the answer to the question and the rendering result corresponding to the anti-counterfeiting code in the chat interface.
[0038] In some embodiments, the executing entity can send the question answer and anti-counterfeiting code to the user terminal, causing the user terminal to display the question answer and the rendering result corresponding to the anti-counterfeiting code in the chat interface. The chat interface can be an interface displayed on the user terminal for users to input questions, display the input questions, and display the received question answers and the rendering result of the anti-counterfeiting code. In practice, the executing entity can send the answers to each sub-question included in the question answer to the user terminal separately, causing the user terminal to render the anti-counterfeiting code in the chat interface and attach the rendering result corresponding to the anti-counterfeiting code to each sub-question answer. The style of the rendering result includes, but is not limited to, strings, barcodes, and QR codes. In practice, the rendering result can be attached to the question answer in positions including, but not limited to, the side, top, and bottom. Therefore, the rendering result can be used to verify the authenticity and completeness of the question-and-answer screenshot.
[0039] The above embodiments of this disclosure have the following beneficial effects: the anti-counterfeiting code generation method of some embodiments of this disclosure can use the generated anti-counterfeiting code as a data backup of the rendering result of the anti-counterfeiting code displayed on the user terminal, thereby providing a verification basis for verifying the authenticity and integrity of the question-and-answer screenshot. Specifically, the reason why it is difficult to verify the authenticity and integrity of the question-and-answer screenshot is that the anti-counterfeiting code is missing, which leads to the lack of the rendering result corresponding to the anti-counterfeiting code on the question-and-answer screenshot, making it difficult to verify the authenticity and integrity of the question-and-answer screenshot based on the rendering result. Based on this, some embodiments of this disclosure add a method for generating anti-counterfeiting codes. First, in response to receiving a user question sent by the user terminal, a question answer is generated. Then, the user question and question answer are encrypted to obtain an encrypted code for the user question and an encrypted code for the question answer. This ensures the security and reliability of the user question and question answer. Second, an anti-counterfeiting code is generated based on the encrypted code for the user question and the encrypted code for the question answer. This provides a basis for judging the integrity and authenticity of the question-and-answer process, and the generated anti-counterfeiting code can be used as a data backup of the rendering result of the anti-counterfeiting code displayed on the user terminal. Then, the answer to the question and the anti-counterfeiting code are sent to the user's terminal, causing the user's terminal to display the answer and the corresponding rendering result in the chat interface. This rendering result can then be used to verify the authenticity and completeness of the question-and-answer screenshot. Furthermore, it provides a basis for verifying the authenticity and completeness of the question-and-answer screenshot.
[0040] Further reference Figure 3 The diagram illustrates a flow 300 of another embodiment of the anti-counterfeiting code generation method. Flow 300 of this anti-counterfeiting code generation method includes the following steps:
[0041] Step 301: In response to receiving a user question sent by the user terminal, generate a question answer.
[0042] Step 302: Encrypt the user's question and answer to obtain the encrypted user question code and the encrypted answer code.
[0043] Step 303: Generate an anti-counterfeiting code based on the encrypted code of the user's question and the encrypted code of the question's answer.
[0044] Step 304: Send the answer to the question and the anti-counterfeiting code to the user terminal, so that the user terminal displays the answer to the question and the rendering result corresponding to the anti-counterfeiting code in the chat interface.
[0045] In some embodiments, the specific implementation of steps 301-304 and their resulting technical effects can be found in [reference needed]. Figure 2 Steps 201-204 in the corresponding embodiments will not be repeated here.
[0046] Step 305: In response to receiving the Q&A screenshot, extract the screenshot user's question and the screenshot question's answer from the Q&A screenshot.
[0047] In some embodiments, the entity executing the anti-counterfeiting code generation method (such as...) Figure 1 The computing device 101 shown can, in response to receiving a question-and-answer screenshot, extract the screenshot user question and the screenshot question answer from the screenshot. The screenshot can be an image capturing the question and answer in a chat interface. The screenshot includes an image of the screenshot user question, an image of the screenshot question answer, and a screenshot anti-counterfeiting code rendering result. The screenshot can be received from a user terminal. The screenshot user question can be a question entered by the user on the user terminal. The screenshot question answer can be an answer generated by the executing entity in response to the user question. In practice, the executing entity can perform text recognition processing on the screenshot, extracting the text information of the question and the text information of the answer, using the text information of the question as the screenshot user question and the text information of the answer as the screenshot question answer. This provides a verification basis for the verification of the question-and-answer screenshot.
[0048] Step 306: Generate screenshot anti-counterfeiting code based on the screenshot anti-counterfeiting code rendering result.
[0049] In some embodiments, the execution entity can generate a screenshot anti-counterfeiting code based on the screenshot anti-counterfeiting code rendering result. The style of the screenshot anti-counterfeiting code rendering result can include, but is not limited to, strings, barcodes, and QR codes. Different styles of the screenshot anti-counterfeiting code rendering result lead to different methods of generating the screenshot anti-counterfeiting code. In practice, the execution entity can determine the string as the screenshot anti-counterfeiting code if the style of the screenshot anti-counterfeiting code rendering result is a string. In practice, the execution entity can also scan the screenshot anti-counterfeiting code rendering result if the style of the screenshot anti-counterfeiting code rendering result is a QR code or barcode to obtain the screenshot anti-counterfeiting code. This provides a comparison code for verifying question-and-answer screenshots.
[0050] Step 307: Encrypt the screenshot user question and the screenshot question answer respectively to obtain the encrypted code of the screenshot user question and the encrypted code of the screenshot question answer.
[0051] In some embodiments, the aforementioned execution entity can encrypt the screenshot user question and the screenshot question answer separately to obtain encrypted codes for the screenshot user question and the screenshot question answer. In practice, the aforementioned execution entity can use the DES algorithm to encrypt the screenshot user question and the screenshot question answer separately. The method for encrypting the screenshot user question and the screenshot question answer can be referenced from... Figure 2 The method of encrypting the user question and answer in step 202 of the corresponding embodiments will not be described again here. Thus, we can obtain the encrypted encoding of the screenshot user question and the encrypted encoding of the screenshot question answer.
[0052] Step 308: Generate anti-counterfeiting code for question and answer based on the encrypted code of the screenshot user's question and the encrypted code of the screenshot question and answer.
[0053] In some embodiments, the aforementioned executing entity can generate a question-and-answer anti-counterfeiting code based on the encrypted code of the user's question and answer in the screenshot. In practice, the method of generating a question-and-answer anti-counterfeiting code based on the encrypted code of the user's question and answer in the screenshot can refer to... Figure 2 The method for generating anti-counterfeiting codes for user questions and answers in step 203 of the corresponding embodiments will not be described again here. Therefore, through steps 307-308, the anti-counterfeiting codes for questions and answers generated based on screenshot user questions and screenshot question answers can be obtained.
[0054] Step 309: In response to the fact that the screenshot anti-counterfeiting code and the question-and-answer anti-counterfeiting code are the same, a first prompt message indicating that the screenshot user's question and the screenshot question answer in the question-and-answer screenshot have not been tampered with is sent to the associated display device.
[0055] In some embodiments, the executing entity may, in response to the screenshot anti-counterfeiting code and the question-and-answer anti-counterfeiting code being identical, send a first prompt message indicating that the screenshot user's question and answer in the question-and-answer screenshot have not been tampered with to an associated display device. The screenshot anti-counterfeiting code and the question-and-answer anti-counterfeiting code being identical means that each character in the screenshot anti-counterfeiting code is completely identical to each character in the question-and-answer anti-counterfeiting code. In practice, the executing entity may send the first prompt message indicating that the screenshot user's question and answer in the question-and-answer screenshot have not been tampered with to an associated display device to notify relevant personnel that the screenshot user's question and answer in the question-and-answer screenshot have not been tampered with. The first prompt message may be information indicating that the screenshot user's question and answer in the question-and-answer screenshot have not been tampered with. For example, the first message may be: "The question and answer in the screenshot have not been tampered with." This verifies that the screenshot has not been tampered with and alerts relevant personnel.
[0056] Optionally, the executing entity may, in response to the difference between the fifth string corresponding to the third position information in the screenshot anti-counterfeiting code and the sixth string corresponding to the third position information in the question-and-answer anti-counterfeiting code, send a second prompt message indicating that the screenshot user question in the question-and-answer screenshot has been tampered with to the display device. The third position information may be information representing a predetermined position range in the screenshot anti-counterfeiting code. For example, the third position information may be the first, third, fifth, seventh, and ninth positions. In this case, the fifth string is a string composed of characters located at the first, third, fifth, seventh, and ninth positions of the screenshot anti-counterfeiting code. The sixth string corresponding to the third position information is a string composed of characters at the first, third, fifth, seventh, and ninth positions of the question-and-answer anti-counterfeiting code. The third position information is the position information of the character corresponding to the encrypted user question code in the anti-counterfeiting code. For example, when executing step 303, a cross-combination process can be used to obtain the anti-counterfeiting code. The cross-combination process can use the characters at the first, second, third, fourth, and fifth positions of the encrypted user question code as the characters at the first, third, fifth, seventh, and ninth positions of the anti-counterfeiting code. The third position information is the first, third, fifth, seventh, and ninth positions. In practice, in response to the difference between the fifth string and the sixth string, the executing entity can send a second prompt message indicating that the user's question in the screenshot of the Q&A has been tampered with to the display device, causing the display device to display the second prompt message. In practice, the executing entity can also control an associated alarm device to perform an alarm operation corresponding to the second prompt message. The alarm device can be a device with an alarm function. For example, the alarm device can be an siren. The alarm operation can be an operation that causes the alarm device to flash, wherein the color of the flashing light corresponds to the second prompt message. For example, after sending the second prompt message to the display device, the associated alarm device can be controlled to flash red light. Thus, when it is detected that the question in the screenshot of the Q&A has been tampered with, the relevant staff can be notified through the second prompt message.
[0057] Optionally, the executing entity may, in response to the difference between the seventh string corresponding to the fourth position information in the screenshot anti-counterfeiting code and the eighth string corresponding to the fourth position information in the question-and-answer anti-counterfeiting code, send a third prompt message indicating that the screenshot question answer in the question-and-answer screenshot has been tampered with to the display device. The fourth position information may be information representing a predetermined position range in the screenshot anti-counterfeiting code. For example, the fourth position information may be the second, fourth, sixth, eighth, or tenth position. In this case, the seventh string is a string composed of characters located at the second, fourth, sixth, eighth, and tenth positions of the screenshot anti-counterfeiting code. The eighth string corresponding to the fourth position information is a string composed of characters at the second, fourth, sixth, eighth, and tenth positions of the question-and-answer anti-counterfeiting code. The fourth position information is the position information of the character corresponding to the encrypted question answer code in the anti-counterfeiting code. For example, when executing step 303, a cross-combination process can be used to obtain the anti-counterfeiting code. The cross-combination process can use the characters at the first, second, third, fourth, and fifth positions of the encrypted question answer code as the characters at the second, fourth, sixth, eighth, and tenth positions of the anti-counterfeiting code. The third position information is the second, fourth, sixth, eighth, and tenth positions. In response to the difference between the seventh and eighth strings, the executing entity can send a third prompt indicating that the answer to the screenshot question in the question-and-answer screenshot has been tampered with to the display device, causing the display device to display the third prompt information. In practice, the executing entity can also control associated alarm devices to perform alarm operations corresponding to the third prompt information. The alarm operation can be an operation that causes the alarm device to flash, where the color of the flashing light corresponds to the third prompt information. For example, after sending the third prompt information to the display device, the associated alarm device can be controlled to flash yellow light. This verifies that the answer to the question-and-answer screenshot has been tampered with, alerts relevant personnel, and triggers the corresponding alarm.
[0058] Optionally, the executing entity may, in response to the difference between the fifth string and the sixth string, and the difference between the seventh string and the eighth string, send a fourth prompt message indicating that both the screenshot user's question and answer in the question-and-answer screenshot have been tampered with to the display device. In practice, the executing entity may send the fourth prompt message indicating that both the screenshot user's question and answer in the question-and-answer screenshot have been tampered with to the display device, causing the display device to display the fourth prompt message. In practice, the executing entity may also control an associated alarm device to perform an alarm operation corresponding to the fourth prompt message. The alarm operation may be an operation that causes the alarm device to flash, wherein the color of the flashing light corresponds to the fourth prompt message. For example, after sending the third prompt message to the display device, the associated alarm device may be controlled to flash purple light. Thus, it can be verified that both the question and answer in the question-and-answer screenshot have been tampered with, and relevant personnel can be notified and corresponding alarm processing can be performed.
[0059] Step 309 and its related content, as an inventive point of this disclosure, solves the second technical problem mentioned in the background art: "The lack of a verification method based on anti-counterfeiting codes leads to low efficiency and reliability of verification results from log queries." The factors causing low verification efficiency and reliability are as follows: the lack of a verification method based on anti-counterfeiting codes. Solving these factors can improve the efficiency and reliability of verification results. To achieve this effect, this disclosure introduces the aforementioned verification method, which compares the questions and answers in the screenshot provided by the user with the actual questions and answers to verify whether the screenshot has been tampered with. If the screenshot has been tampered with, it can be further determined whether the question, the answer, or both have been tampered with. Therefore, staff can be informed of the verification results regarding the authenticity and completeness of the question-and-answer screenshot and relevant staff can be notified.
[0060] from Figure 3 It can be seen from this that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 3 The flowchart 300 of the anti-counterfeiting code generation method in some corresponding embodiments embodies extended steps for verifying the authenticity and completeness of question-and-answer screenshots. Therefore, the authenticity and completeness of question-and-answer screenshots can be verified by comparing the anti-counterfeiting codes, thereby improving the efficiency and reliability of the verification results.
[0061] The following is for reference. Figure 4 It illustrates electronic devices suitable for implementing some embodiments of the present disclosure (such as...). Figure 1 The diagram shows the structure of the computing device 101)400. Figure 4The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0062] like Figure 4 As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of electronic device 400. Processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0063] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 4 Each box shown can represent a device or multiple devices as needed.
[0064] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined above in the methods of some embodiments of this disclosure.
[0065] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0066] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0067] The aforementioned computer-readable medium may be included within the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: generate a question answer in response to receiving a user question sent by a user terminal; encrypt the user question and question answer to obtain encrypted user question codes and encrypted question answer codes; generate an anti-counterfeiting code based on the encrypted user question codes and encrypted question answer codes; and send the question answer and anti-counterfeiting code to the user terminal, causing the user terminal to display the question answer and the rendering result corresponding to the anti-counterfeiting code in the chat interface.
[0068] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0069] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0070] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0071] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for generating anti-counterfeiting codes, comprising: In response to receiving a user question from a user terminal, generate an answer to the question; The user question and the answer are encrypted to obtain encrypted user question code and encrypted answer code; Based on the encrypted encoding of the user's question and the encrypted encoding of the question's answer, an anti-counterfeiting code is generated; 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 the rendering result corresponding to the anti-counterfeiting code in the chat interface; In response to receiving a screenshot of a question and answer, the screenshot user's question and answer are extracted from the screenshot, wherein the screenshot includes the screenshot user's question, the screenshot answer, and the screenshot anti-counterfeiting code rendering result; Based on the screenshot anti-counterfeiting code rendering result, generate the screenshot anti-counterfeiting code; The screenshot user question and the screenshot question answer are encrypted respectively to obtain the encrypted code of the screenshot user question and the encrypted code of the screenshot question answer; Based on the encrypted code of the user's question and the encrypted code of the answer to the question in the screenshot, a question-and-answer anti-counterfeiting code is generated; In response to the fact that the screenshot anti-counterfeiting code and the question-and-answer anti-counterfeiting code are the same, a first prompt message indicating that the screenshot user question and the screenshot question answer in the question-and-answer screenshot have not been tampered with is sent to the associated display device.
2. The method according to claim 1, wherein, The generation of the question answer includes: The user's question is input into the intent recognition model to obtain the answer to the question.
3. The method according to claim 1, wherein, The encryption process for the user's question and the question's answer includes: The user question and the answer are encrypted using a key to obtain the encrypted user question code and the encrypted answer code.
4. The method according to claim 1, wherein, Before generating the anti-counterfeiting code, the method further includes: Based on the first location information, a first preset number of characters are extracted from the encrypted user question code to obtain a first string; Based on the second location information, a second preset number of characters are extracted from the encrypted code of the question answer to obtain a second string; The first string is converted to obtain the third string; The second string is converted to obtain the fourth string.
5. The method according to claim 4, wherein, The generation of anti-counterfeiting codes includes: The third string and the fourth string are concatenated to obtain the anti-counterfeiting code.
6. The method according to claim 1, wherein, The method further includes: In response to the fact that the fifth string in the screenshot anti-counterfeiting code corresponding to the third position information is different from the sixth string in the question-and-answer anti-counterfeiting code corresponding to the third position information, a second prompt message indicating that the screenshot user's question in the question-and-answer screenshot has been tampered with is sent to the display device; In response to the fact that the seventh string corresponding to the fourth position information in the screenshot anti-counterfeiting code is different from the eighth string corresponding to the fourth position information in the question-and-answer anti-counterfeiting code, a third prompt message indicating that the screenshot question answer in the question-and-answer screenshot has been tampered with is sent to the display device; In response to the fact that the fifth string is different from the sixth string, and that the seventh string is different from the eighth string, a fourth prompt message indicating that the screenshot user's question and the screenshot question answer in the question-and-answer screenshot have been tampered with is sent to the display device.
7. The method according to claim 6, wherein, The step of sending a fourth prompt message to the display device, indicating that both the user's question and the answer in the screenshot of the question and answer have been tampered with, includes: Control the associated alarm devices to perform alarm operations corresponding to the fourth prompt information.
8. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 7.
9. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.