CN110766114A - Terminal and method for generating two-dimensional code online - Google Patents

Terminal and method for generating two-dimensional code online Download PDF

Info

Publication number
CN110766114A
CN110766114A CN201911017258.1A CN201911017258A CN110766114A CN 110766114 A CN110766114 A CN 110766114A CN 201911017258 A CN201911017258 A CN 201911017258A CN 110766114 A CN110766114 A CN 110766114A
Authority
CN
China
Prior art keywords
data
module
terminal
control
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911017258.1A
Other languages
Chinese (zh)
Other versions
CN110766114B (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201911017258.1A priority Critical patent/CN110766114B/en
Publication of CN110766114A publication Critical patent/CN110766114A/en
Application granted granted Critical
Publication of CN110766114B publication Critical patent/CN110766114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device

Abstract

The invention discloses a terminal and a method for generating a two-dimensional code on line, and belongs to the field of information security. The terminal receives information input by a user through the input module, controls the MCU module to organize and generate first request message data, sends the first request message data to the server, receives request response data returned by the server through the communication module, controls the MCU module to analyze the request response data to obtain two-dimensional code generation data, and codes and displays the two-dimensional code through the display module. The method provided by the invention can display the two-dimensional code generated on line on the terminal, avoid the behavior of deceiving the user when other people input information, and ensure the safety of the operation process.

Description

Terminal and method for generating two-dimensional code online
Technical Field
The invention relates to the field of information security, in particular to a terminal and a method for generating a two-dimensional code online.
Background
Two-dimensional code payment is a new generation wireless payment scheme based on account system, becomes the mastery force of mobile payment, and is widely popularized in the payment field by means of fashionable and convenient customer experience. Usually, a merchant compiles account numbers, commodity information and the like into a two-dimensional code, and a user can realize payment settlement with the merchant account by scanning the two-dimensional code through a mobile phone client. However, because many two-dimensional codes are static, illegal persons use the intelligent consumption habit of people to break the law. Recently, people who see news reports for many times replace the two-dimensional code on the shared bicycle and remit deposit into a private account; the trojan is implanted into the static two-dimensional code, the user monitors theft after scanning, and the like, meanwhile, a central bank starts to control the payment amount of the static bar code, all static bar code scanning payment single-day limit is set to be 500 yuan, the problems occur above, no matter whether the merchant or the user is subjected to benefit loss, at present, some schemes for generating the dynamic two-dimensional code offline are generated aiming at the problems existing in the static two-dimensional code, however, the dynamic two-dimensional code offline needs the user to scan the code and input the amount of money on electronic equipment such as a mobile phone, and the behavior of deceiving the merchant by the user can occur in the case.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a terminal and a method for generating a two-dimensional code online.
The method for generating the two-dimensional code online provided by the embodiment of the invention comprises the following steps:
the terminal is connected with the network through a communication module;
the terminal receives information input by a user through an input module;
the terminal control MCU module acquires information input by a user and received by the input module, acquires data elements in the MCU module, organizes and generates first combined data according to the acquired information input by the user and the acquired data elements, generates first request message data according to the first combined data, and sends the first request message data to the server through the communication module;
the terminal receives first response message data returned by the server through the communication module, controls the MCU module to verify the first response message data, and acquires second combined data in the first response message data if the verification is passed;
the terminal control MCU module judges the verification result of the server on the first request message in the second combined data, and if the verification result is successful, the two-dimensional code display data in the second combined data is obtained;
and the terminal control MCU module encodes the two-dimensional code display data to obtain encoded data, and the two-dimensional code is displayed through the display module according to the encoded data.
The generating of the first request message data according to the first combined data specifically includes: the terminal control MCU module calculates the first combined data to obtain a first abstract value, signs the first abstract value through a preset algorithm by using a terminal private key to obtain first signature data, and combines the first combined data and the first signature data to obtain first request message data.
The acquiring of the data elements in the MCU module specifically comprises: acquiring a data element and current time prestored in the MCU module;
specifically, generating first combined data according to the acquired information input by the user and the acquired data metadata organization, specifically: and according to a preset data element combination form, generating first combination data according to the acquired information input by the user, the current time and the pre-stored data element organization.
Wherein, the terminal control MCU module also includes after obtaining the information of user input that the input module receives: the terminal control MCU module judges whether the information input by the current user is input for the first time in the day, if so, the terminal control MCU module generates update public key certificate request data, and organizes the update public key certificate request data, the information input by the user, the current time and prestored data elements according to a preset data element combination form to generate first combination data.
Wherein, after the encoded data is displayed by the display module, the method further comprises: the terminal control MCU module generates request query data and sends the request query data to the server through the communication module.
Wherein, after sending the request inquiry data to the server through the communication module, the method further comprises: the terminal receives query response data returned by the server through the communication module, the terminal controls the MCU module to analyze the query response data to obtain an operation result code, whether user operation is completed is judged through the operation result code, the completion of the operation is prompted through the display module if the user operation is completed, whether preset query interval time meets the condition is judged if the user operation is not completed, whether the preset query interval time meets the condition is repeatedly judged if the user operation is not completed, and the request query data is sent to the server through the communication module if the user operation is not completed.
Optionally, after the preset query interval time is judged to meet the condition, the method further includes: and judging whether the accumulated query times exceed a preset query termination time, if so, prompting operation failure through a display module, and if not, sending the query request data to the server through a communication module.
Optionally, when the terminal control MCU module verifies that the first response message data fails, the terminal control MCU module prompts an operation failure through the display module.
Optionally, when the terminal control MCU module determines that the verification result of the server on the first request packet in the second combined data is a failure, the terminal control MCU module prompts the operation failure through the display module.
The terminal for generating the two-dimensional code online provided by the embodiment of the invention comprises:
the communication module is used for connecting a network;
the input module is used for receiving information input by a user;
the control module is used for controlling the MCU module;
the MCU module is used for acquiring the information input by the user and received by the input module under the control of the control module, acquiring data elements, organizing and generating first combined data according to the acquired information input by the user and the acquired data elements, and generating first request message data according to the first combined data;
the communication module is also used for sending the first request message data generated by the MCU module to the server;
the communication module is also used for receiving first response message data returned by the server;
the MCU module is also used for verifying the first response message data under the control of the control module, and acquiring second combined data in the first response message data if the verification is passed;
the MCU module is also used for judging the verification result of the server in the second combined data to the first request message under the control of the control module, and acquiring the two-dimensional code display data in the second combined data if the verification result is successful;
the MCU module is also used for coding the two-dimensional code display data under the control of the control module to obtain coded data, and the two-dimensional code is displayed through the display module according to the coded data;
and the display module is used for displaying the two-dimensional code according to the coded data obtained by the coding of the MCU module.
The MCU module comprises a first generation unit;
the first generation unit is used for calculating the first combined data to obtain a first abstract value under the control of the control module, signing the first abstract value by using a terminal private key through a preset algorithm to obtain first signature data, and combining the first combined data and the first signature data to obtain first request message data.
The MCU module comprises a first acquisition unit, a second acquisition unit and a second generation unit;
the first acquisition unit is used for acquiring the information input by the user and received by the input module under the control of the control module;
the second acquisition unit is used for acquiring the pre-stored data element and the current time under the control of the control module;
and the second generating unit is used for organizing and generating the first combined data according to the information input by the user and acquired by the first acquiring unit, the pre-stored data elements acquired by the second acquiring unit and the current time under the control of the control module and according to a preset data element combination form.
The MCU module also comprises a first judging unit and a third generating unit;
the first judging unit is used for judging whether the information input by the current user is input for the first time in the current day under the control of the control module after the first acquiring unit acquires the information input by the user;
and the third generating unit is used for generating updating public key certificate request data under the control of the control module when the first judging unit judges that the information input by the current user is input for the first time in the day, and organizing the updating public key certificate request data, the information input by the user, the current time acquired from the timer and the acquired prestored data elements into first combination data according to a preset data element combination form.
The MCU module comprises a fourth generation unit;
the fourth generating unit is used for generating request query data under the control of the control module after the display module displays the two-dimensional code;
and the communication module is further used for sending the request query data generated by the fourth generation unit to the server.
The MCU module also comprises an analysis unit, a third acquisition unit, a second judgment unit and a third judgment unit;
the communication module is also used for receiving query response data returned by the server;
the analysis unit is used for analyzing the query response data received by the communication module under the control of the control module;
the third acquisition unit is used for acquiring the operation result code from the query response data analyzed by the analysis unit under the control of the control module;
the second judging unit is used for judging whether the user operation is finished or not according to the operation result code acquired by the third acquiring unit under the control of the control module;
the display module is also used for displaying a prompt of operation completion when the second judging unit judges that the user operation is completed;
a third judging unit, configured to, when the second judging unit judges that the user operation is not completed, judge whether a preset query interval time meets a condition under the control of the control module; when the preset query interval time is judged not to meet the condition, repeatedly judging whether the preset query interval time meets the condition or not;
and the communication module is further used for sending the query request data generated by the fourth generating unit to the server when the third judging unit judges that the preset query interval time meets the condition.
The MCU module also comprises a fourth judgment unit;
the fourth judging unit is used for judging whether the accumulated query times exceed the preset query termination times or not under the control of the control module when the third judging unit judges that the preset query interval time meets the condition;
the display module is also used for displaying a prompt of operation failure when the fourth judging unit judges that the accumulated query times exceed the preset query termination times;
and the communication module is further used for sending the query request data generated by the fourth generating unit to the server when the fourth judging unit judges that the accumulated query times do not exceed the preset query termination times.
The display module is further used for displaying a prompt of operation failure when the MCU module verifies that the first response message data fails.
The display module is further used for displaying a prompt of operation failure when the MCU module judges that the verification result of the server on the first request message in the second combined data is failure.
The technical scheme provided by the embodiment of the invention has the beneficial effects that: the information input by a user is received through an input module of the terminal, the MCU module is controlled to organize and generate first request message data, the first request message data are sent to the server, request response data returned by the server are received through the communication module, the MCU module is controlled by the terminal to analyze the request response data to obtain two-dimensional code generation data, and codes are displayed on the two-dimensional code through the display module. The method provided by the invention can display the two-dimensional code generated on line on the terminal, avoid the behavior of deceiving the user when other people input information, and ensure the safety of the operation process.
Drawings
Fig. 1 is a structure diagram of a terminal for generating a two-dimensional code online according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a method for generating a two-dimensional code on line according to embodiment 2 of the present invention;
fig. 3 is a flowchart of a method for generating a two-dimensional code on line according to embodiment 3 of the present invention;
fig. 4 is a block diagram of a terminal for generating a two-dimensional code online according to embodiment 4 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
An embodiment of the present invention provides a terminal for generating a two-dimensional code online, as shown in fig. 1, where the terminal 100 includes: an input module 101, an MCU module 102, a communication module 103, a power management module 104 and a display module 105;
the input module 101 is connected with the MCU module 102 and is used for receiving information input by a user;
the MCU module 102 is connected to the input module 101, the communication module 103, the power management module 104, and the display module 105, and is configured to detect information input by the input module, receive a connection status of the communication module 103, and output information to be displayed to the display module;
the communication module 103 is connected with the MCU module 102 and the power management module 104, and is configured to receive power supplied by the power management module 104 and is further configured to connect to a network;
the power management module 104 is connected with the MCU module 102, the communication module 103 and the display module 105 and used for supplying power;
the display module 105 is connected to the MCU module 102 and the power management module 104, and is configured to display information that needs to be displayed and is output by the MCU module 102.
The input module 101 includes: a keyboard;
MCU module 102 includes: the control chip, the buzzer, the indicator light, the crystal oscillator and the peripheral circuit thereof;
the communication module 103 includes: a mobile communication module and a wireless communication module;
the display module 105 includes: a display screen;
the power management module 104 includes: the power supply comprises a USB interface, a power supply interface, a first power supply chip, a second power supply chip, a third power supply chip and a fourth power supply chip;
specifically, the first power chip is connected to the communication module 103, and is specifically configured to supply power to a mobile communication module in the communication module 103; the second power supply chip is connected with the communication module 103 and is specifically used for supplying power to the wireless communication module in the communication module 103; the third power supply chip is connected with the MCU module 102, and is specifically configured to supply power to the MCU module 102; the fourth power chip is connected to the display module 105, and is specifically configured to supply power to the display module 105.
Example two
An embodiment of the present invention provides a method for generating a two-dimensional code online, as shown in fig. 2, the method includes:
the terminal is connected with the network through a communication module;
the terminal receives information input by a user through an input module;
the terminal control MCU module acquires information input by a user and received by the input module, acquires data elements in the MCU module, organizes and generates first combined data according to the acquired information input by the user and the acquired data elements, generates first request message data according to the first combined data, and sends the first request message data to the server through the communication module;
the terminal receives first response message data returned by the server through the communication module, controls the MCU module to verify the first response message data, and acquires second combined data in the first response message data if the verification is passed;
the terminal control MCU module judges the verification result of the server on the first request message in the second combined data, and if the verification result is successful, the two-dimensional code display data in the second combined data is obtained;
and the terminal control MCU module encodes the two-dimensional code display data to obtain encoded data, and the two-dimensional code is displayed through the display module according to the encoded data.
In this embodiment, the generating of the first request message data according to the first combined data specifically includes: the terminal control MCU module calculates the first combined data to obtain a first abstract value, signs the first abstract value through a preset algorithm by using a terminal private key to obtain first signature data, and combines the first combined data and the first signature data to obtain first request message data.
In this embodiment, optionally, the obtaining of the data element in the MCU module specifically includes: acquiring a data element and current time prestored in the MCU module;
optionally, generating first combination data according to the acquired user-input information and the acquired data meta-organization, specifically: and according to a preset data element combination form, generating first combination data according to the acquired information input by the user, the current time and the pre-stored data element organization.
In this embodiment, after the terminal control MCU module obtains the information input by the user received by the input module, the method further includes: the terminal control MCU module judges whether the information input by the current user is input for the first time in the day, if so, the terminal control MCU module generates update public key certificate request data, and organizes the update public key certificate request data, the information input by the user, the current time and prestored data elements according to a preset data element combination form to generate first combination data.
In this embodiment, after the encoded data is displayed on the two-dimensional code by the display module, the method further includes: the terminal control MCU module generates request query data and sends the request query data to the server through the communication module.
In this embodiment, after sending the query request data to the server through the communication module, the method further includes: the terminal receives query response data returned by the server through the communication module, the terminal controls the MCU module to analyze the query response data to obtain an operation result code, whether user operation is completed is judged through the operation result code, the completion of the operation is prompted through the display module if the user operation is completed, whether preset query interval time meets the condition is judged if the user operation is not completed, whether the preset query interval time meets the condition is repeatedly judged if the user operation is not completed, and the request query data is sent to the server through the communication module if the user operation is not completed.
Optionally, after the determining that the preset query interval time meets the condition, the method further includes: and judging whether the accumulated query times exceed a preset query termination time, if so, prompting operation failure through a display module, and if not, sending the query request data to the server through a communication module.
In this embodiment, when the terminal control MCU module verifies that the first response packet data fails, the terminal control MCU module prompts an operation failure through the display module.
In this embodiment, when the terminal control MCU module determines that the verification result of the first request packet by the server in the second combined data is a failure, the terminal control MCU module prompts an operation failure through the display module.
EXAMPLE III
The third embodiment of the invention provides another method for generating a two-dimensional code online; the method is suitable for a system comprising a terminal and a server, wherein the terminal comprises an input module, an MCU module, a communication module, a power management module and a display module;
as shown in fig. 3, the method includes:
101, a terminal is powered on and started through a power management module;
102, connecting the terminal with a network through a communication module;
in this embodiment, the method for connecting the terminal to the network through the communication module includes: the terminals are connected through a mobile communication module in the communication module and can also be connected through a wireless communication module in the communication module;
specifically, the terminal performs network connection according to a connection mode set in default setting;
optionally, when the connection mode in the default setting cannot be connected to the network, the terminal prompts a user that the network cannot be connected through the display module, and the user can set through the input module and select other network connection modes;
for example, the connection mode set in the default setting of the terminal is wireless communication connection, when the wireless communication cannot be connected, the terminal display module displays that the network cannot be connected, and the user resets the network connection mode to mobile communication connection through the key module in the input module.
103, the terminal receives information input by a user through an input module;
104, the terminal control MCU module acquires the information input by the user and received by the input module, acquires data elements in the MCU module, and organizes and generates first combined data according to the acquired information input by the user and the acquired data elements;
in this embodiment, the obtaining the data element in the MCU module specifically includes: acquiring a data element and current time prestored in the MCU module;
optionally, the current time may be obtained by obtaining a timer in the MCU module;
specifically, generating first combined data according to the acquired information input by the user and the acquired data metadata organization, specifically: organizing the acquired information input by the user, the current time and the pre-stored data elements according to a preset data element combination form to generate first combination data;
optionally, the method further includes, after the terminal control MCU module obtains the information input by the user and received by the input module: the terminal control MCU module judges whether the information input by the current user is the information input for the first time in the current day, if so, the terminal control MCU module generates updating public key certificate request data, and organizes the updating public key certificate request data, the acquired information input by the user, the current time and pre-stored data elements to generate first combination data according to a preset data element combination form;
specifically, the information input by the user acquired by the MCU module includes money information;
the MCU module acquires the data elements prestored in the memory thereof and comprises the following steps: version number, access type, coding mode, certificate ID, transaction type, transaction subclass, product type, channel type, access mechanism code, merchant order number, payment timeout time, transaction currency, equipment serial number, transaction notification address and signature method;
optionally, the data elements pre-stored in the memory of the MCU module are written by a production tool before the terminal leaves the factory;
optionally, in a preset data element combination form, identifiers corresponding to amounts and data elements are represented by key1, key2 and key3 … …, corresponding values thereof are represented by value1, value2 and value3 … …, and data element equations are represented by key 1-value 1, key 2-value 2 and key 3-value 3 … …;
preferably, the preset data element combination form is specifically: arranging all data element equations according to the first letter sequence of the data element identification key, and splicing and combining symbols & serving as connectors to obtain first combined data;
for example, the data element is an access type, the corresponding identifier key1 is accessType, and the corresponding value1 is: 0, the data element equation is: accessType is 0;
the data element is a product type, the corresponding identification key2 is bizType, and the corresponding value2 is: 000000, the data element equation is: bizType 000000;
the data element is a certificate ID, the corresponding identification key3 is certId, and the corresponding value3 is: 68759663125, the data element equation is: certId 68759663125;
the data element is a channel type, the corresponding identification key4 is a channelType, and the corresponding value4 is: 08, the data element equation is: channelType is 08;
the data element is transaction currency, its corresponding identifier key5 is currencyCode, and its corresponding value5 is: 156, the data element equation is: currencyCode 156;
the data element is in an encoding mode, the corresponding identification key6 is encoding, and the corresponding value6 is: UTF-8, data element equation: encoding ═ UTF-8;
the data element is a merchant code, the corresponding identification key7 is merId, and the corresponding value7 is: 777290058110048, the data element equation is: merId 777290058110048;
the data element is a merchant order number, which corresponds to the identifier key8 as orderId representation, and the value8 is: FT20190718134500, data element equation is: orderId ═ FT 20190718134500;
the data element is version number, the corresponding identification key9 is version, and the corresponding value9 is: 5.1.0, the data element equation is: version 5.1.0;
the data element is a transaction type, which corresponds to the identification key10 being txnType and the value10 being: 01, the data element equation is: txnType ═ 01;
the data element is a transaction subclass, the corresponding identification key 11 is txnSubType, and the corresponding value11 is: 07, the data element equation is: txnSubType ═ 07;
the data element is the order sending time, the corresponding identifier key12 is txttime, and the corresponding value12 is: 20181130173803, the data element equation is: txnTime 20181130173803;
the data element is a transaction notification address, the corresponding identification key13 is back Url, and the corresponding value13 is: the data element equation is: bturl ═ http://222.222.222.222: 8080/ACPSampie _ QRC/backRcvResponse;
the data element is a signature method, the corresponding identifier key14 is signMethod, and the corresponding value14 is: 01, the data element equation is: signMethod ═ 01;
the data element is the transaction amount, which corresponds to the identification key15 as txnAmt, which corresponds to the value15 as: 1200, the data element equation is: txnAmt 1200;
for example, according to a preset data element combination form, organizing the data elements to generate first combination data is as follows: the accessType 0& backUrl http://222.222.222.222: 8080/ACPSampie _ QRC/backRcvResponse & bizType 000000& certId 68759663125& channelType 08& currencyCode 156& encoding UTF-8& merId 777290058110048& orderId FT20190718134500& signmenthod 01& txnAmt 1200& txSubType 07& txn 20190718160050& txnType 01& version 5.1.0.
Preferably, the preset data element combination form can also be: json format, identification of amount and data element correspondence is represented by key1, key2, key3 … …, and corresponding values are represented by value1, value2, value3 … …, and data element equations are represented by { "key1": value1"," key2": value2", … … };
for example, according to a preset data element combination form, organizing the data elements to generate first combination data is as follows: { "Message" { "Version": V3.0.0"," Format ": JSON", "Merchant" { "ECMerchant type": "EBUS", "Merchant ID": 103885024990759 "}", TrxRequest "{" TrxType ": AliPayOrderReq", "PayType": 9"," PaymetLinkType ": 1", "ReceiveAccount" "," ReceiveAccName "", "NotifyType": 0"," ResultNotnotifyURL ": http:/127.0.1/Merchant. origin. aspx", "Merchant elements": 36677 ": OrerDartNo": 369 "", "BreakurtC" "," European ": 367" "," European "-" European ": 367", "No" "," European Type "-" USA ": 367" - "No", "MaritsType": 367 ": No", "Merchant": 367 ": 19": 3610 ": DartNo", "Merchant": 367 ": 3610" -, "Merchant" - "European Type" - "No": 3625 "-" European Type "-" No "-" European ": 3625" -, "European" - "No" - "European Type" - "European": 3625 "-" No "-" European ": 3625" - "No" - "," European ": 3625" - "European" - "," European "-" No "-, "TimeoutExpress": 2h "," LimitPay ": no _ credit", "OrderItems": [ ] } }.
105, calculating the first combined data generated by the organization by the terminal control MCU module to obtain a first abstract value;
in this embodiment, the algorithm used by the MCU module to calculate the first combined data generated by the organization to obtain the first digest value is a hash algorithm, for example, SHA-256;
for example, the first combined data generated by the organization is: the accessType 0& backUrl http://222.222.222.222: 8080/ACPSampie _ QRC/backRcvResponse & bizType 000000& certId 68759663125& channelType 08& currencyCode 156& encoding UTF-8& merId 777290058110048& orderId FT20190718134500& signmenthod 01& txnAmt 1200& txSubType 07& txn 20190718160050& txnType 01& version 5.1.0.
106, the terminal control MCU module signs the first abstract value by using a terminal private key through a preset algorithm to obtain first signature data;
in this embodiment, the preset algorithm specifically includes: RSA algorithm;
optionally, the terminal private key may be imported by a production tool before leaving a factory, or may be generated by the terminal itself, wherein the public key corresponding to the terminal private key is handed to the payment mechanism and stored in the corresponding server side after leaving the factory;
for example, the first signature data obtained by signature is: signatur ═ hxaTNkpJQEfOZF1jjc1O/fjy// x1NHFjz0biys42 adxravwmaxxctdbwpy 0/3AFWX2XUE04 nagwx 7xi5lYatE91XYzj +01iokn 1yN49WHP +6DugkCa 5/qjfhdiwxjjdjjdt 7HMpBH3L0 kbbflutcl 0vX12xRSI3WTjNwR5 e/3878K 7IvDFGL1e8 pgodqqqgzg 9 lre 0 ihysokhav/75 qqu 6/duikq39tqqtde 7 zezezye 0 zdhvdsvqjd 6 wvsqjd 9/8.
Step 107, the terminal control MCU module combines the first combination data and the first signature data to obtain first request message data;
in this embodiment, combining the first combination data and the first signature data specifically includes: sequentially splicing the first combined data and the first signature data to obtain first request message data;
for example, the obtained first request message data is: the accessType ═ 0& backUrl ═ http% 3A% & 2F%. 2 567% >, 3A 8080% & 2FACPSAmple _ QRC% & bibType ═ 000000& certId ═ 68759663125& channlType ═ 08& currentCode & 156& encoding & UTF-8& merId & orderId & FT 201907134500 & nMethethod & 01& signature & axTNkJpJJQfQfQfQF 1O% & 2 FfjyFjyFyFyFgQfQFgQFgQFgQFgQFgQFgQFgQFgQFgQFgQFgQFgQFgQFgQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQfQ.
Step 108, the terminal control MCU module transmits the first request message to the communication module, and the communication module sends the first request message data to the server according to the connected network protocol;
in this embodiment, after the terminal sends the first request packet data to the server, the method further includes: the server verifies the received first request message data, generates first response message data after verification, and sends the first response message data to the terminal control MCU module through the communication module;
specifically, the server verifies the received first request message data, and if the server verifies successfully, first response message data is generated;
the specific steps of the server generating the first response message data are as follows: the server generates second combined data containing the verification result and the two-dimension code display data according to the first request message data, signs the second combined data through a preset algorithm by using a server private key to obtain second signature data, and combines the second combined data and the second signature data to obtain first response message data.
The preset algorithm specifically comprises the following steps: RSA algorithm;
for example, the second combined data generated by the server is: 000000& txnSubType ═ 07& orderId ═ FT20190718134500& txnttype ═ 01& encoding ═ UTF-8& version ═ 5.1.0& accessType ═ 0& qrCode ═ https:// qr.95516.com/00010001/01115422340918149858663482229319& txintime ═ 20190718144626& respMsg ═ success [0000000] & merld ═ 777290058110048& signdisplaying ═ 01& respCode ═ 00;
the second signature data is: signature ═ MtKdAXw8Z7 gmvccxaxexeyejp 5y + EhJzLOmSc// JOPedoQVPSWnwK1yjKT0pTmwXML7cjEKbaTAaD/tXc pOyUB1qeqYOQ52TfN8 njikesa 9M5S3 jyrsmxnfjz 2UA6gKd WJ2 vpkhdfgefxk 1jHxz081EYq rtlclagthqnbuchrcuo 8+ owocnn 5/gojarsya 6w8cwYDM20 ugqc 3jx4 jjp 3 zoHu/fqksvqnknptpnp MMv naxemjef 0 qkayjvqkaqzakf 3 hgqkawqkawqkawqvqvqvqvqvqvqvqvqvqvkf 9 q 3 vqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvq;
the first response packet data is: 000000& txnSubType ═ 07& orderId ═ FT20190718134500& txnntype ═ 01& encoding ═ UTF-8& version ═ 5.1.0& accessType ═ 0& qrCode ═ https:// qr.95516.com/00010001/01115422340918149858663482229319& txintime ═ 20190718144626& respMsg ═ 0000000 [ (. 0000000] & merld [ (. 777290058110048& signhoetd [ (. 01& respc [ - ] & ign [ - ]
MIIEQzCCAyugAwIBAgIFEBJJZVgwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMC
Q04xMDAuBgNVBAoTJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhv
cml0eTEXMBUGA1UEAxMOQ0ZDQSBURVNUIE9DQTEwHhcNMTcxMTAxMDcyNDA4WhcN
MjAxMTAxMDcyNDA4WjB3MQswCQYDVQQGEwJjbjESMBAGA1UEChMJQ0ZDQSBPQ0Ex
MQ4wDAYDVQQLEwVDVVBSQTEUMBIGA1UECxMLRW50ZXJwcmlzZXMxLjAsBgNVBAMU
JTA0MUBaMjAxNy0xMS0xQDAwMDQwMDAwOlNJR05AMDAwMDAwMDEwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDDIWO6AESrg+34HgbU9mSpgef0sl6avr1d
bD/IjjZYM63SoQi3CZHZUyoyzBKodRzowJrwXmd+hCmdcIfavdvfwi6x+ptJNp9d
EtpfEAnJk+4quriQFj1dNiv6uP8ARgn07UMhgdYB7D8aA1j77Yk1ROx7+LFeo7rZ
Ddde2U1opPxjIqOPqiPno78JMXpFn7LiGPXu75bwY2rYIGEEImnypgiYuW1vo9UO
G47NMWTnsIdy68FquPSw5FKp5foL825GNX3oJSZui8d2UDkMLBasf06Jz0JKz5AV
blaI+s24/iCfo8r+6WaCs8e6BDkaijJkR/bvRCQeQpbX3V8WoTLVAgMBAAGjgfQw
gfEwHwYDVR0jBBgwFoAUz3CdYeudfC6498sCQPcJnf4zdIAwSAYDVR0gBEEwPzA9
BghggRyG7yoBATAxMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmNmY2EuY29tLmNu
L3VzL3VzLTE0Lmh0bTA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vdWNybC5jZmNh
LmNvbS5jbi9SU0EvY3JsMjQ4NzIuY3JsMAsGA1UdDwQEAwID6DAdBgNVHQ4EFgQU
mQQLyuqYjES7qKO+zOkzEbvdFwgwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUF
BwMEMA0GCSqGSIb3DQEBBQUAA4IBAQAujhBuOcuxA+VzoUH84uoFt5aaBM3vGlpW
KVMz6BUsLbIpp1ho5h+LaMnxMs6jdXXDh/du8X5SKMaIddiLw7ujZy1LibKy2jYi
YYfs3tbZ0ffCKQtv78vCgC+IxUUurALY4w58fRLLdu8u8p9jyRFHsQEwSq+W5+bP
MTh2w7cDd9h+6KoCN6AMI1Ly7MxRIhCbNBL9bzaxF9B5GK86ARY7ixkuDCEl4XCF
JGxeoye9R46NqZ6AA/k97mJun//gmUjStmb9PUXA59fR5suAB5o/5lBySZ8UXkrI
pp/iLT8vIl1hNgLh0Ghs7DBSx99I+S3VuUzjHNxL6fGRhlix7Rb8
-----ENDCERTIFICATE-----&signature=MtKdAXw8Z7GMvCxaXeYeseJP5y+EhJzLOmSc//JOPedoQVPSWnwK1yjKT0pTmwXML7cjEKbaTAaD/tXc9pOyUB1qeqYOQ52TfN8nIKEssa9M5S3JYRsmXnFTJz2UA6gKd90WJ2VpkHdFgeXK1jHxz081EYq0rTzLCLAgtHqnbuhrClCUO8+oqWoBIcN5/GoJARsmyA6w8cwYDM20ugIsQC3jx4nnJp3zoHu/fE6NVtPKndptpOP6MMv3QiJaOhexemqKEF0JLo68jZ6VCMYhAXmS7o1kVJ37CHRdR7Hq4cOCGQn3cuNaJ0iC3KFaWAjWWS6qn3t8VAjeDYNEsZHGkA==。
Optionally, when the first request packet data received by the server includes the update public key certificate request data, the second combination data generated by the server according to the first request packet data further includes the server public key certificate.
Step 109, the terminal receives the first response message data returned by the server through the communication module, controls the MCU module to verify the first response message data, acquires the second combined data in the first response message data if the verification is successful, and prompts the operation failure through the display module if the verification is unsuccessful;
in this embodiment, the first response packet data includes second combination data and second signature data, and the second combination data includes: the server verifies the first request data message sent by the terminal and the two-dimensional code display data generated by the server;
the verification of the first response message data by the terminal control MCU module specifically comprises the following steps: the terminal control MCU module uses a public key stored by the terminal to check the first response message data through a preset algorithm;
optionally, the verifying the first response packet data by the terminal control MCU module further specifically includes: the terminal control MCU module acquires second combined data in the first response message data, acquires a server public key certificate in the second combined data, and checks the first response message data by using the server public key certificate through a preset algorithm;
optionally, if the current operation is a non-primary operation, the public key used by the terminal to check the signature is a public key issued by the server in the message response data in the current-day primary operation;
if the current operation is the first operation, the public key used by the terminal for signature verification is a public key which is stored by the terminal before the first operation in the current day and is issued by the server in the message response data, or a public key which is contained in the message response data which is received by the server in the first operation in the current day;
for example, the first response packet data specifically includes: 000000& txnSubType ═ 07& orderId ═ FT20190718134500& txnntype ═ 01& encoding ═ UTF-8& version ═ 5.1.0& accessType ═ 0& qrCode ═ https:// qr.95516.com/00010001/01115422340918149858663482229319& txintime ═ 20190718144626& respMsg ═ 0000000 [ (. 0000000] & merld [ (. 777290058110048& signhoetd [ (. 01& respc [ - ] & ign [ - ]
MIIEQzCCAyugAwIBAgIFEBJJZVgwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMC
Q04xMDAuBgNVBAoTJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhv
cml0eTEXMBUGA1UEAxMOQ0ZDQSBURVNUIE9DQTEwHhcNMTcxMTAxMDcyNDA4WhcN
MjAxMTAxMDcyNDA4WjB3MQswCQYDVQQGEwJjbjESMBAGA1UEChMJQ0ZDQSBPQ0Ex
MQ4wDAYDVQQLEwVDVVBSQTEUMBIGA1UECxMLRW50ZXJwcmlzZXMxLjAsBgNVBAMU
JTA0MUBaMjAxNy0xMS0xQDAwMDQwMDAwOlNJR05AMDAwMDAwMDEwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDDIWO6AESrg+34HgbU9mSpgef0sl6avr1d
bD/IjjZYM63SoQi3CZHZUyoyzBKodRzowJrwXmd+hCmdcIfavdvfwi6x+ptJNp9d
EtpfEAnJk+4quriQFj1dNiv6uP8ARgn07UMhgdYB7D8aA1j77Yk1ROx7+LFeo7rZ
Ddde2U1opPxjIqOPqiPno78JMXpFn7LiGPXu75bwY2rYIGEEImnypgiYuW1vo9UO
G47NMWTnsIdy68FquPSw5FKp5foL825GNX3oJSZui8d2UDkMLBasf06Jz0JKz5AV
blaI+s24/iCfo8r+6WaCs8e6BDkaijJkR/bvRCQeQpbX3V8WoTLVAgMBAAGjgfQw
gfEwHwYDVR0jBBgwFoAUz3CdYeudfC6498sCQPcJnf4zdIAwSAYDVR0gBEEwPzA9
BghggRyG7yoBATAxMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmNmY2EuY29tLmNu
L3VzL3VzLTE0Lmh0bTA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8vdWNybC5jZmNh
LmNvbS5jbi9SU0EvY3JsMjQ4NzIuY3JsMAsGA1UdDwQEAwID6DAdBgNVHQ4EFgQU
mQQLyuqYjES7qKO+zOkzEbvdFwgwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUF
BwMEMA0GCSqGSIb3DQEBBQUAA4IBAQAujhBuOcuxA+VzoUH84uoFt5aaBM3vGlpW
KVMz6BUsLbIpp1ho5h+LaMnxMs6jdXXDh/du8X5SKMaIddiLw7ujZy1LibKy2jYi
YYfs3tbZ0ffCKQtv78vCgC+IxUUurALY4w58fRLLdu8u8p9jyRFHsQEwSq+W5+bP
MTh2w7cDd9h+6KoCN6AMI1Ly7MxRIhCbNBL9bzaxF9B5GK86ARY7ixkuDCEl4XCF
JGxeoye9R46NqZ6AA/k97mJun//gmUjStmb9PUXA59fR5suAB5o/5lBySZ8UXkrI
pp/iLT8vIl1hNgLh0Ghs7DBSx99I+S3VuUzjHNxL6fGRhlix7Rb8
-----ENDCERTIFICATE-----&signature=MtKdAXw8Z7GMvCxaXeYeseJP5y+EhJzLOmSc//JOPedoQVPSWnwK1yjKT0pTmwXML7cjEKbaTAaD/tXc9pOyUB1qeqYOQ52TfN8nIKEssa9M5S3JYRsmXnFTJz2UA6gKd90WJ2VpkHdFgeXK1jHxz081EYq0rTzLCLAgtHqnbuhrClCUO8+oqWoBIcN5/GoJARsmyA6w8cwYDM20ugIsQC3jx4nnJp3zoHu/fE6NVtPKndptpOP6MMv3QiJaOhexemqKEF0JLo68jZ6VCMYhAXmS7o1kVJ37CHRdR7Hq4cOCGQn3cuNaJ0iC3KFaWAjWWS6qn3t8VAjeDYNEsZHGkA==。
Step 110, the terminal control MCU module judges the verification result of the server to the first request message in the second combined data, if the verification result is successful, the two-dimensional code display data in the second combined data is obtained, step 111 is executed, and if the verification result is failed, the display module prompts that the operation is failed;
in this embodiment, the verification result data is expressed by respcode, and if the corresponding value is 00, the verification is successful, and if the corresponding value is 11, the verification is failed.
And step 111, the terminal controls the MCU module to encode the two-dimensional code display data to obtain encoded data, and the two-dimensional code is displayed through the display module according to the encoded data.
In this embodiment, the terminal further includes, after displaying the two-dimensional code through the display module: the terminal control MCU module generates request query data and sends the request query data to the server through the communication module;
after the terminal sends the request query data to the server, the method further comprises the following steps: the terminal receives query response data returned by the server through the communication module, the terminal controls the MCU module to analyze the query response data to obtain an operation result code, whether user operation is finished or not is judged through the operation result code, the operation is prompted to be finished through the display module if the user operation is finished, whether preset query interval time meets the condition or not is judged if the user operation is not finished, whether the preset query interval time meets the condition or not is judged repeatedly if the user operation does not meet the condition, and if the user operation is met, query request data is sent to the server through the communication module;
optionally, after the determining that the preset query interval time meets the condition, the method further includes: and judging whether the accumulated query times exceed a preset query termination time, if so, prompting operation failure through a display module, and if not, sending the query request data to the server through a communication module.
For example, the preset query termination number is 3 times, and the preset query interval time is 60 seconds.
Optionally, the terminal further includes, after displaying the two-dimensional code through the display module: the terminal receives operation response data sent by the server through the communication module, judges whether the operation is completed or not according to the operation response data, and prompts the completion of the operation through the display module if the operation is completed, or prompts the failure of the operation through the display module if the operation is not completed.
The invention receives information input by a user through an input module of the terminal, controls the MCU to organize and generate first request message data, sends the first request message data to the server, receives request response data returned by the server through the communication module, and controls the MCU module to analyze the request response data to obtain two-dimensional code generation data and encode the two-dimensional code through the display module. The method provided by the invention can be used for displaying the two-dimensional code generated on line on the terminal, avoiding the behavior of deceiving the user when inputting information by others, ensuring the safety of the operation process, and inquiring the operation result on line without displaying an operation result interface by the user.
Example four
An embodiment of the present invention provides a terminal for generating a two-dimensional code online, and as shown in fig. 4, the terminal includes:
a communication module 11 for connecting a network;
an input module 12 for receiving information input by a user;
the control module 13 is used for controlling the MCU module;
the MCU module 14 is configured to, under the control of the control module 13, acquire information input by the user and received by the input module 12, acquire a data element, organize and generate first combination data according to the acquired information input by the user and the acquired data element, and generate first request message data according to the first combination data;
the communication module 11 is further configured to send the first request message data generated by the MCU module 14 to the server;
the communication module 11 is further configured to receive first response message data returned by the server;
the MCU module 14 is further configured to verify the first response packet data under the control of the control module 13, and obtain second combination data in the first response packet data if the verification is passed;
the MCU module 14 is further configured to determine, under the control of the control module 13, a verification result of the server for the first request packet in the second combined data, and if the verification result is successful, obtain two-dimensional code display data in the second combined data;
the MCU module 14 is further configured to encode the two-dimensional code display data under the control of the control module 13 to obtain encoded data, and display the two-dimensional code through the display module 15 according to the encoded data;
and the display module 15 is used for displaying the two-dimensional code according to the coded data obtained by the coding of the MCU module 14.
In the present embodiment, the MCU module 14 includes a first generation unit;
specifically, the first generating unit is configured to calculate the first combined data to obtain a first digest value under the control of the control module 13, sign the first digest value by using a terminal private key through a preset algorithm to obtain first signature data, and combine the first combined data and the first signature data to obtain first request packet data.
In this embodiment, the MCU module 14 includes a first acquiring unit, a second acquiring unit, and a second generating unit;
specifically, a first obtaining unit, configured to obtain, under the control of the control module 13, information input by the user and received by the input module 12;
specifically, the second obtaining unit is configured to obtain a pre-stored data element and a current time under the control of the control module 13;
specifically, the second generating unit is configured to, under the control of the control module 13, organize and generate the first combination data according to the information input by the user and acquired by the first acquiring unit, the pre-stored data elements and the current time, where the information is acquired by the second acquiring unit, according to a preset data element combination form.
In this embodiment, the MCU module 14 further includes a first determining unit and a third generating unit;
specifically, the first determining unit is configured to determine, under the control of the control module 13, whether the information input by the current user is first input in the current day after the first obtaining unit obtains the information input by the user;
specifically, the third generating unit is configured to generate, under the control of the control module 13, updated public key certificate request data when the first determining unit determines that the information input by the current user is first input in the current day, and organize, according to a preset data element combination form, the updated public key certificate request data, the information input by the user, the current time obtained from the timer, and the obtained pre-stored data element to generate first combination data.
In the present embodiment, the MCU module 14 includes a fourth generation unit;
specifically, the fourth generating unit is configured to generate the query-requesting data under the control of the control module 13 after the display module 15 displays the two-dimensional code;
specifically, the communication module 11 is further configured to send the request query data generated by the fourth generating unit to the server.
In this embodiment, the MCU module 14 further includes an analyzing unit, a third acquiring unit, a second determining unit, and a third determining unit;
specifically, the communication module 11 is further configured to receive query response data returned by the server;
specifically, the parsing unit is configured to parse, under the control of the control module 13, the query response data received by the communication module 11;
specifically, the third obtaining unit is configured to obtain an operation result code from the query response data analyzed by the analyzing unit under the control of the control module 13;
specifically, the second judging unit is configured to judge whether the user operation is completed according to the operation result code acquired by the third acquiring unit under the control of the control module 13;
specifically, the display module 15 is further configured to display a prompt indicating that the operation is completed when the second determination unit determines that the operation of the user is completed;
specifically, the third judging unit is configured to, when the second judging unit judges that the user operation is not completed, judge whether the preset query interval time meets the condition under the control of the control module; when the preset query interval time is judged not to meet the condition, repeatedly judging whether the preset query interval time meets the condition or not;
specifically, the communication module 11 is further configured to send the query request data generated by the fourth generating unit to the server when the third determining unit determines that the preset query interval time meets the condition.
In this embodiment, the MCU module 14 further includes a fourth determination unit;
specifically, the fourth judging unit is configured to, when the third judging unit judges that the preset query interval time meets the condition, judge whether the accumulated query frequency exceeds the preset query termination frequency under the control of the control module 13;
specifically, the display module 15 is further configured to display a prompt of operation failure when the fourth determining unit determines that the accumulated query frequency exceeds the preset query termination frequency;
specifically, the communication module 11 is further configured to send the query request data generated by the fourth generating unit to the server when the fourth determining unit determines that the accumulated query times does not exceed the preset query termination times.
In this embodiment, the display module 15 is further configured to display a prompt indicating that the operation fails when the MCU module 14 verifies that the first response message data fails.
In this embodiment, the display module 15 is further configured to display a prompt indicating that the operation fails when the MCU module 14 determines that the result of the verification of the first request packet by the server in the second combined data is a failure.
The terminal and the method for generating the two-dimensional code online provided by the invention are described in detail above, a specific example is applied in the description to explain the principle and the implementation of the invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (18)

1. A method for generating a two-dimensional code on line, the method comprising:
the terminal is connected with a network through a communication module;
the terminal receives information input by a user through an input module;
the terminal control MCU module acquires information input by a user and received by the input module, acquires data elements in the MCU module, organizes and generates first combined data according to the acquired information input by the user and the acquired data elements, generates first request message data according to the first combined data, and sends the first request message data to a server through the communication module;
the terminal receives first response message data returned by the server through the communication module, controls the MCU module to verify the first response message data, and acquires second combined data in the first response message data if the verification is passed;
the terminal control MCU module judges the verification result of the server to the first request message in the second combined data, and if the verification result is successful, the two-dimensional code display data in the second combined data is obtained;
and the terminal control MCU module encodes the two-dimensional code display data to obtain encoded data, and the two-dimensional code is displayed through the display module according to the encoded data.
2. The operating method of the terminal according to claim 1, wherein the generating of the first request packet data according to the first combined data specifically includes: the terminal control MCU module calculates the first combined data to obtain a first abstract value, signs the first abstract value through a preset algorithm by using a terminal private key to obtain first signature data, and combines the first combined data and the first signature data to obtain first request message data.
3. The method according to claim 1 or 2, wherein the obtaining of the data elements in the MCU module is specifically: acquiring a data element and current time prestored in the MCU module;
the generating of the first combined data according to the acquired user input information and the acquired data element organization specifically includes: and according to a preset data element combination form, generating first combination data according to the acquired information input by the user, the current time and the pre-stored data element organization.
4. The operating method of the terminal according to claim 3, wherein the step of the terminal controlling the MCU module to obtain the information input by the user received by the input module further comprises: the terminal control MCU module judges whether the information input by the current user is input for the first time in the day, if so, the terminal control MCU module generates update public key certificate request data, and organizes the update public key certificate request data, the information input by the user, the current time and prestored data elements according to a preset data element combination form to generate first combination data.
5. The operating method of the terminal according to claim 1, wherein after the displaying the two-dimensional code by the display module, the method further comprises: the terminal controls the MCU module to generate request query data, and the request query data is sent to the server through the communication module.
6. The method for operating a terminal according to claim 5, wherein after the sending the query request data to the server via the communication module, the method further comprises: the terminal receives query response data returned by the server through the communication module, the terminal controls the MCU module to analyze the query response data to obtain an operation result code, whether user operation is completed is judged through the operation result code, the completion of the operation is prompted through the display module if the user operation is completed, whether preset query interval time meets the condition is judged if the user operation is not completed, whether the preset query interval time meets the condition is repeatedly judged if the user operation is not completed, and query request data is sent to the server through the communication module if the user operation is not completed.
7. The operating method of the terminal according to claim 6, further comprising, after determining that the preset query interval time meets the condition: and judging whether the accumulated query times exceed a preset query termination time, if so, prompting operation failure through a display module, and if not, sending the query request data to the server through a communication module.
8. The working method of the terminal according to claim 1, wherein when the terminal control MCU module verifies that the first response packet data fails, the terminal control MCU module prompts an operation failure through the display module.
9. The working method of the terminal according to claim 1, wherein when the terminal control MCU module determines that the result of the verification of the first request packet by the server in the second combined data is a failure, the terminal control MCU module prompts an operation failure through a display module.
10. The utility model provides an online terminal that generates two-dimensional code which characterized in that, the terminal includes:
the communication module is used for connecting a network;
the input module is used for receiving information input by a user;
the control module is used for controlling the MCU module;
the MCU module is used for acquiring the information input by the user and received by the input module under the control of the control module, acquiring data elements, organizing and generating first combined data according to the acquired information input by the user and the acquired data elements, and generating first request message data according to the first combined data;
the communication module is also used for sending the first request message data generated by the MCU module to a server;
the communication module is also used for receiving first response message data returned by the server;
the MCU module is also used for verifying the first response message data under the control of the control module, and acquiring second combined data in the first response message data if the verification is passed;
the MCU module is also used for judging the verification result of the server to the first request message in the second combined data under the control of the control module, and acquiring the two-dimensional code display data in the second combined data if the verification result is successful;
the MCU module is also used for coding the two-dimension code display data under the control of the control module to obtain coded data, and the two-dimension code is displayed through the display module according to the coded data;
and the display module is used for displaying the two-dimensional code according to the coded data obtained by the coding of the MCU module.
11. The terminal of claim 10, wherein the MCU module comprises a first generation unit;
the first generating unit is configured to calculate the first combined data to obtain a first digest value under the control of the control module, sign the first digest value by using a terminal private key through a preset algorithm to obtain first signature data, and combine the first combined data and the first signature data to obtain first request message data.
12. The terminal according to claim 10 or 11, wherein the MCU module comprises a first acquisition unit, a second acquisition unit, and a second generation unit;
the first obtaining unit is used for obtaining the information input by the user and received by the input module under the control of the control module;
the second acquisition unit is used for acquiring a pre-stored data element and the current time under the control of the control module;
and the second generating unit is used for organizing and generating first combined data according to the information input by the user and acquired by the first acquiring unit, the pre-stored data elements acquired by the second acquiring unit and the current time under the control of the control module and according to a preset data element combination form.
13. The terminal of claim 12, wherein the MCU module further comprises a first determining unit and a third generating unit;
the first judging unit is used for judging whether the information input by the current user is input for the first time in the current day under the control of the control module after the first acquiring unit acquires the information input by the user;
and the third generating unit is configured to generate public key certificate update request data under the control of the control module when the first determining unit determines that the information input by the current user is first input in the current day, and organize the public key certificate update request data, the information input by the user, the current time acquired from the timer, and the acquired pre-stored data element into first combination data according to a preset data element combination form.
14. The terminal according to claim 10, wherein the MCU module comprises a fourth generation unit;
the fourth generating unit is used for generating query request data under the control of the control module after the display module displays the two-dimensional code;
the communication module is further configured to send the query request data generated by the fourth generating unit to a server.
15. The terminal of claim 14, wherein the MCU module further comprises an analysis unit, a third acquisition unit, a second determination unit, and a third determination unit;
the communication module is also used for receiving query response data returned by the server;
the analysis unit is used for analyzing the query response data received by the communication module under the control of the control module;
the third obtaining unit is configured to obtain an operation result code from the query response data analyzed by the analyzing unit under the control of the control module;
the second judging unit is used for judging whether the user operation is finished or not according to the operation result code acquired by the third acquiring unit under the control of the control module;
the display module is further configured to display a prompt indicating completion of the operation when the second determination unit determines that the user operation is completed;
the third judging unit is configured to, when the second judging unit judges that the user operation is not completed, judge whether a preset query interval time meets a condition under the control of the control module; when the preset query interval time is judged not to meet the condition, repeatedly judging whether the preset query interval time meets the condition or not;
the communication module is further configured to send the query request data generated by the fourth generating unit to a server when the third determining unit determines that the preset query interval time meets the condition.
16. The terminal of claim 15, wherein the MCU module further comprises a fourth determination unit;
the fourth judging unit is used for judging whether the accumulated query times exceed the preset query termination times under the control of the control module when the third judging unit judges that the preset query interval time meets the condition;
the display module is further configured to display a prompt of operation failure when the fourth determination unit determines that the accumulated query times exceed a preset query termination time;
the communication module is further configured to send the query request data generated by the fourth generating unit to a server when the fourth determining unit determines that the accumulated query times does not exceed the preset query termination times.
17. The terminal according to claim 10, wherein the display module is further configured to display a prompt of operation failure when the MCU module verifies that the first response message data fails.
18. The terminal according to claim 10, wherein the display module is further configured to display a prompt indicating that the operation fails when the MCU module determines that the result of the verification of the first request packet by the server in the second combined data is a failure.
CN201911017258.1A 2019-10-24 2019-10-24 Terminal and method for online generation of two-dimension code Active CN110766114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911017258.1A CN110766114B (en) 2019-10-24 2019-10-24 Terminal and method for online generation of two-dimension code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911017258.1A CN110766114B (en) 2019-10-24 2019-10-24 Terminal and method for online generation of two-dimension code

Publications (2)

Publication Number Publication Date
CN110766114A true CN110766114A (en) 2020-02-07
CN110766114B CN110766114B (en) 2023-09-22

Family

ID=69333435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911017258.1A Active CN110766114B (en) 2019-10-24 2019-10-24 Terminal and method for online generation of two-dimension code

Country Status (1)

Country Link
CN (1) CN110766114B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522516A (en) * 2020-07-06 2020-08-11 飞天诚信科技股份有限公司 Processing method and system for cloud broadcast print data

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501228A (en) * 2013-08-01 2014-01-08 沈阳华矿新能源装备科技有限公司 Dynamic two-dimension code token and authentication method of dynamic two-dimension code instruction
CN204066149U (en) * 2014-02-21 2014-12-31 黄昱钊 The system of Dynamic Announce Quick Response Code
WO2016004241A1 (en) * 2014-07-03 2016-01-07 Alibaba Group Holding Limited Login using two-dimensional code
CN106656908A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Two-dimensional code processing method and two-dimensional code processing device
JP2017119260A (en) * 2015-12-30 2017-07-06 日立工機株式会社 Centrifuge
CN106981012A (en) * 2017-03-21 2017-07-25 上海动联信息技术股份有限公司 A kind of dynamic two-dimension code order generation method and equipment
CN107181771A (en) * 2016-03-09 2017-09-19 北京优朋普乐科技有限公司 The generation method of Quick Response Code and the response method of two-dimensional code scanning event
CN107392612A (en) * 2017-06-05 2017-11-24 广东工业大学 A kind of method based on traffic Quick Response Code transaction verification
CN206711110U (en) * 2017-04-12 2017-12-05 武汉理工大学 Train checks handheld terminal
US20180225444A1 (en) * 2017-02-03 2018-08-09 Honeywell International Inc. Systems and methods for provisioning a camera with a dynamic qr code and a ble connection
CN108596624A (en) * 2018-03-14 2018-09-28 阿里巴巴集团控股有限公司 Handling result, payment result acquisition methods and the device of service request
CN109005028A (en) * 2018-11-02 2018-12-14 美的集团股份有限公司 Cryptographic key negotiation method, Cloud Server, equipment, storage medium and system
CN109102270A (en) * 2018-07-24 2018-12-28 深圳前海益链网络科技有限公司 Transaction verification method, computer equipment and the storage medium of block chain number Token
CN109711921A (en) * 2018-11-08 2019-05-03 深圳市顺丰物业管理有限公司 Customization of two-dimension code management method, device, system and storage medium
CN109726578A (en) * 2019-01-22 2019-05-07 江苏哩咕信息科技有限公司 A kind of anti-fake solution of novel dynamic two-dimension code
CN109756447A (en) * 2017-11-01 2019-05-14 华为技术有限公司 A kind of safety certifying method and relevant device
CN110189126A (en) * 2019-06-03 2019-08-30 飞天诚信科技股份有限公司 A kind of generation method and device of dynamic two-dimension code

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501228A (en) * 2013-08-01 2014-01-08 沈阳华矿新能源装备科技有限公司 Dynamic two-dimension code token and authentication method of dynamic two-dimension code instruction
CN204066149U (en) * 2014-02-21 2014-12-31 黄昱钊 The system of Dynamic Announce Quick Response Code
WO2016004241A1 (en) * 2014-07-03 2016-01-07 Alibaba Group Holding Limited Login using two-dimensional code
CN106656908A (en) * 2015-10-28 2017-05-10 阿里巴巴集团控股有限公司 Two-dimensional code processing method and two-dimensional code processing device
JP2017119260A (en) * 2015-12-30 2017-07-06 日立工機株式会社 Centrifuge
CN107181771A (en) * 2016-03-09 2017-09-19 北京优朋普乐科技有限公司 The generation method of Quick Response Code and the response method of two-dimensional code scanning event
US20180225444A1 (en) * 2017-02-03 2018-08-09 Honeywell International Inc. Systems and methods for provisioning a camera with a dynamic qr code and a ble connection
CN106981012A (en) * 2017-03-21 2017-07-25 上海动联信息技术股份有限公司 A kind of dynamic two-dimension code order generation method and equipment
CN206711110U (en) * 2017-04-12 2017-12-05 武汉理工大学 Train checks handheld terminal
CN107392612A (en) * 2017-06-05 2017-11-24 广东工业大学 A kind of method based on traffic Quick Response Code transaction verification
CN109756447A (en) * 2017-11-01 2019-05-14 华为技术有限公司 A kind of safety certifying method and relevant device
CN108596624A (en) * 2018-03-14 2018-09-28 阿里巴巴集团控股有限公司 Handling result, payment result acquisition methods and the device of service request
CN109102270A (en) * 2018-07-24 2018-12-28 深圳前海益链网络科技有限公司 Transaction verification method, computer equipment and the storage medium of block chain number Token
CN109005028A (en) * 2018-11-02 2018-12-14 美的集团股份有限公司 Cryptographic key negotiation method, Cloud Server, equipment, storage medium and system
CN109711921A (en) * 2018-11-08 2019-05-03 深圳市顺丰物业管理有限公司 Customization of two-dimension code management method, device, system and storage medium
CN109726578A (en) * 2019-01-22 2019-05-07 江苏哩咕信息科技有限公司 A kind of anti-fake solution of novel dynamic two-dimension code
CN110189126A (en) * 2019-06-03 2019-08-30 飞天诚信科技股份有限公司 A kind of generation method and device of dynamic two-dimension code

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
国网北京市电力公司电力科学研究院课题组;: "结合"互联网+"的电动汽车运营服务信息化系统研究及示范应用", vol. 1, no. 04, pages 187 - 190 *
张瑞娟;: "数字签名技术在网络安全中的应用研究", 科技广场, vol. 1, no. 06, pages 564 - 567 *
梅中雷;: "地铁公司二维码乘车安全解决方案", 网络空间安全, vol. 1, no. 01, pages 181 - 184 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522516A (en) * 2020-07-06 2020-08-11 飞天诚信科技股份有限公司 Processing method and system for cloud broadcast print data
US11954374B2 (en) 2020-07-06 2024-04-09 Feitian Technologies Co., Ltd. Method and system for processing cloud broadcasting and printing data

Also Published As

Publication number Publication date
CN110766114B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
EP1840814B1 (en) Verification system
CN110930147B (en) Offline payment method and device, electronic equipment and computer-readable storage medium
KR101512001B1 (en) System and method for user authentication by using a physical financial card and mobile communication terminal
CN108764848B (en) Electronic contract signing method and system
CN103218740A (en) Trading system, method and device using two-dimension codes
CN102243739A (en) Mobile-phone bank payment method, mobile-phone bank payment system and mobile-phone bank client based on two-dimension code
CN103886460A (en) On-site payment system and method implemented based on identity authentication token
CN103888255A (en) Identity authentication method, device and system
CN111126533B (en) Identity authentication method and device based on dynamic password and dynamic token
CN103971239A (en) Verification method and device
CN103023638A (en) Identity verification method and device based on mobile terminal
CN103839160B (en) A kind of network trading digital signature method and device
CN106779705B (en) Dynamic payment method and system
CN101216915A (en) A secured mobile payment method
CN101765113A (en) Anti-theft system and method for data card
CN102752311A (en) Authentication method, system and device
CN105741116A (en) Fast payment method, apparatus and system
CN110766114B (en) Terminal and method for online generation of two-dimension code
CN113190724B (en) User bank information query method, mobile terminal and server
US20200302426A1 (en) Bluetooth financial card and working method therefor
CN105719130B (en) Payment verification method, device and system
CN114244505B (en) Safety communication method based on safety chip
CN112039677B (en) Method and system for code scanning operation processing based on server
CN112039928B (en) Method and system for processing certificate
CN105654295A (en) Transaction control method and client

Legal Events

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