CN-122022801-A - Payment transaction method and device, storage medium and electronic equipment
Abstract
The application discloses a payment transaction method and device, a storage medium and electronic equipment. The method comprises the steps of responding to a payment transaction instruction sent by a user, displaying a preset payment interface which does not contain graphic codes on a payment terminal, determining a target transaction environment identifier corresponding to the payment terminal according to geographic position information of the payment terminal, obtaining payment action data of the payment terminal, conducting transaction safety detection according to the target transaction environment identifier and the payment action data through a target detection model to obtain a detection result, training a preset machine learning model through a sample data set by the target detection model, updating the preset payment interface into the target payment interface which contains the graphic codes under the condition that the detection result represents transaction safety, and conducting payment transaction based on the graphic codes in the target payment interface. The application solves the problem of lower transaction security when using the graphic code to carry out payment transaction in the related technology.
Inventors
- XU YING
Assignees
- 中国工商银行股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260213
Claims (10)
- 1. A payment transaction method, characterized by being applied to a payment terminal, comprising: Responding to a payment transaction instruction sent by a user, and displaying a preset payment interface which does not contain a graphic code on the payment terminal; Determining a target transaction environment identifier corresponding to the payment terminal according to the geographic position information of the payment terminal; Acquiring payment action data of the payment terminal, and carrying out transaction security detection according to the target transaction environment identifier and the payment action data through a target detection model to obtain a detection result, wherein the target detection model is obtained by training a preset machine learning model by adopting a sample data set; And under the condition that the detection result represents transaction safety, updating the preset payment interface into a target payment interface containing a graphic code, and carrying out payment transaction based on the graphic code in the target payment interface.
- 2. The method of claim 1, wherein determining the target transaction environment identification corresponding to the payment terminal based on the geographic location information of the payment terminal comprises: determining a target transaction place where the payment terminal is located according to the geographic position information of the payment terminal; and determining the target transaction environment identifier according to the target transaction place and a first corresponding relation table, wherein the first corresponding relation table is used for recording the corresponding relation between the transaction place and the transaction environment identifier.
- 3. The method of claim 1, wherein prior to obtaining payment action data for the payment terminal, the method further comprises: Acquiring acceleration data of the payment terminal through an acceleration sensor of the payment terminal, and determining displacement data of the payment terminal according to the acceleration data; Acquiring rotation data of the payment terminal through a gyroscope of the payment terminal; And determining the payment action data according to the displacement data and the rotation data.
- 4. The method of claim 1, wherein conducting transaction security detection by a target detection model based on the target transaction environment identification and the payment action data, the obtaining a detection result comprising: acquiring an amplitude interval and a peak value corresponding to the target transaction environment identifier through the target detection model, and comparing the payment action data with the amplitude interval to obtain a first comparison result; Calculating the distance between the payment action data and the peak value to obtain a target distance, and comparing the target distance with a preset distance threshold to obtain a second comparison result; taking transaction safety as the detection result when the first comparison result indicates that the payment action data is in the amplitude interval and the second comparison result indicates that the target distance is smaller than or equal to the preset distance threshold; When the first comparison result indicates that the payment action data is in the amplitude interval and the second comparison result indicates that the target distance is larger than the preset distance threshold value, the transaction is to be verified as the detection result; And in the case that the first comparison result indicates that the payment action data is not in the amplitude interval, unsafe transaction is used as the detection result.
- 5. The method of claim 1, wherein prior to responding to the payment transaction instructions issued by the user, the method further comprises: determining the type of code scanning equipment in a transaction place, and generating a code scanning equipment set according to the type of the code scanning equipment; and determining a plurality of transaction environments according to the code scanning equipment set, configuring transaction environment identifiers for each transaction environment, and generating a second corresponding relation table.
- 6. The method of claim 1, wherein prior to responding to the payment transaction instructions issued by the user, the method further comprises: And determining the corresponding relation between the transaction place and the transaction environment identifier, and generating a first corresponding relation table according to the corresponding relation.
- 7. The method according to claim 1, wherein the object detection model is obtained by: acquiring the sample data set, wherein the sample data set comprises sample payment action data and real labels corresponding to the sample payment action data; Training the preset machine learning model according to the sample data set until a preset condition is met, and obtaining the target detection model.
- 8. A payment transaction device, characterized by being applied to a payment terminal, comprising: the first processing unit is used for responding to a payment transaction instruction sent by a user, and displaying a preset payment interface which does not contain a graphic code on the payment terminal; The first determining unit is used for determining a target transaction environment identifier corresponding to the payment terminal according to the geographic position information of the payment terminal; The second processing unit is used for acquiring payment action data of the payment terminal, carrying out transaction security detection according to the target transaction environment identifier and the payment action data through a target detection model to obtain a detection result, wherein the target detection model is obtained by training a preset machine learning model by adopting a sample data set; And the third processing unit is used for updating the preset payment interface into a target payment interface containing a graphic code under the condition that the detection result represents transaction safety, and carrying out payment transaction based on the graphic code in the target payment interface.
- 9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored executable program, wherein the executable program when run controls a device in which the computer readable storage medium is located to perform the payment transaction method according to any one of claims 1 to 7.
- 10. An electronic device, comprising: A memory storing an executable program; A processor for executing the program, wherein the program when executed performs the payment transaction method of any of claims 1 to 7.
Description
Payment transaction method and device, storage medium and electronic equipment Technical Field The present application relates to the field of financial science and technology, and in particular, to a payment transaction method and apparatus, a storage medium, and an electronic device. Background Along with the popularization of mobile payment, the convenience of two-dimensional code secret payment-free is accepted by more and more consumers, and at present, when the graphic code is used for payment transaction in the related technology, the risk of leakage exists in a mode of directly displaying the payment code, and the transaction security is lower. Aiming at the problem of lower transaction security when using graphic codes to conduct payment transactions in the related art, no effective solution is proposed at present. Disclosure of Invention The application mainly aims to provide a payment transaction method and device, a storage medium and electronic equipment, so as to solve the problem of lower transaction security when using a graphic code to conduct payment transaction in the related technology. To achieve the above object, according to one aspect of the present application, there is provided a payment transaction method. The method is applied to a payment terminal, and comprises the steps of responding to a payment transaction instruction sent by a user, displaying a preset payment interface which does not contain a graphic code on the payment terminal, determining a target transaction environment identifier corresponding to the payment terminal according to geographic position information of the payment terminal, obtaining payment action data of the payment terminal, conducting transaction safety detection according to the target transaction environment identifier and the payment action data through a target detection model to obtain a detection result, wherein the target detection model is obtained by training a preset machine learning model through a sample data set, updating the preset payment interface into the target payment interface which contains the graphic code under the condition that the detection result represents transaction safety, and conducting payment transaction based on the graphic code in the target payment interface. Further, determining the target transaction environment identifier corresponding to the payment terminal according to the geographic position information of the payment terminal comprises determining a target transaction place where the payment terminal is located according to the geographic position information of the payment terminal, and determining the target transaction environment identifier according to the target transaction place and a first correspondence table, wherein the first correspondence table is used for recording the correspondence between the transaction place and the transaction environment identifier. Further, before the payment action data of the payment terminal are acquired, the method further comprises the steps of acquiring acceleration data of the payment terminal through an acceleration sensor of the payment terminal, determining displacement data of the payment terminal according to the acceleration data, acquiring rotation data of the payment terminal through a gyroscope of the payment terminal, and determining the payment action data according to the displacement data and the rotation data. Further, transaction safety detection is carried out according to the target transaction environment identification and payment action data through the target detection model, the detection result comprises the steps of obtaining an amplitude interval and a peak value corresponding to the target transaction environment identification through the target detection model, comparing payment action data with the amplitude interval to obtain a first comparison result, calculating the distance between the payment action data and the peak value to obtain a target distance, comparing the target distance with a preset distance threshold to obtain a second comparison result, taking transaction safety as the detection result when the first comparison result represents that the payment action data is in the amplitude interval and the second comparison result represents that the target distance is smaller than or equal to the preset distance threshold, taking transaction to be verified as the detection result when the first comparison result represents that the payment action data is in the amplitude interval and the second comparison result represents that the target distance is larger than the preset distance threshold, and taking transaction unsafe as the detection result when the first comparison result represents that the payment action data is not in the amplitude interval. Further, before responding to the payment transaction instruction sent by the user, the method further comprises the steps of determining the type of code scanning equipment of th