CN114330616B - Method and system for realizing business processing by code scanning - Google Patents

Method and system for realizing business processing by code scanning Download PDF

Info

Publication number
CN114330616B
CN114330616B CN202111657576.1A CN202111657576A CN114330616B CN 114330616 B CN114330616 B CN 114330616B CN 202111657576 A CN202111657576 A CN 202111657576A CN 114330616 B CN114330616 B CN 114330616B
Authority
CN
China
Prior art keywords
service
service processing
processing terminal
signature
data
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.)
Active
Application number
CN202111657576.1A
Other languages
Chinese (zh)
Other versions
CN114330616A (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 CN202111657576.1A priority Critical patent/CN114330616B/en
Publication of CN114330616A publication Critical patent/CN114330616A/en
Application granted granted Critical
Publication of CN114330616B publication Critical patent/CN114330616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a method and a system for realizing business processing by code scanning, which comprises the following steps: the method comprises the steps of generating a first key pair after a service processing terminal activates a preset activation code, sending a public key of the first key pair to a server, generating a second key pair by the server, sending the public key of the second key pair to the service processing terminal, signing and verifying interaction data in the service processing process between the service processing terminal and the server according to the generated first key pair and the second key pair, and completing service processing terminal activation operation without manually importing a certificate to the site.

Description

Method and system for realizing business processing by code scanning
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for realizing business processing by code scanning.
Background
In the existing service processing process, in order to ensure the safety of service processing, a service processing terminal needs to import a certificate before use to be activated and execute the service processing, and the import certificate needs to specify a specific staff to manually import the certificate for the service processing terminal on site by a provider of the service processing terminal.
Disclosure of Invention
The invention provides a method and a system for realizing business processing by code scanning, which solve the technical problems.
The invention provides a method for realizing business processing by code scanning, which comprises the following steps:
step 1, a service processing terminal sends an activation code input by a user to a server;
step 2, the server generates a corresponding service processing pointer and a service processing terminal identifier according to the activation code, and sends the service processing pointer and the service processing terminal identifier to the service processing terminal;
step 3, the service processing terminal generates a first key pair and sends the public key of the first key pair to the server;
step 4, the server stores the public key of the first key pair, generates a second key pair and sends the public key of the second key pair to the service processing terminal;
step 5, the business processing terminal stores the public key of the second key pair;
step 6, the business processing terminal uses the private key of the first key pair to execute signature operation to generate a first signature value according to business data input by a user, a two-dimension code value of the user obtained through scanning, a business data processing mode, a business processing pointer and a business processing terminal identifier, generates a business processing message according to the first signature value and the business data, the two-dimension code value, the business data processing mode, the business processing pointer and the business processing terminal identifier, and sends the business processing message to the server;
Step 7, the server analyzes the service processing message to obtain service data and a two-dimensional code value, the service data processing mode, the service processing pointer, the service processing terminal identifier and the first signature value, and after the first signature value is checked by using the public key of the first key pair and the check is correct, the service data processing mode, the service processing pointer and the service processing terminal identifier are operated according to the service data and the two-dimensional code value to obtain an operation result;
step 8, the server executes signature operation on the operation result according to the private key of the second key pair to generate a second signature value, generates a service processing result message according to the second signature value and the operation result, and sends the service processing result message to the service processing terminal;
and 9, the service processing terminal analyzes the service processing result message to obtain an operation result and a second signature value, and uses the public key of the second key pair to check the second signature value, and the service processing terminal operates according to the operation result after the check is correct.
The invention also provides a system for realizing service processing by scanning codes, which comprises a service processing terminal device, and is characterized in that the service processing terminal device comprises at least one processor, a memory and instructions which are stored in the memory and can be executed by the at least one processor, and the at least one processor executes the instructions to execute the method.
The present invention also provides a computer readable storage medium comprising a computer program which, when run on a service processing terminal apparatus, causes the service processing terminal apparatus to perform the above method.
The invention also provides a chip, which is characterized in that the chip is coupled with a memory for executing a computer program stored in the memory for executing the above method.
The invention has the beneficial effects that: the invention provides a method and a system for realizing business processing by scanning codes, which can complete the activation operation of a business processing terminal and execute business processing without manually importing a certificate to the site, save manpower and time, and ensure that the business processing process is safer through a reliable key negotiation process.
Drawings
Fig. 1 is a flowchart of a method for implementing service processing by code scanning according to a first embodiment of the present invention;
fig. 2, fig. 3, fig. 4, and fig. 5 are flowcharts of a method for implementing service processing by code scanning according to a second embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments that can be obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present invention.
Example 1
The embodiment provides a method for realizing service processing by code scanning, as shown in fig. 1, the method comprises the following steps:
step 1, a service processing terminal sends an activation code input by a user to a server;
step 2, the server generates a corresponding service processing pointer and a service processing terminal identifier according to the activation code, and sends the service processing pointer and the service processing terminal identifier to the service processing terminal;
step 3, the service processing terminal generates a first key pair and sends the public key of the first key pair to the server;
step 4, the server stores the public key of the first key pair, generates a second key pair and sends the public key of the second key pair to the service processing terminal;
step 5, the business processing terminal stores the public key of the second key pair;
step 6, the business processing terminal uses the private key of the first key pair to execute signature operation to generate a first signature value according to business data input by a user, a two-dimension code value of the user obtained through scanning, a business data processing mode, a business processing pointer and a business processing terminal identifier, generates a business processing message according to the first signature value and the business data, the two-dimension code value, the business data processing mode, the business processing pointer and the business processing terminal identifier, and sends the business processing message to the server;
Step 7, the server analyzes the service processing message to obtain service data and a two-dimensional code value, the service data processing mode, the service processing pointer, the service processing terminal identifier and the first signature value, and after the first signature value is checked by using the public key of the first key pair and the check is correct, the service data processing mode, the service processing pointer and the service processing terminal identifier are operated according to the service data and the two-dimensional code value to obtain an operation result;
step 8, the server executes signature operation on the operation result according to the private key of the second key pair to generate a second signature value, generates a service processing result message according to the second signature value and the operation result, and sends the service processing result message to the service processing terminal;
and 9, the service processing terminal analyzes the service processing result message to obtain an operation result and a second signature value, and uses the public key of the second key pair to check the second signature value, and the service processing terminal operates according to the operation result after the check is correct.
In a possible implementation manner, in step 9, the operation performed by the service processing terminal according to the operation result is specifically:
when the operation result is the operation result of successful service processing, the service processing terminal stores a service processing record according to the serial number in the operation result and prompts the user that the service processing is successful;
And when the operation result is the operation result of the service processing failure, the service processing terminal prompts the user that the service processing fails.
In a possible implementation manner, in step 9, the operation performed by the service processing terminal according to the operation result further includes:
when the operation result is that the service processing is in progress, the service processing terminal prompts the user that the service processing is in progress, and the following steps are executed:
step a1, a service processing terminal sends a service processing state inquiry instruction to a server at preset time intervals;
step a2, the service processing terminal judges whether the operation result of successful service processing or failed service processing sent by the server is received within a preset time, and when the service processing terminal receives the operation result of successful service processing sent by the server within the preset time, the service processing terminal stores a service processing record according to the serial number in the operation result and prompts the user that the service processing is successful; when the service processing terminal receives the operation result of the service processing failure sent by the server in a preset time, the service processing terminal prompts the user that the service processing fails; and when the service processing terminal does not receive the operation result of successful service processing or failed service processing sent by the server within the preset time, the service processing terminal prompts the user that the service processing is failed.
In a possible implementation manner, the operation performed by the service processing terminal in step 9 according to the operation result is specifically:
when the operation result is the operation result of successful service processing, the service processing terminal stores a service processing record according to the serial number in the operation result and prompts the user that the service processing is successful;
step 9 further comprises the following steps:
step 10, the service processing terminal obtains the service feedback serial number and the service feedback data, signs the service feedback serial number and the service feedback data by using a private key of the first key pair to generate a second signature value, generates a service feedback request according to the service feedback serial number, the service feedback data and the second signature value, and sends the service feedback request to the server;
step 11, the server analyzes the service feedback request message to obtain a service feedback serial number, service feedback data and a second signature value, operates according to the serial number and the service feedback data to obtain a service feedback operation result after checking the second signature value correctly according to the private key of the first key pair, performs signature operation on the serial number, the service feedback data and the service feedback operation result by using the public key of the second key pair to obtain a fifth signature value, generates a service feedback request response according to the serial number, the service feedback data, the operation result and the fifth signature value, and sends the service feedback request response to the service processing terminal;
And step 12, the service processing terminal analyzes the service feedback request response message to obtain a service feedback request response and a fifth signature value, and performs operation according to a service feedback operation result in the service feedback request response after checking that the fifth signature is correct according to the public key of the second key pair.
In a possible implementation manner, the operation in step 12 according to the service feedback operation result in the service feedback request response specifically includes:
when the service feedback operation result is that the service feedback is successful, the service processing terminal prompts that the service feedback is successful, generates a service feedback record according to the serial number and the service feedback data, and stores the service feedback record;
and when the service feedback operation result is that the service feedback fails, the service processing terminal prompts the service feedback failure.
In a possible implementation manner, the operation in step 11 according to the service feedback operation result in the service feedback request response further includes:
when the service feedback operation result is that the service feedback is in progress, the service processing terminal prompts the user that the service feedback is in progress, and the following steps are executed:
step c1, a service processing terminal sends a service feedback state query instruction to a server at preset time intervals;
Step c2, the service processing terminal judges whether the operation result of successful service feedback or failed service feedback sent by the server is received within a preset time, and when the service processing terminal receives the operation result of successful service feedback sent by the server within the preset time, the service processing terminal generates a service feedback record according to the serial number and the service feedback data in the service feedback operation result, saves the service feedback record and prompts the user that the service feedback is successful; when the service processing terminal receives the operation result of service feedback failure sent by the server in a preset time, the service processing terminal prompts the user that the service feedback fails; and when the service processing terminal does not receive the operation result of successful service feedback or failed service feedback sent by the server within the preset time, the service processing terminal prompts the user that the service feedback fails.
In one possible implementation, step 6 is specifically:
the service processing terminal sorts the service data input by the user and the two-dimensional code value, the service data processing mode, the service processing pointer and the service processing terminal identifier of the user obtained through code scanning according to a preset sequence, converts the sorted two-dimensional code value, the service data processing mode, the service processing pointer and the service processing terminal identifier according to a preset format to obtain a first signature original text, signs the first signature original text according to a private key of a first key pair to obtain a first signature value, and generates a service processing message after the first signature value, the service data, the two-dimensional code value, the service data processing mode, the service processing pointer and the service processing terminal identifier are spliced, and sends the service processing message to the server.
In one possible implementation manner, in step 6, the first signature value is obtained by signing the first signature original according to the private key of the first key pair, specifically: the service processing terminal uses a private key of the first key pair to sign the first signature original text to obtain first signature data, performs Base64 coding on the first signature data to obtain first coding signature data, performs Base64 coding on the first coding signature data to obtain a third signature field value, and takes the third signature field value as a first signature value;
in step 7, signing the first signature value by using the public key of the first key pair specifically includes: the server performs Base64 decoding on the first signature value to obtain first coded signature data, performs Base64 decoding on the first coded signature data to obtain first signature data, and performs signature verification on the first signature data by using a public key of the first key pair.
In one possible implementation, step 3 is specifically:
the service processing terminal generates a first key pair, carries out Base64 encoding on a public key of the first key pair to obtain a first encoding result, carries out Base64 encoding on the first encoding result to obtain a second encoding result, and sends the second encoding result to the server;
In step 4, the server stores the public key of the first key pair specifically as follows: and the server performs Base64 decoding on the second coding result to obtain a first decoding result, performs Base64 decoding on the first decoding result to obtain a public key of the first key pair, and stores the public key of the first key pair.
In one possible implementation, step 3 is specifically:
the service processing terminal generates a first key pair and an application program interface key value, calculates the data obtained by splicing the public key of the first key pair and the application program interface key value according to a preset algorithm to obtain a second signature field value, splices the second signature field value and the public key of the first key pair and the application program interface key value to obtain first public key data, and sends the first public key data to the server;
in step 4, the server stores the public key of the first key pair specifically as follows: the server analyzes the first public key data to obtain signature field data, a public key of the first key pair and an application program interface key value, calculates the public key of the first key pair and the application program interface key value according to a preset algorithm to obtain second signature field data, and stores the public key of the first key pair after judging that the second signature field data is identical to the first signature field data.
Example two
The embodiment provides a method for realizing service processing by code scanning, as shown in fig. 2, comprising the following steps:
step 101, starting up a service processing terminal;
step 102, the service processing terminal judges whether activated, if yes, step 103 is executed, if no, the activation flow is executed, and step 103 is executed;
step 103, the service processing terminal prompts the user whether to execute the service processing flow, if yes, the service processing terminal executes the service processing flow after networking, and the step 103 is returned; if not, go to step 104;
step 104, the service processing terminal prompts the user whether to execute the service feedback flow, if yes, the service processing terminal executes the service feedback flow after networking, and returns to step 103; if not, go to step 105;
step 105, the service processing terminal prompts the user whether to execute other operations, if yes, the service processing terminal executes other operations, and returns to step 103; if not, return to step 103.
In the present embodiment, other operations may include, but are not limited to, a networking operation, a time setting operation, or a set networking operation, etc.
In this embodiment, as shown in fig. 3, the activation procedure includes the following steps:
Step 201, a service processing terminal displays an activation code input page to prompt a user to input an activation code;
step 202, a service processing terminal waits for a user to input a preset activation code;
in this embodiment, the preset activation code may also be entered by the service processing terminal through a scan code.
Step 203, the service processing terminal receives a preset activation code input by a user, and generates a first message according to the preset activation code input by the user;
in this embodiment, the steps specifically include: the business processing terminal carries out abstract operation on the preset activation code to obtain a first abstract value, and generates a first message according to the preset activation code and the first abstract value;
in this embodiment, the steps specifically include: the service processing terminal generates URL data and parameter data in a preset format, and forms a first message according to the URL data and the parameter data in the preset format, wherein the parameter data in the preset format comprises a preset activation code;
in this embodiment, the parameter data in the predetermined format is: parameter data in json format.
In the present embodiment, the parameter data in the json format is merely an example, and the predetermined format is not limited to the parameter data in the json format.
The service processing terminal generating URL data includes: the service processing terminal splices the server website, the identification of the URL and the token value to obtain URL data;
In this embodiment, the token value is a randomly generated value.
The service processing terminal generating json format data comprises the following steps: and the service processing terminal generates a first signature field value according to each request parameter, splices each request parameter to obtain a spliced request parameter, and splices the first signature field value with the spliced request parameter to obtain parameter data in json format.
The service processing terminal generating a first signature field value according to each request parameter comprises the following steps:
step a1, the service processing terminal sorts all request parameters according to alphabetical order, wherein a preset activation code is one of the request parameters;
in this embodiment, the request parameter is composed of a parameter identifier and a parameter value thereof;
in this step, the request parameters include: the method comprises the steps of presetting a location parameter, a time zone parameter and an activation code parameter;
for example, the location parameter is local, japan, where local is the location parameter identifier and Japan is the location parameter value;
time zone parameter timezone, p9, wherein timezone is time zone parameter identification, p9 is time zone parameter value;
presetting a product key of an activation code parameter, wherein the product key is a preset activation code mark, and the 5j68dx8v4t4dpo25 is a preset activation code parameter value;
Step a2, the service processing terminal performs form conversion on each request parameter according to a preset format, and connects the request parameters after the form conversion by using a preset symbol to obtain a first character string;
for example, after each request parameter is converted according to the form of parameter identification=parameter value, each parameter after the form conversion is connected by a predetermined symbol & pair, so as to obtain a first character string;
taking the example of each request parameter in the step a1 as an example, the first character string is obtained after conversion according to the step a 2: locale=japan & product key=5j68dx8v4t4dpo25 & timezone=p9;
step a3, the service processing terminal generates an API (application program interface) key value, and splices the first character string and the API key value to obtain a second character string;
specifically, in this step, the service processing terminal composes an API key value according to the preset activation code and the token value generated randomly, and adds the API key value to the back of the first string to obtain a second string;
for example, the service processing terminal may, according to the preset activation code 5j68dx8v4t4dpo25 and the randomly generated token value, for example: stg33_shop01FT201900219700101000443990000 forms an API key value of 5j68dx8v4t4dpo25stg33_shop 01FT2019002197001010004439990000, and adds the API key value to the back of the first character string to obtain a second character string; locale=japan & production key=5j68dx8v4t4dpo25 & timezone=p9 & key=5j68dx8v4t4dpo25stg33_sho 01FT2019002197001010004439990000
Step a4, the business processing terminal uses brackets to form a third character string by the second character string, and calculates the third character string to obtain a first signature field value;
for example, the service processing terminal includes the second string locale=japan & product key=5j68dx8v4t4dpo25 & timezone=p9 & key=5j68dx8v4t4dpo25stg33_sho01ft019002197001010439990000 with a bracket to form a third string { locale=japan & product key=5j68dx8v4dpo25 & timezone=p9 & key=5j68dx8v4v4dpo25stg33_sho01ft201900010010004990000 }, and performs an MD5 algorithm on the third string to obtain the first signature field value; sign= "AF72E46a57B8464a954332EFE7FB6D20";
step a4 may also be: the business processing terminal comprises a third character string formed by bracketing the second character string, and carries out operation on the third character string to obtain an operation result, and converts the operation result into capitalization to obtain a first signature field value.
Step 204, the service processing terminal sends the first message to the server;
step 205, the server analyzes the first message to obtain a preset activation code;
in this embodiment, the steps specifically include: the server analyzes the first message to obtain a preset activation code and a first abstract value; in the step, a specific server analyzes a first message to obtain URL data and Json format parameter data, and analyzes the Json format parameter data to obtain a first signature field value and each request parameter; wherein the request parameter comprises a preset activation code;
Step 206, the server verifies the correctness of the first message, judges whether the first message is correct, if yes, executes step 207, if not, reports errors to the service processing terminal, and ends;
in this embodiment, the steps specifically include: the server performs abstract operation on the obtained preset activation code to obtain a second abstract value, judges whether the second abstract value is the same as the first abstract value, if so, the first message is correct, executes step 207, if not, the first message is incorrect, returns error information to the service processing terminal, and ends.
The method specifically comprises the following steps: the server performs abstract operation according to each request parameter to obtain a second abstract value, judges whether the second abstract value is the same as the first signature field value, if so, the first message is correct, executes step 207, if not, the first message is incorrect, returns error information to the service processing terminal, and ends.
In this embodiment, the steps specifically include: the server forms an API key value according to a preset activation code and a randomly generated Token value, calculates a first signature field verification value according to the API key value and each request parameter, judges whether the first signature field verification value is the same as the first signature field value, if so, the first message is correct, executes step 207, if not, the first message is incorrect, returns error information to the service processing terminal, and ends;
In the step, the algorithm for randomly generating the token value by the server is the same as the algorithm for randomly generating the token value by the service processing terminal;
the process of generating the first signature field verification value by the server is the same as that of generating the first signature field value by the service processing terminal according to each request parameter, and will not be described in detail.
Step 207, the server generates a service processing pointer and a service processing terminal ID (service processing terminal identifier) corresponding to the preset activation code according to the preset activation code, and calculates the service processing pointer and the service processing terminal ID to generate a third abstract value;
step 208, the server generates a response of the first message according to the service processing pointer, the service processing terminal ID and the third abstract value, and sends the response of the first message to the service processing terminal;
the method specifically comprises the following steps: the server generates a corresponding service processing pointer and service processing terminal ID according to the preset activation code, generates a response of the first message according to the service processing pointer and the service processing terminal ID and the state code which is successfully activated, and sends the response of the first message to the service processing terminal.
Step 209, the service processing terminal receives the response of the first message, verifies the correctness of the response of the first message, and stores the service processing pointer and the service processing terminal ID in the response of the first request message when verifying that the response of the first message is correct;
Specifically, the method comprises the following steps: the service processing terminal receives the response of the first message request, analyzes the response of the first message request to obtain a service processing pointer, a service processing terminal ID and a third abstract value, carries out abstract operation on the service processing pointer and the service processing terminal ID to obtain a fourth abstract value, judges whether the third abstract value is the same as the fourth abstract value, stores the service processing pointer and the service processing terminal ID if the third abstract value is the same as the fourth abstract value, and prompts error information by the service processing terminal if the third abstract value is not the same as the fourth abstract value;
for example, the service processing terminal receives the response of the first message request as follows:
{ "meta" { "code": "00", "message": "SUCCESS" }, "data" { "error code": "," error info "," "sign": "25B0890D976A43A8163801B490281DCD", "result" { "activeteTime": "20190829110820", "terminalStatus": "02", "expereTime": "," terminalicode ":" OT04G9h54384uivr "," branchCode ":" OS035610312999"}, and the service processing pointer OS035610312999 and terminal IDOT04G9h54384 uir and the third digest value 25B0890D976A43A8163801B490281DCD are obtained by parsing.
Step 210, the service processing terminal randomly generates a first key pair according to an asymmetric algorithm, saves a private key of the first key pair, and generates a second message according to the service processing pointer, the service processing terminal ID and a public key of the first key pair;
In this embodiment, the steps specifically include: the service processing terminal randomly generates a first key pair according to an asymmetric algorithm, stores a private key of the first key pair, performs abstract operation on a public key of the first key pair, generates a fifth abstract value, and generates a second message according to the public key of the first key pair and the fifth abstract value;
in this embodiment, in this step, the generating the second message according to the service processing pointer, the service processing terminal ID, and the public key of the first key pair specifically includes: the service processing terminal generates URL data and Json format parameter data, a second message is formed according to the URL data and the Json format parameter data, and the Json format parameter data comprises a service processing pointer, a service processing terminal ID and a public key field value generated by the service processing terminal according to a public key of the first key pair;
specifically, the process of generating the public key field value by the service processing terminal according to the public key of the first key pair is as follows: the service processing terminal performs Base64 encoding operation on the public key of the first key pair to obtain a first encoding operation result, and performs Base64 encoding operation on the first encoding operation result to obtain a public key field value;
for example, the number of the cells to BE processed, the service processing terminal uses the public key A4F 05B 05D581961228376D9EAF3CA40386FDC872BE806D7C9C2E2863B3CED1A380F8795394ECFD790260A1A77DD953091264667AEEE248B6D49196747A1885EF74DDBE90834A50978191 EDACE 7D391E9139F8CEDD192CF0FFEE202AEBA3B 91A 91EF3FE28CEF29AD2EDEC05839BD538CF85AF619A6912F of the first key pair 2A000E2091651311CF54100EF28491C52CF571BAEC3E660380A9911FB5C75E10162341E506723580826469B8C862BD12E14DBAF9BA5D857173715ABD62045CD40CB2D2A28F358461B22663C472CA8EBE22936767B07242988A0EE180602CBEAC11865DA0C7D9EFA989E59201713DCB6798ADC460D81B74F7CF4CA526E90F58303658BA9AB425F2A741 performs a Base64 encoding operation, obtaining a first encoding operation result MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApPCLBdWBlhIoN22 erzykkA 4B9yHK +gG18nC4oY PO0aOA +HlTlOz9 eQJgad 92 VMJmRmeu 7iSLbUkZZ0 ehF 73 TdvpCDSLCXgZHqqs 59OR6rofjo3Rks P/uICrro7 KKKKE 8/4ozvKa0u3sBYOB1 TjPharmmKS8qa4 gWUTec 9 UEA7yhJHFLPLPVxuw+ZgOAqEftcdeEBYjQeUGUGjWAgmRpmhivRLhTbra5 ul2FcXNxWr1iBFzUDLLSoO 81hGGmPEcsqOvKTZ2 ewckKYG 7 hgGAsvwRhl2 gx9 nvvqYlkgFxPctnmK 3 YNYNbPptPptKUm6 Q9 YMDYDZYup q0 JFKQQIDAQQB, and performing Base64 encoding operation on the first encoding operation result to obtain a public key field value: TUlJQklqQU5CZ2txaGtpRzl3 MEJBUVGQUFPQ 0FROEFNSUlCQ2dLQ0FRRUFwUENMQmRXQmxoSW9OMjJlcnp5a0E0Yjl SEsrZ0cxOG5DNG9ZN1 BPMGFPQStIbsT 3o5ZVFKZ29 hZDyyVk 1KRW1SbWV1N2lTTGJVA1paMGVoaUY3M1 RkdnBDRFNKNKNKQ 1hnWkh0cXM OU9SNlJPzmpPM1 JrcznL3 VJQ3JybzdLS2 OC80b 3S 2 EwdTNdTNzPyPyPyULbBolbobobonw 1rUzhxQUE0Z2 tXVVVRFYzlVRUE 3eWhKSEZMUFZ4dXV K1pnT0 FxWkVmdGNkZUWWWWWWWWWWVHY 2 pQWdtUnB 1 TWhpldLJMARXGY 1hOeFdyMWLCRnpVRExMU29vODFoR0d5Sm1QRWNzcU92 aUWjJld 2NrS1lpZzdoZ0dBc3Zxd1 JobDJNedFZbMxRZ 0Z4UGN0bm1 VzmdisFBmUFWVTkWWWWWWWWWWWWkKKUUUUUVJREQUI=;
Specifically, the service processing terminal generating URL data includes: the service processing terminal splices the server website https of/(gateway.onepoay.finish, URL identification/gateway/exchange/C01/1/0/token value OS035610312999OT04G9h54384uivr19700101001911990001 into URL data;
the service processing terminal generating json format data comprises the following steps: the service processing terminal generates a second signature field value according to the plurality of request parameters, splices each request parameter to obtain a spliced request parameter, and splices the second signature field value with the spliced parameter to generate json format parameter data, wherein each request parameter comprises a service processing pointer, a service processing terminal ID and a public key field value generated by the service processing terminal according to a public key of the first key pair;
specifically, the service processing terminal generating the second signature field value includes the following steps:
step b1, the service processing terminal sorts all the request parameters according to the alphabetical order, wherein the request parameters comprise a service processing pointer, a service processing terminal ID and a public key field value generated by the service processing terminal according to the public key of the first key pair;
in this embodiment, the individual request parameters may include: a location parameter, a time zone parameter, a business processing pointer parameter, a terminal ID parameter, a public key field value parameter, and a second signature field value; among the service processing pointer parameters, the parameter identifier is a branch code, and the parameter value is: the OS035610312999 and the service processing terminal ID parameters are identified as follows: terminalCode, parameter values are: OT04G9h54384uivr;
And the service processing terminal generates a public key field value parameter according to the public key of the first key pair, wherein the parameter identifier is publicKey, and the parameter value is as follows: A4F08B05D581961228376D9EAF3CA40386FDC 872D 7C9C2E2863B3CED1A380F8795394ECFD790260A 77DD953091264667AEEE248B6D49196747A1885EF74DDBE90834A50978191 EDACE 7D391E9139F8CEDD192CF0FFEE202AEBA3B28A91EF3FE28CEF29AD2EDEC05839BD538CF85AF 6912A 6912F2A000E2091651311CF54100EF28491C52CF571BAEC3E660380a9911FB5C75E10162341E 4815B 8C862BD12E14DBAF9BA5D857173715ABD62045CD40CB2D2a28F358461B22663C472CA8EBE22936767B07242988A0EE180602CBEAC11865DA0C7D9EFA989E59201713DCB6798ADC460D81B74F7CF4CA526E90F58303658BA9AB425F2a 741.
Step b2, the business processing terminal converts the form of each request parameter according to a preset format to obtain a fourth character string;
for example, after each request parameter is converted according to the form of parameter identifier=parameter value, a fourth character string is obtained as follows: branchcode=os 035610312999& localle=japan & publickey=tunejqkiqqu 5CZ2 txgjvqqu 5CZ 3mejbuuvgqu fpq0 froeifnsbq 2dLQ0 frrufwuenmqmxrxqmxo sw9 omjjltnp 5a0E0Yjl SEsrZ0cxOG5DNG9ZN1 bpmgqstibfrst 3o5ZVFKZ29 hzkyk 1KRW1SbWV1N2 ttgjgjv 1 pamgavy 3M1 rkdnbdrfq 1 hnwttq 0cXM OU9 snljjzmppm 1JrczhQL3 jjbzls 80b 3S 2 wowtzqllqllboss 1 xytzbzwjuzw 0 vrtzvzv 2 vrtzv 2 vrzvzvzv 2 j 3 ehksezmufz 4dXV K1pnT0 fxwkvmdcgnkzuvcwwovzvvhy 2 pxqwtunb 1 twhpdljmacfricjv 1bDJGY1 hoxydymwdycrnpvrexmu 29vODFoR0d5Sm1QRWNzcU92 autuwjjjld 2NrS1lpzz 0dBc3Zxd1 jobdjnedlumxrz 0Z4UGN0bm1LM0 vztdisfbmfufrlvw 02 ututuwurtkkzktuuvfjfrifri= terminudecode=04G 9h54384 vr & timeframe=5j 68dx8v4t4 dp25 OS 035610312999G 9h 9239 d3 925 r19700101000601990001;
Step b3, the service processing terminal generates an API (application program interface) key value, and splices the fourth character string and the API key value to obtain a fifth character string;
specifically, in this step, the service processing terminal forms an API key value according to the preset activation code and the token value that is randomly generated, and adds the API key value to the rear of the fourth string to obtain a fifth string;
for example, the service processing terminal forms an API key value 5j68dx8v4t4dpo25OS035610312999OT04G9h54384uivr19700101000601990001 according to a preset activation code 5j68dx8v4t4dpo and a randomly generated token value (token parameter constant proposal branchCode+terminalCode+14 bit time+6 bit random number) 25OS035610312999OT04G9h54384uivr19700101000601990001, and adding the API key value to the back of the first character string to obtain a sixth character string branchcode=OS 035610312999& locale=JAPAN & publicKey=TUlJQklqQU 5CZ2 txaGtpRgzl 3 MEJBUVGQUFPQ 0FROEFNSUlCQ2dLQ0FRRUFWUENMQmRXQmxoSW9OMjJlcnp5a0E0Yjl SEsrZ0cxOG5DNG9ZN1 BPMGMGFPQSTIbFRsT 3o5ZVFKZ29 hZDyVk 1KRW1SbWV1N2lTTGJVA1pamgVoaUY3M1 RkdnBDRFNNSQ 1hnWkh0cXM1OU9SNlJPzmpPM1JrczhQL3VJQ JybzdLS2tlOC80b3p2S2 OMjJlcnp5a0E0Yjl SEsrZ0cxOG5DNG9ZN1BPMGFPQSTIbFRsT3o5ZVFKZ29hZDkyVk1KRW1SbWV1N2lTTGJVA1pamgVoaUY3M1RkdnBDRFNsQ1hnWkh0cXM1OU9SNlJPZmpPM1JrczhQL3VJQ3JybzdLS2tlOC80b3p2S 2;
Step b4, the business processing terminal uses brackets to form a sixth character string, and calculates the sixth character string to obtain the value of the second signature field;
for example, the service processing terminal forms a sixth character string by bracketing the fifth character string, and performs an MD5 algorithm on the sixth character string to obtain a second signature field value 80C84CEA966EA2C2921BFF5AD70CEE22;
step b4 may also be: the business processing terminal comprises a fifth character string and a sixth character string, wherein the fifth character string is bracketed by brackets, the sixth character string is operated to obtain an operation result, and the operation result is converted into a capital value to obtain a value of the second signature field.
Step 211, the service processing terminal sends the second message to the server;
step 212, the server analyzes the second message to obtain the public key of the first key pair, verifies the correctness of the second message, if yes, executes step 213, if no, returns error information to the service processing terminal, and ends;
in this embodiment, the steps specifically include: the server analyzes the second message to obtain a public key of the first key pair and a fifth abstract value, performs abstract operation on the public key of the first key pair to generate a sixth abstract value, judges whether the fifth abstract value is the same as the sixth abstract value, if so, the second message is correct, step 213 is executed, if not, error information is returned to the service processing terminal, and the process is ended.
In this embodiment, the steps specifically include: the server analyzes the second message to obtain URL data and parameter data in a Jason format, and analyzes the parameter data in the json format to obtain a second signature field value and each request parameter; wherein each request parameter comprises a service processing pointer, a service processing terminal ID and a public key field generated by the service processing terminal according to the public key of the first key pair;
the server forms an API key value according to a preset activation code and a randomly generated Token value, calculates a second signature field verification value according to the API key value and each request parameter, judges whether the second signature field verification value is the same as the second signature field value, if so, the first message is correct, executes step 207, if not, the first message is incorrect, returns error information to the service processing terminal, and ends;
in the step, the algorithm for randomly generating the token value by the server is the same as the algorithm for randomly generating the token value by the service processing terminal;
the process of generating the second signature field verification value by the server is the same as that of generating the second signature field value by the service processing terminal according to each request parameter, and will not be described in detail.
Step 213, the server stores the public key of the first key pair, randomly generates a second key pair according to the asymmetric algorithm, stores the private key of the second key pair, and generates a response of the second message according to the public key of the second key pair;
In this embodiment, the steps specifically include: the server stores the public key of the first key pair, randomly generates a second key pair according to an asymmetric algorithm, stores the private key of the second key pair, performs abstract operation on the public key of the second key pair, generates a seventh abstract value, and generates a response of the second message according to the seventh abstract value and the public key of the second key pair;
specifically, in this step, the public key of the server storing the first key pair is specifically: and the server performs Base64 decoding operation on the public key field value in the request parameter to obtain a first decoding operation result, performs Base64 decoding operation on the first decoding operation result to obtain a public key of the first key pair, and stores the public key of the first key pair, the service processing pointer and the service processing terminal ID in a corresponding manner.
Step 214, the server sends the response of the second message to the service processing terminal;
step 215, the service processing terminal analyzes the response of the second message to obtain the public key of the second key pair, and verifies that the response of the second message is correct and then stores the public key of the second key pair;
in this embodiment, the steps specifically include: the service processing terminal analyzes the response of the second message to obtain a seventh abstract value and a public key of the second key pair, performs abstract operation on the public key of the second key pair to obtain an eighth abstract value, judges whether the seventh abstract value is the same as the eighth abstract value, if so, the response of the second message is correct, the public key of the second key pair is stored, if not, the service processing terminal reports errors and ends;
The method specifically comprises the following steps: the service processing terminal analyzes the response of the second message to obtain the public key of the second key pair, and after verifying the response of the second message is correct, the public key of the second key pair, the service processing pointer and the service processing terminal ID are correspondingly stored.
As shown in fig. 4, the business process flow includes the steps of:
step 301, a service processing terminal prompts a user to input service data and receives the service data input by the user;
in this embodiment, this step may further be: and the service processing terminal receives the consumption instruction issued by the upper computer and analyzes the consumption instruction to obtain service data.
In this embodiment, the upper computer and the service processing terminal may be connected wirelessly or by wire.
Step 302, displaying a code scanning interface for prompting a user by a service processing terminal;
step 303, the service processing terminal performs a code scanning operation to obtain a two-dimensional code value;
step 304, the service processing terminal organizes a service processing message according to the two-dimensional code value, the service data processing mode, the service processing pointer and the service processing terminal ID;
in this embodiment, the steps specifically include: the service processing terminal forms a first signature original text according to the two-dimensional code value, the service data and the service data processing mode, the service processing pointer and the service processing terminal ID, the private key of the first key pair is used for signing the first signature original text to generate a first signature value, and the service processing message is generated according to the first signature value and the first signature original text;
In this embodiment, the steps specifically include: the service processing terminal generates URL data and Json format parameter data, and forms a first message according to the URL data and the Json format parameter data, wherein the Json format parameter data comprises a service data processing mode, a service processing pointer and a service processing terminal ID;
the service processing terminal generating URL data includes: the service processing terminal splices the server website, the identification of the URL and the token value to obtain URL data;
the service processing terminal generating json format data comprises the following steps: and the service processing terminal generates a third signature field value according to the plurality of request parameters, splices each request parameter to obtain a spliced request parameter, and splices the third signature field value with the spliced request parameter to obtain json format parameter data.
The service processing terminal generating a third signature field value according to the plurality of request parameters comprises the following steps:
step c1, the service processing terminal sorts all request parameters according to alphabetical order, wherein the request parameters comprise two-dimensional code values, service data processing modes, service processing pointers and service processing terminal IDs;
in this embodiment, the request parameters include: the method comprises the steps of site parameters, time zone parameters, service data processing mode parameters, service processing pointer parameters, terminal ID parameters, resource coding parameters, service data parameters, receipt coding parameters, two-dimensional code value parameters, application name and version and signature value parameters;
In this embodiment, each request parameter consists of a parameter identifier and its parameter value;
for example, a business data processing mode parameter payType,05, wherein payType is a business data processing mode parameter identifier, and 05 is a business data processing mode parameter value;
the request parameters also include: resource coding parameters currencyCode, JPY, business data parameters amount3333, receipt coding parameters receiptNo,100022200001, application name and version parameters appVersion, iso-wechat-5.3.1; the service data processing mode parameters valueType, a, the two-dimensional code value parameters user code,201609613361229,
service handling pointer parameter branch code, OS035610312999, service handling terminal ID parameter terminalCode, OT04G9h54384uivr.
Step c2, the service processing terminal performs form conversion on each request parameter according to a preset format, and connects the request parameters after the form conversion by using a preset symbol to obtain a seventh character string;
for example, after each request parameter is converted according to the form of parameter identifier=parameter value, a seventh character string is obtained as follows: amount=1 & appversion=rtos-ftpay-0.0.0 & branchcode=os 035610312999& currencycode=jpy & locale=japan & paytype=99 & terminalnode=ot 04G9h54384uivr & timezone=p9 & usercode= 287804669604574238;
Step c3, the business processing terminal uses brackets to form an eighth character string, performs abstract operation on the eighth character string, and signs the abstract operation result of the eighth character string by using a private key of the first key pair to obtain first signature data;
for example, the service processing terminal includes the first string with brackets to form an eighth string, performs SHA1 digest operation on the eighth string, and signs the result of the eighth string digest operation with the private key of the first key pair to obtain the first signature data: a33EB8FE 0457C307383547D42800AD900C3891D3BDD9FD1C9ECBCA27761793BE219130332336A7C5AA456F16C4186E69758EC8944A7C7C23745045BF41CCD4775E73EA7203CD96573883328B58E49690B372F 8B 174503BB432C4ED2E4903E86DE13B985AB1E 1D 1A 03086F7F9A1D73A559BAD1C072C5DADC18B8F 940B 8708C35E87FD4082CB93a717C9C7F90E16385EE74ECB8C63E3ADDFD12BACC628842184E56E827F5AEECBC5F32CDE8EC82D18613E501B221FF1F1a66FE6C1103B4D03FFB6B04BC9 fed 7B08AFD9D1a15730BB 8C11CE82ED803479BC494E6BB305D86DFCE46F8B00F1C45A8EBB56a6455597a6651D 3003 BCDC4E875F21;
and c4, the service processing terminal performs Base64 coding operation on the first signature data to obtain first coded signature data, and performs Base64 coding operation on the first coded signature data to obtain a third signature field value.
For example, the service processing terminal performs Base64 encoding operation on the first signature data to obtain first encoded signature data: oz 64/uBFDBzg 1R9QoAK2QDDiR 073Z/Ryy 8 ondheTvGRMDMjNqfFkFqkFQBml 1 jsimUSnx 8I3RQRb9BzNR3XnPqcgPNllc4 gzKLWWWkLNy 87jBdFA7tDLE7S5JA+ht4 TuYWrHohoDCG 9/mh1zpVm60cByxdrcGLj5QPFVsv6HCMNEh/1AgsuTpxfJx/kOFjhe507LjGPjrd/RK6zGKIQhhOVugn9a7svF yzjsgtGGE+UBSIH/Hxpm/mwRA 7TQP/trBLyf73sIr9nRoVcwuxYKuMEc6C7YA0ebxJTmuzBdht/ORviwDxxFqOu1amRVWXpmUdMEA7 zcTodfIQ= =, and performing Base64 coding operation on the first coded signature data to obtain a third signature field value: b3o2NC91QkZmREJ6 ZzFSFvsyUVUREaVIwNzNaL 1J5ZXk4b25 kaGVGUdmlHUk 1 ETWpWcWcWtWkWdZUvlibWwxanPVVNueDhJM 1JRUmI5 QnpOUjNybbxY 2dQTmxsYzRnektMV09TV2tMTnk4N2pCZEzBN3RETEU3 UzVKQTodDRUdVLXckhoRFZRENHOS 9tadF6cFztNjBjQnl4zHJJR0 xqFQLZzzdjzjZIQ 01 OzWgMUFvFjFjC 3VucHhmSngva09GamhlNTA3TGpHUgpyZC9 SSz6R 0tJUWhoT1Z1Z245YTdzdkY4 eXplanNndEdHRStVQnpSC 9IeHBtL213UkE VFFQL3RyQkx5Zjczc0lyOW5Sb1Zjd V4WUt1TUVjNkM3WUEwZWJ4SlRtdXpCZGh0L09Sdml3RHh4RnFPdTFhbVJWV1 hwbVVVVVVVVVVVVVV3 pjVG9 kZkZkkLRPT 0=.
Step 305, the service processing terminal sends the service processing message to the server;
Step 306, the server analyzes the service processing message to obtain a two-dimensional code value, service data, a service data processing mode, a service processing pointer and a service processing terminal ID, and operates according to the two-dimensional code value, the service data processing mode, the service processing pointer and the service processing terminal ID to obtain an operation result, and a service processing message response is formed according to the operation result;
in this embodiment, the steps specifically include: the server analyzes the service processing message to obtain a first signature value and a first signature original text, searches a public key of a first key pair according to the service processing pointer and the service processing terminal ID, uses the public key of the first key pair to check the first signature value, operates according to the two-dimensional code value, the service data processing mode, the service processing pointer and the service processing terminal ID in the first signature original text after the check is correct, obtains an operation result, uses a private key of a second key pair to perform signature operation on the operation result to obtain a second signature value, and forms a service processing message response according to the second signature value and the operation result;
in this step, signing the first signature value by using the public key of the first key pair specifically includes: and the server performs Base64 decoding on the first signature value to obtain first coded signature data, performs Base64 decoding on the first coded signature data to obtain first signature data, and performs signature verification on the first signature data by using the public key of the first key pair.
The method specifically comprises the following steps: the server analyzes the service processing message to obtain a third signature field value and each request parameter, the server decodes the first signature value to obtain first coded signature data, the server decodes the first coded signature data to obtain first signature data, the server decrypts the first signature data by using a private key of a first key pair to obtain plaintext data, the server processes each request parameter in the same mode as the service processing terminals c1 and c2 to obtain a character string, the character string is subjected to abstract operation to obtain a first signature verification value, the first signature verification value is compared with the plaintext data to judge whether the first signature verification value is the same as the plaintext data, if so, the server operates according to a two-dimensional code value in the first signature original, the service data processing mode, the service processing pointer and the service processing terminal ID to obtain operation results, the server uses the private key of a second key pair to perform signature operation on the operation results to obtain a second signature value, and forms a service processing message response according to the second signature value and the operation results, and if not the first signature value is the same as the plaintext data, and if so, the message is wrong.
Step 307, the server sends the service processing message response to the service processing terminal;
Step 308, the service processing terminal receives the service processing message response sent by the server, analyzes the service processing message response to obtain an operation result, operates according to the operation result, and returns to step 103.
In this embodiment, the steps specifically include: the service processing terminal receives the service processing message response sent by the server, analyzes the service processing message response to obtain a second signature value and an operation result, uses a public key of a second public key pair to check the second signature value, and operates according to the operation result after verification is correct.
In this step, the operation performed by the service processing terminal according to the operation result specifically includes:
when the operation result is the operation result of successful service processing, the service processing terminal stores a service processing record according to the serial number in the operation result and prompts the user that the service processing is successful;
and when the operation result is that the service processing fails, the service processing terminal prompts the user that the service processing fails.
In this embodiment, the manner in which the service processing terminal prompts the user may be through a display interface, or may also be through voice.
In this step, the operation performed by the service processing terminal according to the operation result may further include:
When the operation result is that the service processing is in progress, the service processing terminal prompts the user that the service processing is in progress, and the following steps are executed:
step a1, a service processing terminal sends a service processing state inquiry instruction to a server at preset time intervals;
step a2, the service processing terminal judges whether the operation result of successful service processing or failed service processing sent by the server is received within a preset time, and when the service processing terminal receives the operation result of successful service processing sent by the server within the preset time, the service processing terminal stores a service processing record according to the serial number in the operation result and prompts the user that the service processing is successful; when the service processing terminal receives the operation result of the service processing failure sent by the server in a preset time, the service processing terminal prompts the user that the service processing fails; and when the service processing terminal does not receive the operation result of successful service processing or failed service processing sent by the server within the preset time, the service processing terminal prompts the user that the service processing is failed.
As shown in fig. 5, the service feedback procedure includes the following steps:
step 401, a service processing terminal prompts a user to input a device password;
Step 402, the service processing terminal receives the device password input by the user, and judges whether the device password input by the user is correct, if yes, step 403 is executed, if not, an error is prompted, and step 401 is returned;
step 403, the service processing terminal obtains a service feedback serial number and service feedback data;
specifically, the step may be: after prompting a user to input a service feedback serial number and service feedback data, the service processing terminal receives the serial number and the service feedback data input by the user;
specifically, the step may further be: the service processing terminal obtains a service feedback serial number through code scanning and receives service feedback data input by a user;
specifically, the step may further be: the service processing terminal receives a service feedback instruction sent by the upper computer, and analyzes the service feedback instruction to obtain a service feedback serial number and service feedback data;
in this embodiment, the upper computer and the service processing terminal may be connected wirelessly or by wire.
Specifically, the step may further be: the service processing terminal inquires a service processing record stored by the service processing terminal, selects a service processing record to be fed back by the service from the stored service processing record, acquires a serial number and service data to be fed back by the service from the service processing record, and takes the service data as service feedback data;
Specifically, the step may further be: the service processing terminal inquires the service processing record stored by the service processing terminal, selects the service processing record to be fed back from the stored service processing records, acquires the serial number to be fed back from the service processing record, and receives the user input service feedback data.
Step 404, the service processing terminal composes a second signature original text according to the serial number and the service feedback data, signs the second signature original text by using the private key of the first key pair to generate a second signature value, and generates a service feedback request message according to the second signature value and the second signature original text;
step 405, the service processing terminal sends a service feedback request message to the server;
step 406, the server receives the service feedback request message, uses the public key of the first key pair to analyze the service feedback request message to obtain a serial number and service feedback data, operates according to the serial number and the service feedback data to obtain an operation result, forms a service feedback request response message according to the serial number, the service feedback data and the operation result, signs the service feedback request response message by using the private key of the second key pair to obtain a fifth signature value, and generates the service feedback request response message according to the service feedback request response message and the fifth signature value;
Step 407, the server sends the service feedback request response message to the service processing terminal;
step 408, the service processing terminal analyzes the service feedback request response message to obtain a service feedback request response and a fifth signature value, and checks the fifth signature value according to the public key of the second key pair to determine whether the fifth signature value is correct, if yes, step 409 is executed, if no, an error is reported, and step 103 is returned;
step 409, the service processing terminal operates according to the service feedback result, and returns to step 103;
in this step, the operation performed by the service processing terminal according to the service feedback result specifically includes:
and when the operation result is that the service feedback is successful, the service processing terminal prompts that the service feedback is successful, generates a service feedback record according to the serial number and the service feedback data, saves the service feedback record, and returns to the step 403.
When the operation result is that the service feedback fails, the service processing terminal prompts that the service feedback fails, and returns to step 403;
when the operation result is that the service feedback is in progress, the service processing terminal prompts the user that the service feedback is in progress, and the following steps are executed:
step c1, a service processing terminal sends a service feedback state query instruction to a server at preset time intervals;
Step c2, the service processing terminal judges whether the operation result of successful service feedback or failed service feedback sent by the server is received within a preset time, and when the service processing terminal receives the operation result of successful service feedback sent by the server within the preset time, the service processing terminal generates a service feedback record according to the serial number and the service feedback data in the operation result, saves the service feedback record and prompts the user that the service feedback is successful; when the service processing terminal receives the operation result of service feedback failure sent by the server in a preset time, the service processing terminal prompts the user that the service feedback fails; and when the service processing terminal does not receive the operation result of successful service feedback or failed service feedback sent by the server within the preset time, the service processing terminal prompts the user that the service feedback fails.
The embodiment also provides a system for realizing service processing by scanning codes, which comprises a service processing terminal device, and is characterized in that the service processing terminal device comprises at least one processor, a memory and instructions which are stored in the memory and can be executed by the at least one processor, and the at least one processor executes the instructions to execute the method.
The present embodiment also provides a computer-readable storage medium comprising a computer program which, when run on a service processing terminal apparatus, causes the service processing terminal apparatus to perform the above-described method.
The present embodiment also provides a chip, wherein the chip is coupled to the memory for executing a computer program stored in the memory for performing the above method.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs. When the computer program is loaded and executed, the flow or functions according to the embodiments of the present application are produced in whole or in part. The computer program may be stored in or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one base station, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means to another base station, server, or data center. The computer readable storage medium may be any available medium that can be accessed by an apparatus of the present application or a data storage device comprising one or more servers, data centers, etc., which can be integrated with the medium. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Although the application is described herein in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a study of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. The method for realizing business processing by scanning codes is characterized by comprising the following steps:
Step 1, a service processing terminal sends an activation code input by a user to a server;
step 2, the server generates a corresponding service processing pointer and a service processing terminal identifier according to the activation code, and sends the service processing pointer and the service processing terminal identifier to the service processing terminal;
step 3, the service processing terminal generates a first key pair and sends the public key of the first key pair to the server;
step 4, the server stores the public key of the first key pair, generates a second key pair and sends the public key of the second key pair to the service processing terminal;
step 5, the business processing terminal saves the public key of the second key pair;
step 6, the service processing terminal uses the private key of the first key pair to execute signature operation to generate a first signature value according to service data input by a user, a two-dimensional code value of the user obtained through scanning, a service data processing mode, the service processing pointer and the service processing terminal identifier, and generates a service processing message according to the first signature value, the service data, the two-dimensional code value, the service data processing mode, the service processing pointer and the service processing terminal identifier, and the service processing message is sent to the server;
Step 7, the server analyzes the service processing message to obtain the service data and the two-dimensional code value, the service data processing mode, the service processing pointer, the service processing terminal identifier and the first signature value, and after the first signature value is checked by using the public key of the first key pair and the signature is correct, the service data processing mode, the service processing pointer and the service processing terminal identifier are operated to obtain an operation result according to the service data and the two-dimensional code value;
step 8, the server executes signature operation on the operation result according to the private key of the second key pair to generate a second signature value, generates a service processing result message according to the second signature value and the operation result, and sends the service processing result message to the service processing terminal;
and 9, the service processing terminal analyzes the service processing result message to obtain the operation result and a second signature value, and uses a public key of a second key pair to check the second signature value, and the service processing terminal operates according to the operation result after the check is correct.
2. The method of claim 1, wherein in the step 9, the operation performed by the service processing terminal according to the operation result is specifically:
when the operation result is the operation result of successful service processing, the service processing terminal stores a service processing record according to the serial number in the operation result and prompts the user that the service processing is successful;
and when the operation result is the operation result of the service processing failure, the service processing terminal prompts the user that the service processing fails.
3. The method of claim 2, wherein in the step 9, the service processing terminal performs operations according to the operation result further includes:
when the operation result is that the service processing is in progress, the service processing terminal prompts the user that the service processing is in progress, and the following steps are executed:
step a1, the service processing terminal sends a service processing state inquiry instruction to the server at preset time intervals;
step a2, the service processing terminal judges whether the operation result of successful service processing or failed service processing sent by the server is received within a preset time, and when the operation result of successful service processing sent by the server is received within the preset time, the service processing terminal stores a service processing record according to the serial number in the operation result and prompts the user that the service processing is successful; when the service processing terminal receives the operation result of the service processing failure sent by the server within a preset time, the service processing terminal prompts the user that the service processing fails; and when the service processing terminal does not receive the operation result of successful service processing or failed service processing sent by the server in the preset time, the service processing terminal prompts the user that the service processing is failed.
4. The method of claim 2, wherein,
the step 9 further comprises the following steps:
step 10, the service processing terminal obtains a service feedback serial number and service feedback data, signs the service feedback serial number and the service feedback data by using a private key of the first key pair to generate a second signature value, generates a service feedback request according to the service feedback serial number, the service feedback data and the second signature value, and sends the service feedback request to the server;
step 11, the server analyzes the service feedback request message to obtain the service feedback serial number, the service feedback data and the second signature value, after checking that the second signature value is correct according to the public key of the first key pair, the server operates according to the serial number and the service feedback data to obtain a service feedback operation result, uses the private key of the second key pair to perform signature operation on the serial number, the service feedback data and the service feedback operation result to obtain a fifth signature value, generates a service feedback request response according to the serial number, the service feedback data, the operation result and the fifth signature value, and sends the service feedback request response to the service processing terminal;
And step 12, the service processing terminal analyzes the service feedback request response message to obtain the service feedback request response and the fifth signature value, and performs operation according to a service feedback operation result in the service feedback request response after verifying that the fifth signature is correct according to the public key of the second key pair.
5. The method as claimed in claim 4, wherein the operation in step 12 according to the service feedback operation result in the service feedback request response specifically includes:
when the service feedback operation result is that the service feedback is successful, the service processing terminal prompts that the service feedback is successful, generates a service feedback record according to the serial number and the service feedback data, and stores the service feedback record;
and when the service feedback operation result is that the service feedback fails, the service processing terminal prompts the service feedback failure.
6. The method of claim 5, wherein the operating in step 11 according to the service feedback operation result in the service feedback request response further comprises:
when the service feedback operation result is that the service feedback is in progress, the service processing terminal prompts the user that the service feedback is in progress, and the following steps are executed:
Step c1, the service processing terminal sends a service feedback state inquiry instruction to a server at preset time intervals;
step c2, the service processing terminal judges whether the operation result of successful service feedback or failed service feedback sent by the server is received within a preset time, and when the operation result of successful service feedback sent by the server is received within the preset time, the service processing terminal generates a service feedback record according to the serial number and the service feedback data in the service feedback operation result, saves the service feedback record and prompts the user that the service feedback is successful; when the service processing terminal receives the operation result of service feedback failure sent by the server within a preset time, the service processing terminal prompts a user that the service feedback fails; and when the service processing terminal does not receive the operation result of successful service feedback or failed service feedback sent by the server within the preset time, the service processing terminal prompts the user that the service feedback fails.
7. The method according to claim 1, wherein the step 6 is specifically:
the service processing terminal sorts service data input by a user and a two-dimensional code value, a service data processing mode, the service processing pointer and a service processing terminal identifier of the user obtained through code scanning according to a preset sequence, converts the sorted two-dimensional code value, the sorted service data processing mode, the sorted service processing pointer and the sorted service processing terminal identifier into a first signature original text according to a preset format, signs the first signature original text according to a private key of the first key pair to obtain a first signature value, and splices the first signature value, the service data and the two-dimensional code value, the service data processing mode, the service processing pointer and the service processing terminal identifier to generate a service processing message, and sends the service processing message to the server.
8. The method of claim 7, wherein the step 6 of signing the first signature original according to the private key of the first key pair obtains a first signature value, specifically: the service processing terminal uses a private key of the first key pair to sign the first signature original text to obtain first signature data, performs Base64 coding on the first signature data to obtain first coding signature data, performs Base64 coding on the first coding signature data to obtain a third signature field value, and takes the third signature field value as a first signature value;
in the step 7, signing the first signature value by using the public key of the first key pair specifically includes: and the server performs Base64 decoding on the first signature value to obtain first coded signature data, performs Base64 decoding on the first coded signature data to obtain first signature data, and performs signature verification on the first signature data by using the public key of the first key pair.
9. The method according to claim 1, wherein the step 3 is specifically:
the service processing terminal generates a first key pair, carries out Base64 coding on a public key of the first key pair to obtain a first coding result, carries out Base64 coding on the first coding result to obtain a second coding result, and sends the second coding result to the server;
The step 4 of storing, by the server, the public key of the first key pair specifically includes: and the server performs Base64 decoding on the second coding result to obtain a first decoding result, performs Base64 decoding on the first decoding result to obtain a public key of the first key pair, and stores the public key of the first key pair.
10. The method according to claim 1, wherein the step 3 is specifically:
the service processing terminal generates a first key pair and an application program interface key value, calculates the data obtained by splicing the public key of the first key pair and the application program interface key value according to a preset algorithm to obtain a second signature field value, splices the second signature field value with the public key of the first key pair and the application program interface key value to obtain first public key data, and sends the first public key data to the server;
the step 4 of storing, by the server, the public key of the first key pair specifically includes: the server analyzes the first public key data to obtain signature field data, a public key of the first key pair and the application program interface key value, calculates the public key of the first key pair and the application program interface key value according to the preset algorithm to obtain second signature field data, and stores the public key of the first key pair after judging that the second signature field data is identical to the first signature field data.
11. A system for code scanning to effect traffic processing, the system comprising a traffic processing terminal device, characterized in that the traffic processing terminal device comprises at least one processor, a memory and instructions stored on the memory and executable by the at least one processor, the at least one processor executing the instructions to effect the method of any one of claims 1 to 10.
12. A computer readable storage medium, characterized in that the computer readable storage medium comprises a computer program which, when run on a service processing terminal apparatus, causes the service processing terminal apparatus to perform the method according to any of claims 1 to 10.
13. A chip, characterized in that the chip is coupled to a memory for executing a computer program stored in the memory for performing the method of any of claims 1 to 10.
CN202111657576.1A 2021-12-30 2021-12-30 Method and system for realizing business processing by code scanning Active CN114330616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111657576.1A CN114330616B (en) 2021-12-30 2021-12-30 Method and system for realizing business processing by code scanning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111657576.1A CN114330616B (en) 2021-12-30 2021-12-30 Method and system for realizing business processing by code scanning

Publications (2)

Publication Number Publication Date
CN114330616A CN114330616A (en) 2022-04-12
CN114330616B true CN114330616B (en) 2023-09-22

Family

ID=81018711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111657576.1A Active CN114330616B (en) 2021-12-30 2021-12-30 Method and system for realizing business processing by code scanning

Country Status (1)

Country Link
CN (1) CN114330616B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115296822B (en) * 2022-09-28 2022-12-20 飞天诚信科技股份有限公司 Method and system for realizing service processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102014110540A1 (en) * 2014-07-25 2016-01-28 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Delegable access control
CN105323062A (en) * 2014-06-03 2016-02-10 北京收付宝科技有限公司 Mobile terminal digital certificate electronic signature method
CN105515768A (en) * 2016-01-08 2016-04-20 腾讯科技(深圳)有限公司 Method, device and system for updating secret key
WO2017041621A1 (en) * 2015-09-07 2017-03-16 飞天诚信科技股份有限公司 Method and device for performing registration based on authentication device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104519066B (en) * 2014-12-23 2017-11-28 飞天诚信科技股份有限公司 A kind of method for activating mobile terminal token

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105323062A (en) * 2014-06-03 2016-02-10 北京收付宝科技有限公司 Mobile terminal digital certificate electronic signature method
DE102014110540A1 (en) * 2014-07-25 2016-01-28 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Delegable access control
WO2017041621A1 (en) * 2015-09-07 2017-03-16 飞天诚信科技股份有限公司 Method and device for performing registration based on authentication device
CN105515768A (en) * 2016-01-08 2016-04-20 腾讯科技(深圳)有限公司 Method, device and system for updating secret key

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于SM2的远程密钥管理系统分析与设计;李恒武;王辰阳;王志刚;;网络安全技术与应用(第09期);全文 *
物联网信息完整性保护方案;朱鹏飞;于华章;陆舟;;信息网络安全(第08期);全文 *

Also Published As

Publication number Publication date
CN114330616A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN105512881B (en) A kind of method and terminal for completing payment based on two dimensional code
CN110930147B (en) Offline payment method and device, electronic equipment and computer-readable storage medium
CN109040070B (en) File transmission method, device and computer readable storage medium
CN111064743B (en) Method and system for safely inputting password
CN104468531A (en) Authorization method, device and system for sensitive data
WO2019047613A1 (en) Verification system, method and device
CN108990047B (en) Test method, device and medium for subscription relationship management data preparation platform
CN101795263B (en) Secure broadband access method, authentication method, device and system
CN102958022A (en) Short message verification method, device and system
EP2854331A1 (en) Method and System for Authenticating a User of a Device
CN105227536A (en) A kind of Quick Response Code login method and equipment
CN113746638B (en) NFT storage method, NFT restoration method, computer device, and storage medium
CN114330616B (en) Method and system for realizing business processing by code scanning
CN106789924A (en) The method and system that a kind of digital certificate protection web site of use mobile terminal is logged in
CN104580112A (en) Service authentication method and system, and server
CN111885043B (en) Internet account login method, system, equipment and storage medium
CN109740324A (en) Multi-platform method for authenticating, device and computer readable storage medium
CN110602098B (en) Identity authentication method, device, equipment and storage medium
CN111050326B (en) Block chain-based short message verification method, device, equipment and medium
CN110768925B (en) Verification method and device for verification code short message
CN108882239B (en) Information sending method and device
CN114826623B (en) Mock test message processing method and device
CN115567271A (en) Authentication method and device, page skip method and device, electronic equipment and medium
KR101189802B1 (en) Method and apparatus for application program authentication
CN111680279B (en) Login verification method, device and system

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