Payment equipment configuration method, system and device

By obtaining and parsing configuration files when the payment device is turned on and writing device unique parameters to the security chip, the problem of time-consuming configuration in the payment device production process is solved, rapid configuration and data security are achieved, and production efficiency is improved.

CN119248366APending Publication Date: 2025-01-03SHENZHEN XINGUODU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411108677.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the existing payment equipment production process, the hardware configuration download, device startup and initialization processes take a long time, affecting production efficiency.

Method used

When the payment device is powered on, the configuration file is obtained through the application processing unit, the device unique parameters are parsed and written to the security chip, and the parameter consistency is compared in real time. If it is inconsistent, the configuration is carried out to achieve rapid configuration and avoid waiting for the device to shut down and restart.

Benefits of technology

It realizes the rapid configuration of payment devices under the power-on state, improves production efficiency, and enhances the security and reliability of data through storage in a security chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248366A_ABST
    Figure CN119248366A_ABST
Patent Text Reader

Abstract

The invention discloses a payment equipment configuration method, system and device, which are used for realizing rapid configuration of payment equipment and improving production efficiency. The method comprises the following steps: acquiring a configuration file of payment equipment, and downloading the configuration file to an application processing unit of the payment equipment; the configuration file is analyzed, equipment configuration parameters and equipment uniqueness parameters are determined from the configuration file according to an analysis result, and the equipment uniqueness parameters at least comprise an equipment identification code and a network address parameter; the unique parameters of the equipment are written into a security chip of the payment equipment through an application processing unit and an SPI (Serial Peripheral Interface) bus; when the configuration action instruction is triggered, the unique parameter of the device is read from the security chip, and the identity information of the device is read from the NV storage area of the payment device; judging whether the equipment uniqueness parameter is consistent with the equipment identity information or not; and if not, configuring the payment equipment according to the equipment configuration parameter and the equipment uniqueness parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method, system, and apparatus for configuring a payment device. Background Art

[0002] With technological advancements, payment devices have become an integral part of our daily lives. These devices require high reliability, security, and real-time performance, often running customized operating systems and applications to process various transactions. Payment devices are often based on embedded systems, which require specialized hardware configurations to meet specific functional requirements. Efficient hardware configuration during production requires specialized production tools and automated processes to ensure the devices can reliably and securely perform their functions.

[0003] In the current payment device production process, manufacturers generally use official production tools provided by MTK or Qualcomm. These tools require the device to be powered off to download hardware configurations, including key parameters such as the device ID, IMEI, and MAC address. After the parameters are downloaded, the device can be powered on for configuration deployment. However, since parameter downloading, device power-on, and hardware initialization all require time, the entire configuration process is time-consuming, significantly impacting production efficiency. Summary of the Invention

[0004] The present application provides a method, system, and apparatus for configuring a payment device, which are used to achieve rapid configuration of the payment device and improve production efficiency.

[0005] A first aspect of the present application provides a method for configuring a payment device, comprising:

[0006] Obtaining a configuration file of a payment device, and downloading the configuration file to an application processing unit of the payment device;

[0007] Parsing the configuration file, and determining device configuration parameters and device uniqueness parameters from the configuration file according to the parsing result, wherein the device uniqueness parameters include at least a device identification code and a network address parameter;

[0008] Writing the device uniqueness parameter into the security chip of the payment device through the application processing unit and the SPI bus;

[0009] When the configuration action instruction is triggered, the device uniqueness parameter is read from the security chip, and the device identity information is read from the NV storage area of ​​the payment device;

[0010] Determining whether the device uniqueness parameter is consistent with the device identity information;

[0011] If not, the payment device is configured according to the device configuration parameters and the device uniqueness parameters.

[0012] Optionally, obtaining a configuration file of the payment device and downloading the configuration file to an application processing unit of the payment device includes:

[0013] Obtaining an encrypted configuration file of the payment device through the MES system, wherein the encrypted configuration file includes digital signature information;

[0014] Downloading the encrypted configuration file to the application processing unit of the payment device, and verifying the digital signature information using a pre-stored public key;

[0015] If the digital signature information is verified, the encrypted configuration file is decrypted.

[0016] Optionally, before obtaining the encrypted configuration file of the payment device through the MES system, wherein the encrypted configuration file includes digital signature information, the method further includes:

[0017] Obtain the public key of the MES system, and generate a shared key using the public key of the MES system and the private key of the payment device;

[0018] deriving a session key based on the shared key;

[0019] If the digital signature information is verified, the encrypted configuration file is decrypted, including:

[0020] If the digital signature information is verified successfully, the encrypted configuration file is decrypted using the session key.

[0021] Optionally, configuring the payment device according to the device configuration parameter and the device uniqueness parameter includes:

[0022] Invoking a target interface to send an AT command to a modem to configure the modem according to the device identification code;

[0023] Modify NV configuration parameters according to the device configuration parameters and the network address parameters.

[0024] Optionally, after calling the target interface to send an AT command to the modem to set the modem according to the device identification code, the method further includes:

[0025] A first update broadcast event is sent to enable the communication function module to send an AT command to obtain and update the device identification code.

[0026] Optionally, after modifying the NV configuration parameters according to the device configuration parameters and the network address parameters, the method further includes:

[0027] A second update broadcast event is sent to enable the target functional module to perform a write operation on the NV configuration parameter.

[0028] Optionally, the triggering conditions of the configuration action instruction include:

[0029] It is detected that the payment device is started or that the writing of the unique parameter of the device is completed.

[0030] Optionally, after configuring the payment device according to the device configuration parameter and the device uniqueness parameter, the method further includes:

[0031] The device configuration parameters and the device unique parameters are backed up to the NV storage area.

[0032] A second aspect of the present application provides a system for configuring a payment device, including:

[0033] an acquiring unit, configured to acquire a configuration file of a payment device and download the configuration file to an application processing unit of the payment device;

[0034] a parsing unit, configured to parse the configuration file and determine device configuration parameters and device uniqueness parameters from the configuration file according to the parsing result, wherein the device uniqueness parameters include at least a device identification code and a network address parameter;

[0035] A writing unit, configured to write the device uniqueness parameter into the security chip of the payment device through the application processing unit and the SPI bus;

[0036] a reading unit, configured to read the device uniqueness parameter from the security chip and the device identity information from the NV storage area of ​​the payment device when a configuration action instruction is triggered;

[0037] a determination unit, configured to determine whether the device uniqueness parameter is consistent with the device identity information;

[0038] A configuration unit is configured to configure the payment device according to the device configuration parameter and the device uniqueness parameter when the judgment result of the judgment unit is negative.

[0039] Optionally, the acquiring unit is specifically configured to:

[0040] Obtaining an encrypted configuration file of the payment device through the MES system, wherein the encrypted configuration file includes digital signature information;

[0041] Downloading the encrypted configuration file to the application processing unit of the payment device, and verifying the digital signature information using a pre-stored public key;

[0042] If the digital signature information is verified, the encrypted configuration file is decrypted.

[0043] Optionally, the acquiring unit is further configured to:

[0044] Obtain the public key of the MES system, and generate a shared key using the public key of the MES system and the private key of the payment device;

[0045] deriving a session key based on the shared key;

[0046] If the digital signature information is verified successfully, the encrypted configuration file is decrypted using the session key.

[0047] Optionally, the configuration unit is specifically used to:

[0048] Invoking a target interface to send an AT command to a modem to configure the modem according to the device identification code;

[0049] Modify NV configuration parameters according to the device configuration parameters and the network address parameters.

[0050] Optionally, the system further includes a first broadcasting unit, configured to:

[0051] A first update broadcast event is sent to enable the communication function module to send an AT command to obtain and update the device identification code.

[0052] Optionally, the system further includes a second broadcasting unit, configured to:

[0053] A second update broadcast event is sent to enable the target functional module to perform a write operation on the NV configuration parameter.

[0054] Optionally, the triggering conditions of the configuration action instruction include:

[0055] It is detected that the payment device is started or that the writing of the unique parameter of the device is completed.

[0056] Optionally, the system further includes a backup unit configured to:

[0057] The device configuration parameters and the device unique parameters are backed up to the NV storage area.

[0058] A third aspect of the present application provides an apparatus for configuring a payment device, the apparatus comprising:

[0059] processor, memory, input and output units, and buses;

[0060] The processor is connected to the memory, the input and output unit, and the bus;

[0061] The memory stores a program, and the processor calls the program to execute the method for configuring a payment device according to the first aspect and any optional method in the first aspect.

[0062] In a fourth aspect, the present application provides a computer-readable storage medium having a program stored thereon. When the program is executed on a computer, the method for configuring a payment device according to the first aspect and any optional method in the first aspect is executed.

[0063] It can be seen from the above technical solutions that this application has the following advantages:

[0064] The configuration file can be quickly downloaded to the application processing unit when the device is powered on. After receiving the configuration file, the application processing unit will immediately parse it, determine the device configuration parameters and device uniqueness parameters, and write the device uniqueness parameters to the security chip via the SPI bus. When the configuration action instruction is triggered, the device uniqueness parameters are read from the security chip in real time and compared with the device identity information in the NV storage area to ensure parameter consistency. If there is any inconsistency, the device configuration parameters and device uniqueness parameters are immediately used for configuration. This enables rapid configuration of the payment device when it is powered on, without having to wait for the payment device to be shut down and restarted, greatly improving production efficiency. Storing the device uniqueness parameters in the security chip can prevent the loss of parameters that may occur when the user clears the cache or restores the factory settings, thereby enhancing the security and reliability of data storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in this application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0066] Figure 1 A flowchart of an embodiment of a method for configuring a payment device provided in this application;

[0067] Figure 2 A flowchart of another embodiment of the method for configuring a payment device provided in this application;

[0068] Figure 3 A schematic diagram of an embodiment of the process of decrypting and verifying the signature of a configuration file in the payment device configuration method provided in this application;

[0069] Figure 4 A schematic diagram of an embodiment of the system structure for the payment device configuration provided by this application;

[0070] Figure 5 A schematic diagram of the structure of an embodiment of the apparatus for configuring the payment device provided in this application. DETAILED DESCRIPTION

[0071] The present application provides a method, system, and apparatus for configuring a payment device, which are used to achieve rapid configuration of the payment device and improve production efficiency.

[0072] It should be noted that the payment device configuration method provided in this application is mainly applied to payment devices such as traditional POS machines or smart POS machines. For the convenience of explanation, this application uses the payment device as the execution entity for example.

[0073] See also Figure 1 , Figure 1 An embodiment of a method for configuring a payment device provided in the present application includes:

[0074] S101. Obtain a configuration file of a payment device and download the configuration file to an application processing unit of the payment device;

[0075] When the payment device is powered on, it is first necessary to obtain the configuration file of the payment device from the external system. The configuration file of the payment device contains the various hardware configuration parameters of the payment device. These hardware configuration parameters are used to provide basic data support for the normal operation and functional configuration of the payment device. The specific method of obtaining the configuration file can be to download the configuration file from the external system to the application processing unit (AP) of the payment device through a customized unified protocol via the CDC port. The AP is the core processor in the payment device, responsible for processing data, executing applications, managing hardware resources, etc. The application processing unit receives and stores the downloaded configuration file in preparation for subsequent parsing and configuration operations.

[0076] Specifically, the hardware configuration parameters of a payment device include, but are not limited to, the following: IMEI (Mechanical Equipment Identity), network address parameters (MAC address), device model, hardware version, network configuration parameters, security configuration parameters, etc. The IMEI is the unique identifier of the payment device, used to identify the device and ensure that the device can be identified and verified by the network service provider; the MAC address is the unique identifier of a network device, used for device identification and communication in a local area network (LAN); the device model is used to identify the specific type and version of the payment device; the hardware version identifies the hardware configuration and version information of the payment device; network configuration parameters include APN settings, network frequency bands, cellular network configuration, etc., used to configure the device's network connection; and security configuration parameters include security certificates, public key information, encryption algorithm parameters, etc., used for device security authentication and communication encryption.

[0077] It's important to note that a custom unified protocol can be designed specifically for compatibility with different types of POS devices. For example, it can be compatible with both smart and traditional POS production processes, thereby improving production efficiency and streamlining production processes and device management. This unified protocol must define the data transmission format, handshake process, encryption method, and other aspects to ensure data security and compatibility.

[0078] S102, parsing the configuration file, and determining device configuration parameters and device uniqueness parameters from the configuration file based on the parsing result, where the device uniqueness parameters include at least a device identification code and a network address parameter;

[0079] The application processing unit parses the configuration file using the parsing method specified in the unified protocol, converting the information in the configuration file into a data format that can be understood and manipulated, and then reads the hardware configuration parameters in the configuration file one by one. During the parsing process, these hardware configuration parameters need to be divided into two categories: device configuration parameters and device-unique parameters.

[0080] Device uniqueness parameters specifically refer to parameters used to uniquely identify payment devices, ensuring that each device has a unique identity in the network and system. Device uniqueness parameters include at least the device identification code (IMEI) and network address parameters (MAC address).

[0081] Device configuration parameters refer to parameters used to configure the basic functions and performance of a payment device, in addition to device uniqueness parameters, such as device model, hardware version, storage configuration parameters, and other hardware configuration parameters.

[0082] S103, writing the device uniqueness parameter into the security chip of the payment device through the application processing unit and the SPI bus;

[0083] In the payment industry, payment devices process large amounts of sensitive information, such as credit card numbers, transaction data, and user identity information. This information must be protected during transmission and storage to prevent data leakage and tampering. Therefore, a security processor (SP) is installed on payment devices to provide multi-layered security. The security processor provides encryption, decryption, and secure storage capabilities, effectively protecting sensitive data. Furthermore, the security processor is tamper-resistant and anti-attack, capable of detecting and resisting various physical and logical attacks. The security processor communicates with the application processing unit (APP) via a serial peripheral interface (SPI) bus.

[0084] Because device-uniqueness parameters directly affect device authentication, if an attacker tampered with them, they could bypass security controls or inject malicious code, leading to unauthorized access, data theft, or other malicious activities, causing serious security issues. Therefore, after the application processing unit determines the device configuration parameters and device-uniqueness parameters, the device-uniqueness parameters can be written into the payment device's security chip via the application processing unit and the SPI bus. Leveraging the security chip's tamper-proof and anti-attack features, this ensures the security of the device-uniqueness parameters and prevents device cloning and counterfeiting.

[0085] S104. When the configuration action instruction is triggered, the device uniqueness parameter is read from the security chip, and the device identity information is read from the NV storage area of ​​the payment device;

[0086] When the configuration process is triggered, that is, when the configuration action instruction is triggered, the application processing unit of the payment device communicates with the security chip through the SPI bus, and calls the encapsulated SPI function to read the previously stored device uniqueness parameters from the security chip. At the same time, the application processing unit also needs to read the device identity information from the NV storage area of ​​the payment device. The NV storage area is a non-volatile storage area used to store important information of the payment device, and the long-term storage capacity is provided by the relevant hardware. The device identity information in the NV storage area includes the device identification code (IMEI), network address parameters (MAC address) and other device identification information, such as serial number, manufacturing information, etc.

[0087] S105, determining whether the device uniqueness parameter is consistent with the device identity information;

[0088] By comparing the device-unique parameters stored in the security chip with the device identity information in the NV storage area, the legitimacy of the device's current state can be verified. Specifically, by determining whether the device identification code and network address parameters in the security chip are consistent with those in the NV storage area, it is possible to detect whether the payment device has been modified or tampered with without authorization.

[0089] If the data is consistent, the configuration is correct and no further action is required. However, if any of the device uniqueness parameters (device identification code and network address parameters) in the security chip are inconsistent with the device identity information (device identification code and network address parameters) in the NV storage area, it indicates that there may be a problem with the configuration data or the parameters have been tampered with. In this case, step S106 needs to be executed to perform the corresponding configuration operation to ensure the correct configuration and normal operation of the device.

[0090] S106: If not, configure the payment device according to the device configuration parameters and the device uniqueness parameters.

[0091] If it is determined that the device uniqueness parameters are inconsistent with the device identity information, it means that the current configuration parameters of the payment device are incorrect or not updated. In this case, the payment device needs to be configured for the first time or reconfigured based on the device configuration parameters and device uniqueness parameters to ensure that the configuration of the payment device is the latest and correct, thereby improving the security and reliability of the payment device.

[0092] In this embodiment, the configuration file can be quickly downloaded to the application processing unit when the device is turned on. After receiving the configuration file, the application processing unit immediately parses it, determines the device configuration parameters and device uniqueness parameters, and writes the device uniqueness parameters to the security chip through the SPI bus. When the configuration action instruction is triggered, the device uniqueness parameters are read from the security chip in real time and compared with the device identity information in the NV storage area to ensure parameter consistency. If there is inconsistency, the device configuration parameters and device uniqueness parameters are immediately used for configuration. This enables the payment device to be quickly configured in the turned-on state without waiting for the payment device to be shut down and restarted, greatly improving production efficiency. Storing the device uniqueness parameters in the security chip can prevent the user from clearing the cache or restoring the factory settings, which may cause parameter loss, thereby enhancing the security and reliability of data storage.

[0093] The following is a detailed description of the payment device configuration method provided in this application. Figure 2 , Figure 2 Another embodiment of the method for configuring a payment device provided by the present application includes:

[0094] S201. Obtain a configuration file of a payment device and download the configuration file to an application processing unit of the payment device;

[0095] S202, parsing the configuration file, and determining device configuration parameters and device uniqueness parameters from the configuration file based on the parsing result, where the device uniqueness parameters include at least a device identification code and a network address parameter;

[0096] S203. Writing the device uniqueness parameter into the security chip of the payment device through the application processing unit and the SPI bus;

[0097] S204. When the configuration action instruction is triggered, the device uniqueness parameter is read from the security chip, and the device identity information is read from the NV storage area of ​​the payment device;

[0098] In this embodiment, the triggering conditions for the configuration action instruction include detecting that the payment device is powered on or that the device's unique parameters have been written. Specifically, upon detecting that the payment device is powered on or that the device's unique parameters have been written to the security chip, the configuration action instruction is triggered to execute steps S204 to S206, ensuring the timeliness and reliability of the configuration process.

[0099] S205: Determine whether the device uniqueness parameter is consistent with the device identity information;

[0100] In this embodiment, steps S201 to S205 are similar to steps S101 to S105 in the aforementioned embodiment, and are not described again here.

[0101] S206, calling the target interface to send an AT command to the modem to set the modem according to the device identification code;

[0102] Configuring the device ID code involves sending AT commands to the modem via a target interface. The modem then executes the device ID setting process based on these AT commands. This target interface is the invokeOemRilRequestStrings interface used by Android to communicate with the device's underlying hardware. AT commands are a set of commands used to control and configure communication devices. The specific format of these AT commands may vary between modem manufacturers and is not specified here.

[0103] S207: Send a first update broadcast event to enable the communication function module to send an AT command to obtain and update the device identification code;

[0104] By default, Android only reads the IMEI once during rild initialization, and subsequent changes to the IMEI using AT+EGMR will not automatically update it. Therefore, a new broadcast event, the first update broadcast event, can be added to the GsmCdmaPhone.java file to notify the system to update the IMEI information after setting it.

[0105] After successfully modifying the device's IMEI using the AT+EGMR command, the first update broadcast event is immediately sent. Add a broadcast receiver in GsmCdmaPhone.java to listen for this first update broadcast event. When the receiver receives the first update broadcast event, it triggers the corresponding processing logic, causing the communication function module GsmCdmaPhone to send a new AT command to obtain the latest IMEI number and update the IMEI information in the system. This allows the latest IMEI number to be displayed in the system settings interface without having to restart the device or turn airplane mode on and off after setting the IMEI.

[0106] S208, modifying NV configuration parameters according to device configuration parameters and network address parameters;

[0107] To configure device configuration parameters and network address parameters, use the interfaces or commands provided by the device platform to modify the corresponding NV configuration parameters to ensure that the device can provide the corresponding functions and performance as required. NV configuration parameters are typically used to store various device configurations and settings, such as network addresses, hardware configurations, and calibration data. NV configuration parameters are stored in non-volatile memory, such as EEPROM, Flash memory, or NVRAM.

[0108] S209: Send a second update broadcast event to enable the target functional module to perform a write operation on the NV configuration parameters;

[0109] To ensure that these device configuration parameters and network address parameters take effect immediately and are displayed in the system settings interface, a second update broadcast event can be sent to cause the relevant target functional modules to write the NV configuration parameters, ensuring that the system can read and use the new configuration after the write operation is completed. At the same time, these device configuration parameters and network address parameters take effect immediately and are displayed in the system interface, avoiding the trouble of restarting the device or switching to flight mode, improving the system's real-time performance and user experience. The relevant target functional modules include the network management functional module, the hardware configuration functional module, and the user settings functional module.

[0110] S210: Back up device configuration parameters and device uniqueness parameters to the NV storage area.

[0111] After the configuration is completed, the device configuration parameters and device unique parameters need to be backed up to the NV storage area to prevent device data loss due to factory settings restoration or other operations, ensuring the integrity of the payment device configuration parameters, thereby improving the reliability and security of the device.

[0112] In the above embodiment, in step S101 or step S201, in order to ensure the security of the configuration file, the configuration file can be encrypted and the signature verification can be performed. Figure 3 , Figure 3 An embodiment of a method for encrypting and verifying a configuration file and a signature, the method comprising:

[0113] S301. Obtain an encrypted configuration file of the payment device through the MES system, where the encrypted configuration file includes digital signature information;

[0114] When the device is powered on, it establishes a connection with the MES system using a network communication protocol (such as HTTP or HTTPS) and sends a request to the MES system to obtain the encrypted configuration file for the payment device. The MES system, a manufacturing execution system, manages various data and operations during the production process. During the production of payment devices, the MES system can allocate and manage key hardware configuration parameters and generate unique device parameters and other device configuration parameters for the payment device based on the production plan and device information. These unique device parameters and device configuration parameters together constitute the configuration file.

[0115] After the MES system generates the payment device's configuration file, it must be encrypted to prevent tampering or leakage during transmission. The MES system then digitally signs the configuration file using a private key and appends the signature information to the configuration file before sending it to the payment device.

[0116] S302: Download the encrypted configuration file to the application processing unit of the payment device and verify the digital signature information using the pre-stored public key;

[0117] The payment device downloads the encrypted configuration file sent by the MES system to the application processing unit. The payment device then uses the pre-stored public key to verify the digital signature in the encrypted configuration file to ensure the authenticity and integrity of the data. If the digital signature information is verified, step S303 is executed to decrypt the encrypted configuration file. If the digital signature information verification fails, the failure is reported to the MES system so that appropriate measures can be taken.

[0118] Specifically, a certificate authority (CA) can be used to issue digital certificates for the MES system and payment device. When the MES system first generates a configuration file or requests to modify hardware configuration parameters in a configuration file, the MES system uses its private key to digitally sign the configuration file and attaches its digital certificate. The payment device then uses its pre-stored CA public key to verify the validity of the certificate and the pre-stored MES system public key to verify the digital signature information.

[0119] S303: If the digital signature information is verified, the encrypted configuration file is decrypted.

[0120] If the digital signature information is verified, the application processing unit uses the agreed decryption algorithm to decrypt the encrypted configuration file to obtain the decrypted configuration file, thereby performing subsequent configuration file parsing and configuration processes.

[0121] In this embodiment, the encrypted configuration file and its digital signature are obtained through the MES system, ensuring that the configuration file is not tampered with or leaked during transmission. The payment device verifies the digital signature using a pre-stored public key to ensure the authenticity and integrity of the data. Once verified, the signature is decrypted, ensuring that only authorized payment devices can correctly read and download the configuration file. This effectively prevents unauthorized payment devices from accessing and using the configuration file, significantly improving the security of the payment device production process.

[0122] In other specific embodiments, the encrypted configuration file can be decrypted using a session key. Specifically, the MES system's public key is first obtained, and a shared key is generated using the MES system's public key and the payment device's private key. The session key is then derived from the shared key. If the digital signature information is verified, the encrypted configuration file is decrypted using the session key.

[0123] In this embodiment, the MES system's public key and the payment device's private key are extracted and calculated using the Elliptic Curve Diffie-Hellman (ECDH) protocol to generate a shared key. The ECDH protocol provides strong security, preventing attackers from deriving the shared key even if they intercept communication data. Once the shared key is generated, a session key is derived from the shared key using a key derivation function (KDF). The session key is used to encrypt and decrypt data, providing a temporary and highly secure key and preventing the security risks associated with long-term use of a single key. Furthermore, the derivation of the session key ensures that even the same shared key can generate different session keys in different sessions, enhancing security. The payment device uses the pre-stored MES system public key to verify the digital signature information in the encrypted configuration file. Once the digital signature information is verified, the payment device must use the derived session key to decrypt the encrypted configuration file and obtain the device's configuration parameters. This dual protection mechanism of digital signature information and session key ensures the security and reliability of the payment device when receiving and using the configuration file.

[0124] The following is a detailed description of the payment device configuration system provided in this application. Figure 4 , Figure 4 Another embodiment of the system for configuring the payment device provided by the present application includes:

[0125] An acquisition unit 401 is configured to acquire a configuration file of a payment device and download the configuration file to an application processing unit of the payment device;

[0126] The parsing unit 402 is used to parse the configuration file and determine the device configuration parameters and device uniqueness parameters from the configuration file according to the parsing result. The device uniqueness parameters include at least a device identification code and a network address parameter.

[0127] A writing unit 403 is used to write the device uniqueness parameter into the security chip of the payment device through the application processing unit and the SPI bus;

[0128] The reading unit 404 is used to read the device uniqueness parameter from the security chip and the device identity information from the NV storage area of ​​the payment device when the configuration action instruction is triggered;

[0129] A determination unit 405 is used to determine whether the device uniqueness parameter is consistent with the device identity information;

[0130] The configuration unit 406 is configured to configure the payment device according to the device configuration parameters and the device uniqueness parameters when the determination result of the determination unit is negative.

[0131] Optionally, the acquiring unit 401 is specifically configured to:

[0132] Obtain the encrypted configuration file of the payment device through the MES system. The encrypted configuration file contains digital signature information;

[0133] Download the encrypted configuration file to the application processing unit of the payment device and verify the digital signature information using the pre-stored public key;

[0134] If the digital signature information is verified, the encrypted configuration file is decrypted.

[0135] Optionally, the acquiring unit 401 is further configured to:

[0136] Obtain the public key of the MES system and generate a shared key using the public key of the MES system and the private key of the payment device;

[0137] Deriving a session key from the shared secret;

[0138] If the digital signature information is verified, the encrypted configuration file is decrypted using the session key.

[0139] Optionally, the configuration unit 406 is specifically configured to:

[0140] Call the target interface to send AT commands to the modem to set the modem according to the device identification code;

[0141] Modify the NV configuration parameters according to the device configuration parameters and network address parameters.

[0142] Optionally, the system further includes a first broadcast unit 407, configured to:

[0143] A first update broadcast event is sent to enable the communication function module to send an AT command to obtain and update the device identification code.

[0144] Optionally, the system further includes a second broadcast unit 408, configured to:

[0145] A second update broadcast event is sent to enable the target functional module to perform a write operation on the NV configuration parameters.

[0146] Optionally, the trigger conditions for configuring action instructions include:

[0147] The payment device is detected to be started or the writing of the device's unique parameters is detected to be completed.

[0148] Optionally, the system further includes a backup unit 409, configured to:

[0149] Back up device configuration parameters and device unique parameters to the NV storage area.

[0150] In this embodiment, the functions of each unit are the same as those in the above Figures 1 to 3 The steps in the method embodiment shown correspond to each other and will not be repeated here.

[0151] This application also provides a payment device configuration device, see Figure 5 , Figure 5 An embodiment of a device configured for a payment device provided in this application includes:

[0152] Processor 501, memory 502, input and output unit 503, bus 504;

[0153] The processor 501 is connected to the memory 502, the input and output unit 503 and the bus 504;

[0154] The memory 502 stores a program, and the processor 501 calls the program to execute any of the above payment device configuration methods.

[0155] The present application also relates to a computer-readable storage medium having a program stored thereon. When the program is run on a computer, the computer is caused to execute any of the above payment device configuration methods.

[0156] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0157] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0158] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0159] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0160] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, and other media that can store program code.

Claims

1. A method for configuring a payment device, characterized in that: The method comprises: Obtaining a configuration file of a payment device, and downloading the configuration file to an application processing unit of the payment device; Parsing the configuration file, and determining device configuration parameters and device uniqueness parameters from the configuration file according to the parsing result, wherein the device uniqueness parameters include at least a device identification code and a network address parameter; Writing the device uniqueness parameter into the security chip of the payment device through the application processing unit and the SPI bus; When the configuration action instruction is triggered, the device uniqueness parameter is read from the security chip, and the device identity information is read from the NV storage area of ​​the payment device; Determining whether the device uniqueness parameter is consistent with the device identity information; If not, the payment device is configured according to the device configuration parameter and the device uniqueness parameter.

2. The method according to claim 1, characterized in that: The step of obtaining a configuration file of the payment device and downloading the configuration file to an application processing unit of the payment device includes: Obtaining an encrypted configuration file of the payment device through the MES system, wherein the encrypted configuration file includes digital signature information; Downloading the encrypted configuration file to the application processing unit of the payment device, and verifying the digital signature information using a pre-stored public key; If the digital signature information is verified, the encrypted configuration file is decrypted.

3. The method according to claim 2, characterized in that Before obtaining the encrypted configuration file of the payment device through the MES system, wherein the encrypted configuration file includes digital signature information, the method further includes: Obtaining the public key of the MES system, and generating a shared key using the public key of the MES system and the private key of the payment device; deriving a session key based on the shared key; If the digital signature information is verified, the encrypted configuration file is decrypted, including: If the digital signature information is verified successfully, the encrypted configuration file is decrypted using the session key.

4. The method according to claim 1, characterized in that: The configuring the payment device according to the device configuration parameter and the device uniqueness parameter includes: Invoke the target interface to send an AT command to the modem to set the modem according to the device identification code; Modify NV configuration parameters according to the device configuration parameters and the network address parameters.

5. The method according to claim 4, characterized in that After the calling target interface sends an AT command to the modem to set the modem according to the device identification code, the method further includes: A first update broadcast event is sent so that the communication function module sends an AT command to obtain and update the device identification code.

6. The method according to claim 4, characterized in that After modifying the NV configuration parameters according to the device configuration parameters and the network address parameters, the method further includes: A second update broadcast event is sent to enable the target functional module to perform a write operation of the NV configuration parameter.

7. The method according to claim 1, characterized in that The triggering conditions of the configuration action instruction include: It is detected that the payment device is started or it is detected that the writing of the unique parameter of the device is completed.

8. The method according to any one of claims 1 to 7, characterized in that After configuring the payment device according to the device configuration parameter and the device uniqueness parameter, the method further includes: The device configuration parameters and the device uniqueness parameters are backed up to the NV storage area.

9. A system for configuring a payment device, characterized in that: The system comprises: An acquisition unit, configured to acquire a configuration file of a payment device and download the configuration file to an application processing unit of the payment device; A parsing unit, used to parse the configuration file, and determine device configuration parameters and device uniqueness parameters from the configuration file according to the parsing result, wherein the device uniqueness parameters at least include a device identification code and a network address parameter; A writing unit, used to write the device uniqueness parameter into the security chip of the payment device through the application processing unit and the SPI bus; A reading unit, configured to read the device uniqueness parameter from the security chip and read the device identity information from the NV storage area of ​​the payment device when a configuration action instruction is triggered; A determination unit, configured to determine whether the device uniqueness parameter is consistent with the device identity information; A configuration unit is used to configure the payment device according to the device configuration parameter and the device uniqueness parameter when the judgment result of the judgment unit is no.

10. A device for configuring a payment device, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 8.