CN113723958A - Payment file testing method, device, equipment and medium based on AI encryption - Google Patents

Payment file testing method, device, equipment and medium based on AI encryption Download PDF

Info

Publication number
CN113723958A
CN113723958A CN202111011075.6A CN202111011075A CN113723958A CN 113723958 A CN113723958 A CN 113723958A CN 202111011075 A CN202111011075 A CN 202111011075A CN 113723958 A CN113723958 A CN 113723958A
Authority
CN
China
Prior art keywords
file
payment
virtual server
target
encryption
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.)
Pending
Application number
CN202111011075.6A
Other languages
Chinese (zh)
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.)
Ping An Pension Insurance Corp
Original Assignee
Ping An Pension Insurance Corp
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 Ping An Pension Insurance Corp filed Critical Ping An Pension Insurance Corp
Priority to CN202111011075.6A priority Critical patent/CN113723958A/en
Publication of CN113723958A publication Critical patent/CN113723958A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the field of artificial intelligence and testing, and provides a payment file testing method, device, equipment and medium based on AI encryption, which can simulate a designated server to match with an actual scene, not only pay attention to a data level, meanwhile, the interaction between the two parties is considered, so as to improve the accuracy of the test, the payment file which meets the format specification is automatically generated by utilizing the pre-constructed payment data table, the human error is avoided, the test efficiency and the test accuracy are improved, the security of the file in the data transmission process is ensured by encrypting through a preset encryption algorithm, the payment files of different social guaranties are simulated, and interacts with the simulated server to realize the automatic test of social security payment, thereby not only improving the test efficiency, and large-scale data can be simulated simultaneously, so that the correctness and readability of the data are improved, and effective pressure test is realized. Furthermore, the invention also relates to blockchain techniques, the payment data table and the virtual server may be stored in blockchain nodes.

Description

Payment file testing method, device, equipment and medium based on AI encryption
Technical Field
The invention relates to the technical field of testing, in particular to a payment file testing method, device, equipment and medium based on AI encryption.
Background
At present, payment notification service data between the occupational annuity system and social security of various regions are mainly transmitted through files, and in order to ensure that data transmission can be stably and accurately performed between the systems, a function and pressure test of a payment process needs to be performed on data transmission between the occupational annuity system and the social security of various regions, so that the accuracy of data butt joint is improved.
However, because the total social security number of the professional annuity system which is simultaneously connected is large (33 social security numbers in all countries), the requirements and specifications of different social security numbers are not uniform, the adopted encryption modes are different, each step of the relevant testing process needs manual operation, the time is consumed, and errors are easy to occur.
Disclosure of Invention
In view of the above, there is a need to provide a payment file testing method, device, apparatus and medium based on AI encryption, which aim to solve the problems of low efficiency and easy error of social security payment testing.
An AI encryption-based payment file testing method, comprising:
responding to a payment file test instruction based on AI encryption, acquiring a pre-constructed payment data table, and simulating at least one virtual server according to a designated social security server;
determining a target virtual server from the at least one virtual server according to the AI encryption-based payment file test instruction, and determining a target file format of the target virtual server;
analyzing the payment data table and generating a target payment file with the target file format;
encrypting the target payment file based on a preset encryption algorithm to obtain an encrypted file;
presetting the encrypted file to obtain a file to be uploaded;
the file channel is connected to the target virtual server, and the file to be uploaded is uploaded to the target virtual server through the file channel;
and generating a file ready notice by using the file to be uploaded, and downloading the file from the target virtual server according to the file ready notice to execute testing.
According to a preferred embodiment of the present invention, the parsing the payment data table and generating the target payment file having the target file format includes:
identifying a file type of the payment data table;
creating a file reading function according to the file type of the payment data table and the target file format;
reading data in the payment data table by using the file reading function;
converting the read data into character strings;
and writing the character string into a text file to obtain the target payment file.
According to a preferred embodiment of the present invention, the encrypting the target payment file based on a preset encryption algorithm to obtain an encrypted file includes:
splitting the target payment file according to rows to obtain at least one subfile;
for each subfile in the at least one subfile, carrying out XOR operation on the state matrix of each subfile and the key matrix to obtain a first matrix characteristic of each subfile;
executing a preset turn of transformation iteration on the first matrix characteristic of each subfile to obtain a second matrix characteristic of each subfile, wherein each turn of transformation iteration comprises the following steps: keeping the numerical value of each row in the matrix input in the current round unchanged, moving the numerical value of each row to the left by a random displacement amount to obtain a first matrix, keeping the position of each numerical value in the first matrix unchanged, acquiring data from an s-box to replace each numerical value in the first matrix to obtain a second matrix, determining a first characteristic and a second characteristic based on a key expansion algorithm, multiplying the second characteristic with each column in the second matrix to obtain a product, performing linear transformation on the product to obtain a third matrix, and performing exclusive-or operation on the third matrix and the second characteristic;
displacing the line of the second matrix characteristic of each subfile, randomly replacing each byte in the second matrix characteristic after the displacement, and carrying out XOR operation on the second matrix characteristic after the replacement and the specified matrix to obtain at least one encrypted subfile;
combining the at least one encrypted subfile to obtain an initial encrypted file;
encoding the initial encrypted file to obtain an encoded file;
and deleting the designated symbol in the encoded file to obtain the encrypted file.
According to a preferred embodiment of the present invention, the pre-setting the encrypted file to obtain a file to be uploaded includes:
determining a file naming format of the target virtual server;
naming the encrypted file according to the file naming format to obtain an initial file name of the encrypted file;
randomly acquiring a preset number of characters from the initial file name to construct a character string;
splicing the character string after the initial file name to obtain a target file name, and signing the encrypted file by using the target file name;
and compressing the signed encrypted file to obtain the file to be uploaded.
According to a preferred embodiment of the present invention, the file channel connected to the target virtual server includes:
inquiring a user name and a password of the target virtual server in a configuration database;
acquiring a file channel of the target virtual server;
verifying the connection authority of the file channel of the target virtual server according to the inquired user name and the password;
and when the connection authority passes the verification, connecting to a file channel of the target virtual server.
According to a preferred embodiment of the present invention, the generating a file ready notification by using the file to be uploaded comprises:
acquiring the file content of the file to be uploaded;
generating a message according to the file content of the file to be uploaded;
and adding a secret key generated when the target payment file is encrypted to the generated message to obtain the file ready notice.
According to a preferred embodiment of the present invention, the downloading of the file from the target virtual server according to the file ready notification comprises:
determining a file to be downloaded according to the file ready notice;
downloading the file to be downloaded from the target virtual server;
carrying out payment processing by using the file to be downloaded, and returning a payment result;
verifying the payment result;
when the payment result passes the verification, determining that the file to be downloaded passes the test; or
And when the payment result is not verified, determining that the file to be downloaded does not pass the test.
An AI encryption based payment file testing apparatus, the AI encryption based payment file testing apparatus comprising:
the simulation unit is used for responding to a payment file test instruction based on AI encryption, acquiring a pre-constructed payment data table and simulating at least one virtual server according to a specified social security server;
a determining unit, configured to determine a target virtual server from the at least one virtual server according to the AI-encryption-based payment file test instruction, and determine a target file format of the target virtual server;
the generating unit is used for analyzing the payment data table and generating a target payment file with the target file format;
the encryption unit is used for encrypting the target payment file based on a preset encryption algorithm to obtain an encrypted file;
the processing unit is used for carrying out preset processing on the encrypted file to obtain a file to be uploaded;
the uploading unit is used for connecting to a file channel of the target virtual server and uploading the file to be uploaded to the target virtual server through the file channel;
and the test unit is used for generating a file ready notice by utilizing the file to be uploaded and downloading the file from the target virtual server according to the file ready notice to execute the test.
A computer device, the computer device comprising:
a memory storing at least one instruction; and
a processor that executes instructions stored in the memory to implement the AI-encryption based payment file testing method.
A computer-readable storage medium having stored therein at least one instruction for execution by a processor in a computer device to implement the AI-encryption based payment file testing method.
It can be seen from the above technical solutions that the present invention can respond to a payment file test instruction based on AI encryption, obtain a pre-constructed payment data table, and simulate at least one virtual server according to a designated social security server, because the payment data table is pre-constructed and the virtual server is pre-simulated, when there is a new demand, only the payment data table and the virtual server need to be expanded, thereby improving the expandability of the scheme, further ensuring the test quality while reducing the labor cost and improving the test efficiency, determining a target virtual server from the at least one virtual server according to the payment file test instruction based on AI encryption, determining the target file format of the target virtual server, analyzing the payment data table, and generating a target payment file having the target file format, the method comprises the steps of automatically generating a payment file meeting format specifications by utilizing a pre-constructed payment data table without manual configuration, effectively saving the time for generating test data, avoiding errors caused by artificially constructed data, assisting in improving the test efficiency and accuracy, encrypting a target payment file based on a preset encryption algorithm to obtain an encrypted file, encrypting the encrypted file line by line to ensure the safety of the file in the data transmission process, carrying out preset processing on the encrypted file to obtain a file to be uploaded, connecting the file to be uploaded to a file channel of a target virtual server, uploading the file to be uploaded to the target virtual server through the file channel, generating a file ready notice by utilizing the file to be uploaded, downloading the file from the target virtual server according to the file ready notice to execute a test, and further simulating the payment files of different social guaranties, and the system and the method perform file interaction with a pre-simulated virtual server, realize automatic test of social security payment, improve test efficiency, simulate larger-scale data, and improve correctness and readability of the data so as to realize effective pressure test.
Drawings
Fig. 1 is a flowchart of a preferred embodiment of the AI encryption based payment file testing method of the present invention.
Fig. 2 is a functional block diagram of a preferred embodiment of the AI encryption based payment document testing apparatus according to the present invention.
Fig. 3 is a schematic structural diagram of a computer device according to a preferred embodiment of the method for testing a payment file based on AI encryption.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flow chart of a preferred embodiment of the AI encryption based payment document testing method according to the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The payment file testing method based on the AI encryption is applied to one or more computer devices, wherein the computer devices are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and hardware of the computer devices includes but is not limited to a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device and the like.
The computer device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive web Television (IPTV), an intelligent wearable device, and the like.
The computer device may also include a network device and/or a user device. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network servers.
The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The Network in which the computer device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
And S10, responding to the payment file test instruction based on AI encryption, acquiring a pre-constructed payment data table, and simulating at least one virtual server according to the appointed social security server.
In at least one embodiment of the present invention, the AI encryption based payment file test instruction may be triggered by the relevant tester, and the present invention is not limited thereto.
In at least one embodiment of the present invention, the payment data table may be an Excel table or the like.
In at least one embodiment of the invention, the data in the payment data table may include, but is not limited to, one or a combination of:
file generation date, file generation time, data batch number, total record number, total amount of money to be paid before tax, total amount of money to be paid after tax, originator organization code, recipient organization code, payment type, social security serial number, certificate type, etc.
In at least one embodiment of the present invention, the data content and the data sequence in the payment data table may be configured by a user, which is not limited by the present invention.
Different from the traditional test scheme that only the data level is concerned, the embodiment simulates the social security server commonly used in the market at present to construct at least one virtual server so as to be matched with the actual application scene, not only the data level is concerned, but also the interaction between the two parties is considered, and the accuracy of the test is improved.
Specifically, the at least one virtual server may be a Web server or the like.
S11, determining a target virtual server from the at least one virtual server according to the AI-encryption-based payment file test instruction, and determining a target file format of the target virtual server.
In at least one embodiment of the present invention, the determining a target virtual server according to the AI-encryption-based payment file test instruction includes:
analyzing the payment file test instruction based on the AI encryption to obtain information carried by the payment file test instruction based on the AI encryption;
acquiring a preset label corresponding to the server identification code;
constructing a regular expression according to the preset label;
traversing information carried by the AI-encryption-based payment file test instruction by using the regular expression, and determining the traversed information matched with the regular expression as a target server identification code;
and acquiring the target virtual server from the at least one virtual server according to the identification code of the target server.
The preset tag can be configured in a user-defined mode, corresponds to the server identification code, and can be uniquely positioned to a virtual server through the server identification code.
For example: the preset tag may be configured as an ID, and the regular expression built according to the preset tag may be an ID ().
Further, traversing information carried by the AI-encryption-based payment file test instruction by using the regular expression ID (), determining the traversed information matched with the regular expression ID () as a target server identification code, and further determining a virtual server with the target server identification code in the at least one virtual server as the target virtual server.
Through the embodiment, the required data can be acquired based on the labels and the regular expressions, and due to the uniqueness of the labels, the data acquisition efficiency is improved, and meanwhile, the accuracy of the acquired data is guaranteed.
It can be understood that each virtual server has specifications and requirements for a file format, and the embodiment determines the target file format of the target virtual server, so as to facilitate subsequent generation of a file conforming to the file format specification.
And S12, analyzing the payment data table and generating a target payment file with the target file format.
In at least one embodiment of the present invention, the parsing the payment data table and generating the target payment file having the target file format includes:
identifying a file type of the payment data table;
creating a file reading function according to the file type of the payment data table and the target file format;
reading data in the payment data table by using the file reading function;
converting the read data into character strings;
and writing the character string into a text file to obtain the target payment file.
For example: the file read function may be an ExcelReader function.
Specifically, when the file type of the payment data table is in an excel file format, the payment data table can be read by adopting an hssfWorkbook function; when the file type of the payment data table is in the xls file format, the POI can be used for reading.
Specifically, when converting the read data into a character string, for character type data, insufficient bits are filled with blank spaces after the converted character string; for digital data, if the number is less than the number of bits, 0 is supplemented in front of the converted character string without adding a separator; the amount data is an integer divided into units without decimal points.
In the conventional test scheme, the actual communication with the corresponding social security server cannot be realized during the test, and the test data is obtained from the corresponding social security server, so that the data needs to be compiled by a tester for each test, the time consumption is high, the accuracy is low, and errors are easy to occur.
Through the embodiment, the payment file meeting the format specification of the corresponding social security server can be automatically generated by utilizing the pre-constructed payment data table, namely, the test data meeting the requirements of the interactive object is automatically generated, manual configuration is not needed, the time for generating the test data is effectively saved, errors caused by artificially constructing data can be avoided, and the test efficiency and the accuracy are assisted to be improved.
And S13, encrypting the target payment file based on a preset encryption algorithm to obtain an encrypted file.
In at least one embodiment of the present invention, the encrypting the target payment file based on a preset encryption algorithm to obtain an encrypted file includes:
splitting the target payment file according to rows to obtain at least one subfile;
for each subfile in the at least one subfile, carrying out XOR operation on the state matrix of each subfile and the key matrix to obtain a first matrix characteristic of each subfile;
executing a preset turn of transformation iteration on the first matrix characteristic of each subfile to obtain a second matrix characteristic of each subfile, wherein each turn of transformation iteration comprises the following steps: keeping the numerical value of each row in the matrix input in the current round unchanged, moving the numerical value of each row to the left by a random displacement amount to obtain a first matrix, keeping the position of each numerical value in the first matrix unchanged, acquiring data from an s-box to replace each numerical value in the first matrix to obtain a second matrix, determining a first characteristic and a second characteristic based on a key expansion algorithm, multiplying the second characteristic with each column in the second matrix to obtain a product, performing linear transformation on the product to obtain a third matrix, and performing exclusive-or operation on the third matrix and the second characteristic;
displacing the line of the second matrix characteristic of each subfile, randomly replacing each byte in the second matrix characteristic after the displacement, and carrying out XOR operation on the second matrix characteristic after the replacement and the specified matrix to obtain at least one encrypted subfile;
combining the at least one encrypted subfile to obtain an initial encrypted file;
encoding the initial encrypted file to obtain an encoded file;
and deleting the designated symbol in the encoded file to obtain the encrypted file.
Wherein the s-box can be custom configured.
Wherein, the preset turn can be 9 times.
The designated matrix may be configured by a user, for example, the designated matrix may be the same as the state matrix.
This embodiment improves traditional encryption algorithm, revise original asymmetric structure into symmetrical structure, the asymmetric problem of original encryption and decryption process has been solved, the mode of iterative transformation has been changed simultaneously, the repetitive computational process in original encryption has been got rid of, in order to simplify the encryption process, and then reduced the operand, the memory consumption has been saved, the operating time of encryption process has been reduced, also make subsequent decryption process and encryption process's consumption time equal, therefore, the encryption mode in this embodiment is when guaranteeing the security, even if face a large amount of test data, also can promote computational efficiency.
Further, the initial encrypted file may be encoded in the form of base64 encoding.
In this embodiment, the designated symbol may include, but is not limited to: line feed character, carriage return character, etc.
Through the implementation mode, the target payment file can be encrypted line by line, so that the security of the file in the data transmission process is ensured.
And S14, performing preset processing on the encrypted file to obtain a file to be uploaded.
In at least one embodiment of the present invention, the performing the preset processing on the encrypted file to obtain the file to be uploaded includes:
determining a file naming format of the target virtual server;
naming the encrypted file according to the file naming format to obtain an initial file name of the encrypted file;
randomly acquiring a preset number of characters from the initial file name to construct a character string;
splicing the character string after the initial file name to obtain a target file name, and signing the encrypted file by using the target file name;
and compressing the signed encrypted file to obtain the file to be uploaded.
In the above embodiment, the file is named according to the naming requirement of the corresponding virtual server on the file, and further, the randomly generated character string is combined, so that not only can the naming of the file be ensured to meet the requirement of the corresponding server, but also the non-repeatability of the naming of the file can be ensured.
And S15, connecting to the file channel of the target virtual server, and uploading the file to be uploaded to the target virtual server through the file channel.
In at least one embodiment of the present invention, the file channel connected to the target virtual server includes:
inquiring a user name and a password of the target virtual server in a configuration database;
acquiring a file channel of the target virtual server;
verifying the connection authority of the file channel of the target virtual server according to the inquired user name and the password;
and when the connection authority passes the verification, connecting to a file channel of the target virtual server.
The configuration database stores the user name and the password of each virtual server.
In this embodiment, the file channel of each virtual server is pre-created according to the user name and the password of each virtual server, and before being connected to each virtual server, the user name and the password issued by each virtual server are stored in the configuration database for subsequent query.
In this embodiment, when the queried user name and password are consistent with the user name and password of the target virtual server, it is determined that the connection authority passes the verification; and when the inquired user name and the password are not consistent with the user name and the password of the target virtual server, determining that the connection authority is not verified.
In at least one embodiment of the present invention, the file to be uploaded is uploaded to the target virtual server through the file channel for use in subsequent tests.
And S16, generating a file ready notice by using the file to be uploaded, and downloading the file from the target virtual server according to the file ready notice to execute the test.
In at least one embodiment of the present invention, the generating a file-ready notification by using the file to be uploaded includes:
acquiring the file content of the file to be uploaded;
generating a message according to the file content of the file to be uploaded;
and adding a secret key generated when the target payment file is encrypted to the generated message to obtain the file ready notice.
With the above-described embodiments, after the file ready notification is generated, the file is said to be ready, available for download and tested.
In at least one embodiment of the present invention, the downloading a file from the target virtual server according to the file ready notification to perform a test comprises:
determining a file to be downloaded according to the file ready notice;
downloading the file to be downloaded from the target virtual server;
carrying out payment processing by using the file to be downloaded, and returning a payment result;
verifying the payment result;
when the payment result passes the verification, determining that the file to be downloaded passes the test; or
And when the payment result is not verified, determining that the file to be downloaded does not pass the test.
By the aid of the method and the device, automatic testing of the payment process can be achieved by means of the generated test file.
It should be noted that, in the conventional test mode, data needs to be manually written, which is time-consuming and labor-consuming, and because of manual operation, errors are easily introduced, and the accuracy is low.
The embodiment can simulate payment files of different social security, and perform file interaction with the virtual server simulated in advance, so as to realize automatic test of the payment of the social security, thereby improving the test efficiency, simultaneously simulating large-scale data, improving the correctness and readability of the data, and realizing effective pressure test.
It should be noted that, in order to further improve the security of the data and avoid malicious tampering of the data, the payment data table and the virtual server may be stored in the blockchain node.
It can be seen from the above technical solutions that the present invention can respond to a payment file test instruction based on AI encryption, obtain a pre-constructed payment data table, and simulate at least one virtual server according to a designated social security server, because the payment data table is pre-constructed and the virtual server is pre-simulated, when there is a new demand, only the payment data table and the virtual server need to be expanded, thereby improving the expandability of the scheme, further ensuring the test quality while reducing the labor cost and improving the test efficiency, determining a target virtual server from the at least one virtual server according to the payment file test instruction based on AI encryption, determining the target file format of the target virtual server, analyzing the payment data table, and generating a target payment file having the target file format, the method comprises the steps of automatically generating a payment file meeting format specifications by utilizing a pre-constructed payment data table without manual configuration, effectively saving the time for generating test data, avoiding errors caused by artificially constructed data, assisting in improving the test efficiency and accuracy, encrypting a target payment file based on a preset encryption algorithm to obtain an encrypted file, encrypting the encrypted file line by line to ensure the safety of the file in the data transmission process, carrying out preset processing on the encrypted file to obtain a file to be uploaded, connecting the file to be uploaded to a file channel of a target virtual server, uploading the file to be uploaded to the target virtual server through the file channel, generating a file ready notice by utilizing the file to be uploaded, downloading the file from the target virtual server according to the file ready notice to execute a test, and further simulating the payment files of different social guaranties, and the system and the method perform file interaction with a pre-simulated virtual server, realize automatic test of social security payment, improve test efficiency, simulate larger-scale data, and improve correctness and readability of the data so as to realize effective pressure test.
Fig. 2 is a functional block diagram of a preferred embodiment of the payment document testing apparatus based on AI encryption according to the present invention. The AI-encryption-based payment document testing apparatus 11 includes a simulation unit 110, a determination unit 111, a generation unit 112, an encryption unit 113, a processing unit 114, an uploading unit 115, and a testing unit 116. The module/unit referred to in the present invention refers to a series of computer program segments that can be executed by the processor 13 and that can perform a fixed function, and that are stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
In response to the payment file test instruction based on the AI encryption, the simulation unit 110 acquires a pre-constructed payment data table and simulates at least one virtual server according to a designated social security server.
In at least one embodiment of the present invention, the AI encryption based payment file test instruction may be triggered by the relevant tester, and the present invention is not limited thereto.
In at least one embodiment of the present invention, the payment data table may be an Excel table or the like.
In at least one embodiment of the invention, the data in the payment data table may include, but is not limited to, one or a combination of:
file generation date, file generation time, data batch number, total record number, total amount of money to be paid before tax, total amount of money to be paid after tax, originator organization code, recipient organization code, payment type, social security serial number, certificate type, etc.
In at least one embodiment of the present invention, the data content and the data sequence in the payment data table may be configured by a user, which is not limited by the present invention.
Different from the traditional test scheme that only the data level is concerned, the embodiment simulates the social security server commonly used in the market at present to construct at least one virtual server so as to be matched with the actual application scene, not only the data level is concerned, but also the interaction between the two parties is considered, and the accuracy of the test is improved.
Specifically, the at least one virtual server may be a Web server or the like.
The determining unit 111 determines a target virtual server from the at least one virtual server according to the AI-encryption-based payment file test instruction, and determines a target file format of the target virtual server.
In at least one embodiment of the present invention, the determining unit 111 determines the target virtual server according to the AI-encryption-based payment file test instruction includes:
analyzing the payment file test instruction based on the AI encryption to obtain information carried by the payment file test instruction based on the AI encryption;
acquiring a preset label corresponding to the server identification code;
constructing a regular expression according to the preset label;
traversing information carried by the AI-encryption-based payment file test instruction by using the regular expression, and determining the traversed information matched with the regular expression as a target server identification code;
and acquiring the target virtual server from the at least one virtual server according to the identification code of the target server.
The preset tag can be configured in a user-defined mode, corresponds to the server identification code, and can be uniquely positioned to a virtual server through the server identification code.
For example: the preset tag may be configured as an ID, and the regular expression built according to the preset tag may be an ID ().
Further, traversing information carried by the AI-encryption-based payment file test instruction by using the regular expression ID (), determining the traversed information matched with the regular expression ID () as a target server identification code, and further determining a virtual server with the target server identification code in the at least one virtual server as the target virtual server.
Through the embodiment, the required data can be acquired based on the labels and the regular expressions, and due to the uniqueness of the labels, the data acquisition efficiency is improved, and meanwhile, the accuracy of the acquired data is guaranteed.
It can be understood that each virtual server has specifications and requirements for a file format, and the embodiment determines the target file format of the target virtual server, so as to facilitate subsequent generation of a file conforming to the file format specification.
The generating unit 112 parses the payment data table and generates a target payment file having the target file format.
In at least one embodiment of the present invention, the generating unit 112 parsing the payment data table and generating the target payment file having the target file format includes:
identifying a file type of the payment data table;
creating a file reading function according to the file type of the payment data table and the target file format;
reading data in the payment data table by using the file reading function;
converting the read data into character strings;
and writing the character string into a text file to obtain the target payment file.
For example: the file read function may be an ExcelReader function.
Specifically, when the file type of the payment data table is in an excel file format, the payment data table can be read by adopting an hssfWorkbook function; when the file type of the payment data table is in the xls file format, the POI can be used for reading.
Specifically, when converting the read data into a character string, for character type data, insufficient bits are filled with blank spaces after the converted character string; for digital data, if the number is less than the number of bits, 0 is supplemented in front of the converted character string without adding a separator; the amount data is an integer divided into units without decimal points.
In the conventional test scheme, the actual communication with the corresponding social security server cannot be realized during the test, and the test data is obtained from the corresponding social security server, so that the data needs to be compiled by a tester for each test, the time consumption is high, the accuracy is low, and errors are easy to occur.
Through the embodiment, the payment file meeting the format specification of the corresponding social security server can be automatically generated by utilizing the pre-constructed payment data table, namely, the test data meeting the requirements of the interactive object is automatically generated, manual configuration is not needed, the time for generating the test data is effectively saved, errors caused by artificially constructing data can be avoided, and the test efficiency and the accuracy are assisted to be improved.
The encryption unit 113 encrypts the target payment file based on a preset encryption algorithm to obtain an encrypted file.
In at least one embodiment of the present invention, the encrypting unit 113 encrypts the target payment file based on a preset encryption algorithm, and obtaining an encrypted file includes:
splitting the target payment file according to rows to obtain at least one subfile;
for each subfile in the at least one subfile, carrying out XOR operation on the state matrix of each subfile and the key matrix to obtain a first matrix characteristic of each subfile;
executing a preset turn of transformation iteration on the first matrix characteristic of each subfile to obtain a second matrix characteristic of each subfile, wherein each turn of transformation iteration comprises the following steps: keeping the numerical value of each row in the matrix input in the current round unchanged, moving the numerical value of each row to the left by a random displacement amount to obtain a first matrix, keeping the position of each numerical value in the first matrix unchanged, acquiring data from an s-box to replace each numerical value in the first matrix to obtain a second matrix, determining a first characteristic and a second characteristic based on a key expansion algorithm, multiplying the second characteristic with each column in the second matrix to obtain a product, performing linear transformation on the product to obtain a third matrix, and performing exclusive-or operation on the third matrix and the second characteristic;
displacing the line of the second matrix characteristic of each subfile, randomly replacing each byte in the second matrix characteristic after the displacement, and carrying out XOR operation on the second matrix characteristic after the replacement and the specified matrix to obtain at least one encrypted subfile;
combining the at least one encrypted subfile to obtain an initial encrypted file;
encoding the initial encrypted file to obtain an encoded file;
and deleting the designated symbol in the encoded file to obtain the encrypted file.
Wherein the s-box can be custom configured.
Wherein, the preset turn can be 9 times.
The designated matrix may be configured by a user, for example, the designated matrix may be the same as the state matrix.
This embodiment improves traditional encryption algorithm, revise original asymmetric structure into symmetrical structure, the asymmetric problem of original encryption and decryption process has been solved, the mode of iterative transformation has been changed simultaneously, the repetitive computational process in original encryption has been got rid of, in order to simplify the encryption process, and then reduced the operand, the memory consumption has been saved, the operating time of encryption process has been reduced, also make subsequent decryption process and encryption process's consumption time equal, therefore, the encryption mode in this embodiment is when guaranteeing the security, even if face a large amount of test data, also can promote computational efficiency.
Further, the initial encrypted file may be encoded in the form of base64 encoding.
In this embodiment, the designated symbol may include, but is not limited to: line feed character, carriage return character, etc.
Through the implementation mode, the target payment file can be encrypted line by line, so that the security of the file in the data transmission process is ensured.
The processing unit 114 performs preset processing on the encrypted file to obtain a file to be uploaded.
In at least one embodiment of the present invention, the performing, by the processing unit 114, a preset process on the encrypted file to obtain a file to be uploaded includes:
determining a file naming format of the target virtual server;
naming the encrypted file according to the file naming format to obtain an initial file name of the encrypted file;
randomly acquiring a preset number of characters from the initial file name to construct a character string;
splicing the character string after the initial file name to obtain a target file name, and signing the encrypted file by using the target file name;
and compressing the signed encrypted file to obtain the file to be uploaded.
In the above embodiment, the file is named according to the naming requirement of the corresponding virtual server on the file, and further, the randomly generated character string is combined, so that not only can the naming of the file be ensured to meet the requirement of the corresponding server, but also the non-repeatability of the naming of the file can be ensured.
The uploading unit 115 is connected to a file channel of the target virtual server, and uploads the file to be uploaded to the target virtual server through the file channel.
In at least one embodiment of the present invention, the file channel of the uploading unit 115 connected to the target virtual server includes:
inquiring a user name and a password of the target virtual server in a configuration database;
acquiring a file channel of the target virtual server;
verifying the connection authority of the file channel of the target virtual server according to the inquired user name and the password;
and when the connection authority passes the verification, connecting to a file channel of the target virtual server.
The configuration database stores the user name and the password of each virtual server.
In this embodiment, the file channel of each virtual server is pre-created according to the user name and the password of each virtual server, and before being connected to each virtual server, the user name and the password issued by each virtual server are stored in the configuration database for subsequent query.
In this embodiment, when the queried user name and password are consistent with the user name and password of the target virtual server, it is determined that the connection authority passes the verification; and when the inquired user name and the password are not consistent with the user name and the password of the target virtual server, determining that the connection authority is not verified.
In at least one embodiment of the present invention, the file to be uploaded is uploaded to the target virtual server through the file channel for use in subsequent tests.
The test unit 116 generates a file ready notification using the file to be uploaded, and downloads a file from the target virtual server according to the file ready notification to perform a test.
In at least one embodiment of the present invention, the test unit 116 generating the file ready notification by using the file to be uploaded comprises:
acquiring the file content of the file to be uploaded;
generating a message according to the file content of the file to be uploaded;
and adding a secret key generated when the target payment file is encrypted to the generated message to obtain the file ready notice.
With the above-described embodiments, after the file ready notification is generated, the file is said to be ready, available for download and tested.
In at least one embodiment of the present invention, the test unit 116 downloading a file from the target virtual server according to the file ready notification to perform a test comprises:
determining a file to be downloaded according to the file ready notice;
downloading the file to be downloaded from the target virtual server;
carrying out payment processing by using the file to be downloaded, and returning a payment result;
verifying the payment result;
when the payment result passes the verification, determining that the file to be downloaded passes the test; or
And when the payment result is not verified, determining that the file to be downloaded does not pass the test.
By the aid of the method and the device, automatic testing of the payment process can be achieved by means of the generated test file.
It should be noted that, in the conventional test mode, data needs to be manually written, which is time-consuming and labor-consuming, and because of manual operation, errors are easily introduced, and the accuracy is low.
The embodiment can simulate payment files of different social security, and perform file interaction with the virtual server simulated in advance, so as to realize automatic test of the payment of the social security, thereby improving the test efficiency, simultaneously simulating large-scale data, improving the correctness and readability of the data, and realizing effective pressure test.
It should be noted that, in order to further improve the security of the data and avoid malicious tampering of the data, the payment data table and the virtual server may be stored in the blockchain node.
It can be seen from the above technical solutions that the present invention can respond to a payment file test instruction based on AI encryption, obtain a pre-constructed payment data table, and simulate at least one virtual server according to a designated social security server, because the payment data table is pre-constructed and the virtual server is pre-simulated, when there is a new demand, only the payment data table and the virtual server need to be expanded, thereby improving the expandability of the scheme, further ensuring the test quality while reducing the labor cost and improving the test efficiency, determining a target virtual server from the at least one virtual server according to the payment file test instruction based on AI encryption, determining the target file format of the target virtual server, analyzing the payment data table, and generating a target payment file having the target file format, the method comprises the steps of automatically generating a payment file meeting format specifications by utilizing a pre-constructed payment data table without manual configuration, effectively saving the time for generating test data, avoiding errors caused by artificially constructed data, assisting in improving the test efficiency and accuracy, encrypting a target payment file based on a preset encryption algorithm to obtain an encrypted file, encrypting the encrypted file line by line to ensure the safety of the file in the data transmission process, carrying out preset processing on the encrypted file to obtain a file to be uploaded, connecting the file to be uploaded to a file channel of a target virtual server, uploading the file to be uploaded to the target virtual server through the file channel, generating a file ready notice by utilizing the file to be uploaded, downloading the file from the target virtual server according to the file ready notice to execute a test, and further simulating the payment files of different social guaranties, and the system and the method perform file interaction with a pre-simulated virtual server, realize automatic test of social security payment, improve test efficiency, simulate larger-scale data, and improve correctness and readability of the data so as to realize effective pressure test.
Fig. 3 is a schematic structural diagram of a computer device according to a preferred embodiment of the method for testing a payment file based on AI encryption according to the present invention.
The computer device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program, such as an AI encryption based payment file test program, stored in the memory 12 and executable on the processor 13.
It will be understood by those skilled in the art that the schematic diagram is merely an example of the computer device 1, and does not constitute a limitation to the computer device 1, the computer device 1 may have a bus-type structure or a star-shaped structure, the computer device 1 may further include more or less other hardware or software than those shown, or different component arrangements, for example, the computer device 1 may further include an input and output device, a network access device, etc.
It should be noted that the computer device 1 is only an example, and other electronic products that are currently available or may come into existence in the future, such as electronic products that can be adapted to the present invention, should also be included in the scope of the present invention, and are included herein by reference.
The memory 12 includes at least one type of readable storage medium, which includes flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 12 may in some embodiments be an internal storage unit of the computer device 1, for example a removable hard disk of the computer device 1. The memory 12 may also be an external storage device of the computer device 1 in other embodiments, such as a plug-in removable hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 12 may be used not only to store application software installed in the computer device 1 and various types of data, such as codes of a payment file test program based on AI encryption, etc., but also to temporarily store data that has been output or is to be output.
The processor 13 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 13 is a Control Unit (Control Unit) of the computer device 1, connects various components of the entire computer device 1 by using various interfaces and lines, and executes various functions and processes data of the computer device 1 by running or executing programs or modules (for example, executing a payment file test program based on AI encryption, etc.) stored in the memory 12 and calling data stored in the memory 12.
The processor 13 executes the operating system of the computer device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in the various embodiments of the AI-encryption-based payment file testing method described above, such as the steps shown in fig. 1.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the computer device 1. For example, the computer program may be divided into a simulation unit 110, a determination unit 111, a generation unit 112, an encryption unit 113, a processing unit 114, an upload unit 115, a test unit 116.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a computer device, or a network device) or a processor (processor) to execute parts of the AI encryption-based payment file testing method according to various embodiments of the present invention.
The integrated modules/units of the computer device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), random-access Memory, or the like.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one line is shown in FIG. 3, but this does not mean only one bus or one type of bus. The bus is arranged to enable connection communication between the memory 12 and at least one processor 13 or the like.
Although not shown, the computer device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 13 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The computer device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the computer device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the computer device 1 and other computer devices.
Optionally, the computer device 1 may further comprise a user interface, which may be a Display (Display), an input unit, such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the computer device 1 and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
Fig. 3 shows only the computer device 1 with the components 12-13, and it will be understood by a person skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the computer device 1 and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
With reference to fig. 1, the memory 12 of the computer device 1 stores a plurality of instructions to implement an AI encryption-based payment file testing method, and the processor 13 executes the plurality of instructions to implement:
responding to a payment file test instruction based on AI encryption, acquiring a pre-constructed payment data table, and simulating at least one virtual server according to a designated social security server;
determining a target virtual server from the at least one virtual server according to the AI encryption-based payment file test instruction, and determining a target file format of the target virtual server;
analyzing the payment data table and generating a target payment file with the target file format;
encrypting the target payment file based on a preset encryption algorithm to obtain an encrypted file;
presetting the encrypted file to obtain a file to be uploaded;
the file channel is connected to the target virtual server, and the file to be uploaded is uploaded to the target virtual server through the file channel;
and generating a file ready notice by using the file to be uploaded, and downloading the file from the target virtual server according to the file ready notice to execute testing.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The invention is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the present invention may also be implemented by one unit or means through software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. The AI encryption-based payment file testing method is characterized by comprising the following steps of:
responding to a payment file test instruction based on AI encryption, acquiring a pre-constructed payment data table, and simulating at least one virtual server according to a designated social security server;
determining a target virtual server from the at least one virtual server according to the AI encryption-based payment file test instruction, and determining a target file format of the target virtual server;
analyzing the payment data table and generating a target payment file with the target file format;
encrypting the target payment file based on a preset encryption algorithm to obtain an encrypted file;
presetting the encrypted file to obtain a file to be uploaded;
the file channel is connected to the target virtual server, and the file to be uploaded is uploaded to the target virtual server through the file channel;
and generating a file ready notice by using the file to be uploaded, and downloading the file from the target virtual server according to the file ready notice to execute testing.
2. The AI-encryption-based payment file testing method of claim 1, wherein the parsing the payment data table and generating the target payment file having the target file format comprises:
identifying a file type of the payment data table;
creating a file reading function according to the file type of the payment data table and the target file format;
reading data in the payment data table by using the file reading function;
converting the read data into character strings;
and writing the character string into a text file to obtain the target payment file.
3. The AI-encryption-based payment file testing method of claim 1, wherein the encrypting the target payment file based on the preset encryption algorithm to obtain an encrypted file comprises:
splitting the target payment file according to rows to obtain at least one subfile;
for each subfile in the at least one subfile, carrying out XOR operation on the state matrix of each subfile and the key matrix to obtain a first matrix characteristic of each subfile;
executing a preset turn of transformation iteration on the first matrix characteristic of each subfile to obtain a second matrix characteristic of each subfile, wherein each turn of transformation iteration comprises the following steps: keeping the numerical value of each row in the matrix input in the current round unchanged, moving the numerical value of each row to the left by a random displacement amount to obtain a first matrix, keeping the position of each numerical value in the first matrix unchanged, acquiring data from an s-box to replace each numerical value in the first matrix to obtain a second matrix, determining a first characteristic and a second characteristic based on a key expansion algorithm, multiplying the second characteristic with each column in the second matrix to obtain a product, performing linear transformation on the product to obtain a third matrix, and performing exclusive-or operation on the third matrix and the second characteristic;
displacing the line of the second matrix characteristic of each subfile, randomly replacing each byte in the second matrix characteristic after the displacement, and carrying out XOR operation on the second matrix characteristic after the replacement and the specified matrix to obtain at least one encrypted subfile;
combining the at least one encrypted subfile to obtain an initial encrypted file;
encoding the initial encrypted file to obtain an encoded file;
and deleting the designated symbol in the encoded file to obtain the encrypted file.
4. The AI-encryption-based payment file testing method of claim 1, wherein the pre-setting the encrypted file to obtain the file to be uploaded comprises:
determining a file naming format of the target virtual server;
naming the encrypted file according to the file naming format to obtain an initial file name of the encrypted file;
randomly acquiring a preset number of characters from the initial file name to construct a character string;
splicing the character string after the initial file name to obtain a target file name, and signing the encrypted file by using the target file name;
and compressing the signed encrypted file to obtain the file to be uploaded.
5. The AI-encryption-based payment file testing method of claim 1, wherein the file channel connected to the target virtual server comprises:
inquiring a user name and a password of the target virtual server in a configuration database;
acquiring a file channel of the target virtual server;
verifying the connection authority of the file channel of the target virtual server according to the inquired user name and the password;
and when the connection authority passes the verification, connecting to a file channel of the target virtual server.
6. The AI-encryption-based payment file testing method of claim 1, wherein the generating a file-ready notification using the file to upload comprises:
acquiring the file content of the file to be uploaded;
generating a message according to the file content of the file to be uploaded;
and adding a secret key generated when the target payment file is encrypted to the generated message to obtain the file ready notice.
7. The AI-encryption-based payment file testing method of claim 1, wherein the downloading of files from the target virtual server in accordance with the file-ready notification to perform testing comprises:
determining a file to be downloaded according to the file ready notice;
downloading the file to be downloaded from the target virtual server;
carrying out payment processing by using the file to be downloaded, and returning a payment result;
verifying the payment result;
when the payment result passes the verification, determining that the file to be downloaded passes the test; or
And when the payment result is not verified, determining that the file to be downloaded does not pass the test.
8. An AI encryption based payment file testing apparatus, the AI encryption based payment file testing apparatus comprising:
the simulation unit is used for responding to a payment file test instruction based on AI encryption, acquiring a pre-constructed payment data table and simulating at least one virtual server according to a specified social security server;
a determining unit, configured to determine a target virtual server from the at least one virtual server according to the AI-encryption-based payment file test instruction, and determine a target file format of the target virtual server;
the generating unit is used for analyzing the payment data table and generating a target payment file with the target file format;
the encryption unit is used for encrypting the target payment file based on a preset encryption algorithm to obtain an encrypted file;
the processing unit is used for carrying out preset processing on the encrypted file to obtain a file to be uploaded;
the uploading unit is used for connecting to a file channel of the target virtual server and uploading the file to be uploaded to the target virtual server through the file channel;
and the test unit is used for generating a file ready notice by utilizing the file to be uploaded and downloading the file from the target virtual server according to the file ready notice to execute the test.
9. A computer device, characterized in that the computer device comprises:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the AI-encryption based payment file testing method of any one of claims 1 to 7.
10. A computer-readable storage medium characterized by: the computer-readable storage medium has stored therein at least one instruction that is executable by a processor in a computer device to implement the AI-encryption based payment file testing method of any one of claims 1 to 7.
CN202111011075.6A 2021-08-31 2021-08-31 Payment file testing method, device, equipment and medium based on AI encryption Pending CN113723958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111011075.6A CN113723958A (en) 2021-08-31 2021-08-31 Payment file testing method, device, equipment and medium based on AI encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111011075.6A CN113723958A (en) 2021-08-31 2021-08-31 Payment file testing method, device, equipment and medium based on AI encryption

Publications (1)

Publication Number Publication Date
CN113723958A true CN113723958A (en) 2021-11-30

Family

ID=78679617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111011075.6A Pending CN113723958A (en) 2021-08-31 2021-08-31 Payment file testing method, device, equipment and medium based on AI encryption

Country Status (1)

Country Link
CN (1) CN113723958A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632927A (en) * 2017-07-28 2018-01-26 北京北信源软件股份有限公司 A kind of method for testing pressure and device of the encryption of the analogue data in C/S frameworks
CN109327338A (en) * 2018-10-29 2019-02-12 中国电力科学研究院有限公司 A kind of electricity information acquisition system master station method for testing pressure and system based on virtual terminal
CN110784304A (en) * 2019-10-25 2020-02-11 江苏云涌电子科技股份有限公司 Method for realizing national cryptographic algorithm through FPGA
CN111294359A (en) * 2020-02-27 2020-06-16 平安养老保险股份有限公司 Pressure testing method and device, computer equipment and storage medium
CN112395177A (en) * 2020-11-17 2021-02-23 平安普惠企业管理有限公司 Interactive processing method, device and equipment of service data and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632927A (en) * 2017-07-28 2018-01-26 北京北信源软件股份有限公司 A kind of method for testing pressure and device of the encryption of the analogue data in C/S frameworks
CN109327338A (en) * 2018-10-29 2019-02-12 中国电力科学研究院有限公司 A kind of electricity information acquisition system master station method for testing pressure and system based on virtual terminal
CN110784304A (en) * 2019-10-25 2020-02-11 江苏云涌电子科技股份有限公司 Method for realizing national cryptographic algorithm through FPGA
CN111294359A (en) * 2020-02-27 2020-06-16 平安养老保险股份有限公司 Pressure testing method and device, computer equipment and storage medium
CN112395177A (en) * 2020-11-17 2021-02-23 平安普惠企业管理有限公司 Interactive processing method, device and equipment of service data and storage medium

Similar Documents

Publication Publication Date Title
CN113468049B (en) Configurable interface-based test method, device, equipment and medium
CN112347042A (en) File uploading method and device, electronic equipment and storage medium
CN114124502B (en) Message transmission method, device, equipment and medium
CN113112252B (en) Resource transfer method and device based on block chain, electronic equipment and storage medium
CN111950621A (en) Target data detection method, device, equipment and medium based on artificial intelligence
CN113158207A (en) Block chain based report generation method and device, electronic equipment and storage medium
CN114519084A (en) Block chain-based medical data inspection method, device, equipment and medium
CN112464619B (en) Big data processing method, device and equipment and computer readable storage medium
CN111932413B (en) Case element extraction method, case element extraction device, case element extraction equipment and case element extraction medium
CN112217639B (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN113051224A (en) File transmission method and device, electronic equipment and computer readable storage medium
CN115002062B (en) Message processing method, device, equipment and readable storage medium
CN116205764A (en) Purchase contract generation method, device, equipment and medium
CN113723958A (en) Payment file testing method, device, equipment and medium based on AI encryption
CN115827115A (en) H5 page jump method, device, equipment and storage medium of WeChat applet
CN115033605A (en) Data query method and device, electronic equipment and storage medium
CN115496166A (en) Multitasking method and device, electronic equipment and storage medium
CN114385497A (en) Test environment generation method and device, electronic equipment and storage medium
CN115145870A (en) Method and device for positioning reason of failed task, electronic equipment and storage medium
CN113918517A (en) Multi-type file centralized management method, device, equipment and storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN113626533B (en) Ultraviolet power detection method and device and electronic equipment
CN115964307B (en) Automatic test method, device, equipment and medium for transaction data
US20240185006A1 (en) Method of delivering electronic business card, and nfc chip, phone case and server of the same
CN114610305B (en) Invisible webpage resource development method and device, electronic equipment and medium

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