A method for identifying the operating environment of a financial terminal and related equipment

By setting standard environment identifiers in the development process files of financial terminals and automatically identifying the operating environment, the problems of manual configuration information being easily error-prone and inconsistent configuration in the existing technology are solved, and efficient operation environment identification and system maintenance are achieved.

CN119759434APending Publication Date: 2025-04-04SHENZHEN YIHUA COMP +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411611421.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, when financial terminals obtain the operating environment, they need to manually set and maintain configuration information, which is prone to input errors and inconsistent configuration problems, especially in a multi-person collaborative environment that is not conducive to system maintenance and management.

Method used

By setting standard environment identifiers for different preset development process files, multiple development process files for the financial terminal to be identified are obtained, the environment identifiers in each file are extracted, and the operating environment is automatically identified based on these identifiers and standard identifiers.

Benefits of technology

It realizes automatic identification of operating environment information, reduces human errors, improves the maintainability of the system, and is easy to manage and maintain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759434A_ABST
    Figure CN119759434A_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method for identifying the operating environment of a financial terminal and related equipment, which obtains multiple development process files to be identified of the financial terminal to be identified; and extracts the environment identifier to be identified in each development process file to be identified; based on all the environment identifiers to be identified and the standard environment identifier, obtains the operating environment information of the financial terminal to be identified, thereby realizing automatic identification of the operating environment information, eliminating the need for manual configuration file setting and manual maintenance, reducing human errors, improving the maintainability of the system, and facilitating management and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical field of financial services, and in particular to a method for identifying an operating environment of a financial terminal and related equipment. [Background technology]

[0002] In the prior art, financial terminals obtain whether the operating environment is a test environment or a production environment by obtaining configuration information, and the configuration information needs to be manually set and maintained. Manual setting of configuration information requires direct human intervention, usually by editing configuration files, database entries, or other storage configuration methods. Manual settings are prone to input errors, especially when faced with a large number of configuration items, manual operations are more prone to errors. Manual maintenance of configuration information usually takes a long time, especially when frequent configuration changes or processing of a large number of configuration items are required. Manual configuration performed by different people or the same person at different time periods may result in inconsistent configurations, especially in a multi-person collaborative environment, which is not conducive to system maintenance and management. [Summary of the invention]

[0003] In view of this, the present invention provides a method for identifying the operating environment of a financial terminal and related equipment.

[0004] The specific technical solution of the first embodiment of the present invention is: a method for identifying the operating environment of a financial terminal, the method comprising: setting standard environment identifiers for different preset development process files; the types of the standard environment identifiers are used to characterize different operating environments; the operating environment is a test environment or a production environment; when developing a financial terminal, setting a standard environment identifier in the development process file of the financial terminal; when obtaining the operating environment of the financial terminal to be identified, obtaining multiple development process files to be identified of the financial terminal to be identified; extracting the environment identifier to be identified in each of the development process files to be identified; and obtaining the operating environment information of the financial terminal to be identified based on all the environment identifiers to be identified and the standard environment identifier.

[0005] Preferably, the method of obtaining the operating environment information of the financial terminal to be identified based on all the environment identifiers to be identified and the standard environment identifier includes: obtaining a type set of all the environment identifiers to be identified; the type set includes all the types corresponding to all the environment identifiers to be identified; and obtaining the operating environment information of the financial terminal to be identified based on a first number representing a test environment and a second number representing a production environment in the type set.

[0006] Preferably, the operating environment information of the financial terminal to be identified is obtained based on the first number representing the test environment and the second number representing the production environment in the type set, including: if the first number is greater than the second number, the operating environment information of the financial terminal to be identified is the test environment; if the first number is less than the second number, the operating environment information of the financial terminal to be identified is the production environment; if the first number is equal to the second number, the operating environment information of the financial terminal to be identified is determined according to the priorities of all the environment identifiers to be identified.

[0007] Preferably, the operating environment information of the financial terminal to be identified is obtained based on the first number representing the test environment and the second number representing the production environment in the type set, including: if a first proportion of the first number to the total number is greater than a preset threshold, the operating environment information of the financial terminal to be identified is a test environment; the total data is the sum of the first number and the second number; if a second proportion of the second number to the total number is greater than the preset threshold, the operating environment information of the financial terminal to be identified is a production environment; if both the first proportion and the second proportion are not greater than the preset threshold, the operating environment information of the financial terminal to be identified is determined according to the priorities of all the environment identifiers to be identified.

[0008] Preferably, the method of determining the operating environment information of the financial terminal to be identified based on the priorities of all the environment identifiers to be identified includes: presetting the priorities of different standard environment identifiers; screening out the target environment identifier to be identified with the highest priority among all the environment identifiers to be identified; and the type of the target environment identifier to be identified is the operating environment information of the financial terminal to be identified.

[0009] Preferably, the development process file includes a configuration file, environment variables, database connection information, a server URL, a log level and a hardware feature code.

[0010] Preferably, the priority of the standard environment identifier of the configuration file is the highest priority.

[0011] The specific technical solution of the second embodiment of the present invention is: a system for identifying the operating environment of a financial terminal, the system comprising: a setting module, a setting module, an acquisition module, an identifier extraction module and an operating environment information identification module; the setting module is used to set standard environment identifiers for different preset development process files; the types of the standard environment identifiers are used to characterize different operating environments; the operating environment is a test environment or a production environment; the setting module is used to set the standard environment identifier in the development process file of the financial terminal when developing the financial terminal; the acquisition module is used to obtain multiple development process files to be identified of the financial terminal to be identified when obtaining the operating environment of the financial terminal to be identified; the identifier extraction module is used to extract the environment identifier to be identified in each of the development process files to be identified; the operating environment information identification module is used to obtain the operating environment information of the financial terminal to be identified based on all the environment identifiers to be identified and the standard environment identifier.

[0012] The specific technical solution of the third embodiment of the present invention is: a financial terminal operating environment identification device, including a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method described in any one of the first embodiments of the present application.

[0013] The specific technical solution of the fourth embodiment of the present invention is: a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the method described in any one of the first embodiments of the present application.

[0014] Implementing the embodiments of the present invention will have the following beneficial effects:

[0015] The present invention obtains multiple development process files to be identified of the financial terminal to be identified; and extracts the environment identifier to be identified in each development process file to be identified; based on all the environment identifiers to be identified and the standard environment identifier, the operating environment information of the financial terminal to be identified is obtained, thereby realizing automatic identification of the operating environment information, eliminating the need for manual configuration file setting and manual maintenance, reducing human errors, improving the maintainability of the system, and facilitating management and maintenance.

Brief Description of the Drawings

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

[0017] Figure 1A flowchart of the steps of a method for identifying an operating environment of a financial terminal;

[0018] Figure 2 It is a structural diagram of the operating environment identification system of the financial terminal;

[0019] Figure 3 It is a diagram of the internal structure of a computer device;

[0020] Among them, 201 is a setting module; 202 is a setting module; 203 is an acquisition module; 204 is an identifier extraction module; 205 is an operating environment information identification module. [Specific implementation method]

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] The terms "first", "second", etc. in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other steps or modules that are inherent to these processes, methods, products or devices.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] See also Figure 1 , is a flowchart of a method for identifying an operating environment of a financial terminal in the first embodiment of the present application, the method comprising:

[0025] Step 101, setting standard environment identifiers for different preset development process files; the types of the standard environment identifiers are used to characterize different operating environments; the operating environment is a test environment or a production environment;

[0026] Step 102: When developing a financial terminal, a standard environment identifier is set in a development process file of the financial terminal;

[0027] Step 103: when obtaining the operating environment of the financial terminal to be identified, obtaining a plurality of development process files to be identified of the financial terminal to be identified;

[0028] Step 104, extracting the identifier of the environment to be identified in each of the development process files to be identified;

[0029] Step 105: Obtain the operating environment information of the financial terminal to be identified based on all the environment identifiers to be identified and the standard environment identifier.

[0030] In a specific embodiment, standard environment identifiers corresponding to different development process files can be defined, such as the standard environment identifier of the test environment of the configuration file is ENV_TEST, and the standard environment identifier of the production environment of the configuration file is ENV_PROD. Standard environment identifiers of environment variables, database connection information, server URL, log level, hardware feature code, special tag file, certificate or key file, etc. can also be configured. The standard environment identifiers of these files can be the same or different. During the development process, the financial terminal is developed according to the set standard environment identifier. When the operating environment of the development process file to be identified is identified, the environment identifier to be identified in each development process file to be identified can be extracted; based on all the environment identifiers to be identified and the standard environment identifier, the operating environment information of the financial terminal to be identified is obtained.

[0031] The method in this embodiment obtains multiple development process files to be identified of the financial terminal to be identified; and extracts the environment identifier to be identified in each development process file to be identified; based on all the environment identifiers to be identified and the standard environment identifier, the operating environment information of the financial terminal to be identified is obtained, thereby realizing automatic identification of the operating environment information, without the need for manual setting of configuration files and manual maintenance, reducing human errors, improving the maintainability of the system, and facilitating management and maintenance.

[0032] In a specific embodiment, the method of obtaining the operating environment information of the financial terminal to be identified based on all the environment identifiers to be identified and the standard environment identifier includes: obtaining a type set of all the environment identifiers to be identified; the type set includes all the types corresponding to all the environment identifiers to be identified; and obtaining the operating environment information of the financial terminal to be identified based on a first number representing a test environment and a second number representing a production environment in the type set.

[0033] In a specific embodiment, when the environment identifier to be identified comes from the configuration environment variable, database connection information, server URL, log level, hardware feature code, special tag file, etc., if the environment identifier to be identified corresponding to the configuration environment variable is a test environment, the first number increases from 0 to 1; if the environment identifier to be identified corresponding to the database connection information is a test environment, the first number increases from 1 to 2; if the environment identifier to be identified corresponding to the server URL is a production environment, the second number increases from 0 to 1, and so on, until all the types corresponding to the environment identifiers to be identified are classified, the final first number and second number are obtained, and the operating environment of the financial terminal to be identified is determined based on the first number and the second number.

[0034] In a specific embodiment, the operating environment information of the financial terminal to be identified is obtained based on the first number representing the test environment and the second number representing the production environment in the type set, including: if the first number is greater than the second number, the operating environment information of the financial terminal to be identified is the test environment; if the first number is less than the second number, the operating environment information of the financial terminal to be identified is the production environment; if the first number is equal to the second number, the operating environment information of the financial terminal to be identified is determined according to the priorities of all the environment identifiers to be identified.

[0035] Specifically, if the first number is 5 and the second number is 3, the operating environment information of the financial terminal to be identified is a test environment; if the first number is 3 and the second number is 5, the operating environment information of the financial terminal to be identified is a production environment. If the first number and the second number are 4, the operating environment information of the financial terminal to be identified is determined by obtaining the highest priority identifier of the environment to be identified according to the preset priority rule.

[0036] In a specific embodiment, the operation environment information of the financial terminal to be identified is obtained according to the first number representing the test environment and the second number representing the production environment in the type set, including: if the first proportion of the first number to the total number is greater than a preset threshold, the operation environment information of the financial terminal to be identified is a test environment; the total data is the sum of the first number and the second number; if the second proportion of the second number to the total number is greater than a preset threshold, the operation environment information of the financial terminal to be identified is a production environment; if both the first proportion and the second proportion are not greater than the preset threshold, the operation environment information of the financial terminal to be identified is determined according to the priority of all the environment identifiers to be identified. Specifically, the value of the preset threshold can be set according to actual conditions, and the value of the preset threshold is not specifically limited in this embodiment.

[0037] In a specific embodiment, the operating environment information of the financial terminal to be identified is determined based on the priorities of all the environment identifiers to be identified, including: presetting the priorities of different standard environment identifiers; screening out the target environment identifier to be identified with the highest priority among all the environment identifiers to be identified; the type of the target environment identifier to be identified is the operating environment information of the financial terminal to be identified.

[0038] Specifically, different development process files have different priorities of corresponding standard environment identifiers, so the final operating environment information is determined when the numbers of to-be-identified environment identifiers corresponding to the production environment and the development environment are similar.

[0039] In a specific embodiment, the development process file includes a configuration file, an environment variable, database connection information, a server URL, a log level, and a hardware feature code. Specifically, the setting of the development process file can be added or modified according to the actual situation, so as to ensure that the obtained operating environment information changes according to the actual situation.

[0040] In a specific embodiment, the priority of the standard environment identifier of the configuration file is the highest priority. The configuration file usually has the highest priority to ensure that the customization and configuration made by the user can override the system default settings or settings in other configuration files.

[0041] In a specific embodiment, the detailed implementation method of the present application is:

[0042] Step 1: Define the environment identifier

[0043] First, it is necessary to clearly distinguish the key identifiers of the test environment and the production environment. These identifiers can be obtained through various means, such as configuration files, environment variables, database connection information, etc. Definition:

[0044] ENV_TEST: indicates the test environment

[0045] ENV_PROD: indicates the production environment

[0046] Step 2: Multi-source information collection Collect environmental information from multiple sources to improve recognition accuracy and robustness. Sources include:

[0047] 1. Configuration file: Read the environment identifier in the configuration file.

[0048] 2. Environment variables: Read operating system environment variables.

[0049] 3. Database connection information: Check the database connection string.

[0050] 4. Server URL: Check the URL of the server API.

[0051] 5. Log level: Check the log level in the log configuration file.

[0052] 6. Hardware signature code: Read the hardware serial number and compare it with the preset test hardware serial number.

[0053] 7. Special mark files: Check whether there are special mark files.

[0054] 8. Certificate or key file: Checks whether a specific certificate or key file exists.

[0055] Step 3: Check the consistency of environment information by comparing information from multiple sources to ensure that they point to the same environment. Check logic:

[0056] 1. If information from most sources agrees, it is considered reliable.

[0057] 2. If there is an inconsistency, you can set the priority order, for example, the configuration file takes precedence over the environment variable.

[0058] Step 4: Record the results of environmental identification for subsequent use and debugging. Record:

[0059] 1. Record the finalized environment identifier.

[0060] 2. Record the information from each source and the results of its consistency check.

[0061] Step 5: Load environment-dependent configurations Load the corresponding configuration files and initialization parameters according to the identified environment. Load configuration:

[0062] 1. Load the database connection information of the corresponding environment.

[0063] 2. Load the server URL of the corresponding environment.

[0064] 3. Load the log level configuration for the corresponding environment.

[0065] Among them, in order to enable the ATM terminal service system (ATMC software) to intelligently identify whether its environment is a test environment or a production environment, a variety of technologies and methods can be adopted.

[0066] 1. Configuration file The current environment is specified through the configuration file.

[0067] 2. Environment variables use environment variables to pass environment information. This can be done through the command line or environment setting tools.

[0068] 3. Build parameters Add parameters during the build process, such as parameters in Maven or Gradle plugins.

[0069] 4. Database connection information distinguishes environments by the name or address of the database they are connected to. For example, the test environment may connect to testdb, while the production environment connects to prod-db.

[0070] 5. The server URL is determined by the connected server address. The test environment and the production environment point to different addresses.

[0071] 6. The log level is determined by the log level of the log framework. In the test environment, more detailed logs may be recorded, while in the production environment, only error information may be recorded.

[0072] 7. Existence of files or directories The environment is determined by checking the existence of a specific file or directory. For example, a file named .test may exist in the test environment.

[0073] 8. Network connectivity is determined by trying to connect to a known test server or port. If the connection is successful, it is considered to be in the test environment.

[0074] 9. Hardware signature code The environment is determined by reading the hardware signature code (such as serial number) and comparing it with the preset test hardware signature code.

[0075] 10. Version control tags Use specific tags in the code repository to identify versions for test and production environments.

[0076] 11.Docker labels or environment variables When using Docker container deployment, you can distinguish the environment through labels or environment variables in Dockerfile or docker-compose.yml.

[0077] 12.Kubernetes labels or annotations In a Kubernetes cluster, you can distinguish environments by using Pod or Deployment labels or annotations.

[0078] 13. Cloud Service Configuration When using a cloud service provider, you can judge the environment through the configuration or metadata of the cloud service.

[0079] 14. Special tag files In some environments, you can check whether there is a specific tag file at startup to determine the environment.

[0080] 15. Certificate or key file determines the environment by checking whether a specific certificate or key file exists. For example, a self-signed certificate may be used in a test environment, while a formal certificate is used in a production environment.

[0081] Through these methods, it can intelligently identify the environment it is in and adjust its behavior accordingly. These methods can be used in combination according to actual application scenarios to improve recognition accuracy and security.

[0082] Implementation process:

[0083] 1. Initialization phase:

[0084] Read the environment identifiers in the configuration file.

[0085] Get the environment identifier from the environment variable.

[0086] Read the environment identifier in the database connection information.

[0087] Get the environment identifier in the server URL.

[0088] Check the log level in the log configuration file.

[0089] Get the hardware serial number and compare it with the test serial number.

[0090] Check if special tag files exist.

[0091] Check whether the certificate or key file exists.

[0092] 2.Consistency check:

[0093] Compare the environment identifiers from various sources for consistency.

[0094] If they match, the final environment identifier is recorded.

[0095] If there is any inconsistency, the final environment identifier is determined based on priority.

[0096] 3. Record environmental information:

[0097] · Record the finalized environment identifier.

[0098] ·Record the information from various sources and the results of their consistency checks.

[0099] 4. Load configuration:

[0100] Load the corresponding configuration file according to the final environment identifier.

[0101] Initialize database connection.

[0102] Initialize the server API URL.

[0103] Set the log level.

[0104] 5. Start ATMC software:

[0105] Start the ATMC software using the loaded configuration information.

[0106] Ensure all dependencies are configured correctly.

[0107] Example 1: Example of a method for automatically identifying the operating environment of a financial terminal based on hardware feature codes

[0108] A specific example can be used to illustrate how to assist financial terminals in automatically identifying the operating environment based on hardware feature codes (such as MAC addresses, serial numbers, etc.). Here, the focus is on the counting principle of hardware feature codes, and its implementation process and technical principles are explained in words.

[0109] Implementation process and technical principles:

[0110] 1. Collection of hardware feature codes First, you need to collect the feature codes of the hardware devices. The hardware feature code here can be the MAC address of the network card, the serial number of the hard disk, or other unique identifiers. Assume that the MAC address of the network card is selected as the hardware feature code.

[0111] Collection method: When the ATM terminal is started, the MAC address of the local network card is read through the program. In Java, the NetworkInterface class can be used to obtain network card information.

[0112] 2. Storage of hardware signature codes

[0113] Storage location: Store the collected hardware signatures in a configuration file or database.

[0114] Alternatively, create a table in the database to store hardware feature codes and their corresponding environment flags.

[0115] 3. Comparison of hardware signature codes

[0116] Comparison logic: When the software is started, the hardware feature code of the current device is read and compared with the hardware feature code in the configuration file or database.

[0117] Comparison rules: If the hardware signature code of the current device matches the hardware signature code in the configuration file, the current environment is considered to be a test environment; if they do not match, the current environment is considered to be a production environment.

[0118] 4. Counting principle of hardware signature codes In order to further improve the accuracy of environment identification, we can introduce the counting principle. Specifically, instead of just comparing a single hardware signature code, we can perform statistical analysis on multiple hardware signature codes.

[0119] · Statistical method: record multiple hardware signatures and their corresponding environmental markers, and then count the number of times each environmental marker appears.

[0120] Majority principle: The environmental logo with the most appearances is selected as the environmental logo of the current device.

[0121] 5. Specific example Assume that we have the following hardware feature codes and their corresponding environment flags:

[0122] MAC address 00:11:22:33:44:55 corresponds to the test environment

[0123] MAC address AA:BB:CC:DD:EE:FF corresponds to the production environment

[0124] MAC address 11:22:33:44:55:66 corresponds to the test environment

[0125] MAC address A1:B2:C3:D4:E5:F6 corresponds to the production environment. Assume that the hardware signature codes collected by the current device are 00:11:22:33:44:55 and 11:22:33:44:55:66.

[0126] Statistical results:

[0127] Test environment: 2 times

[0128] Production environment: 2. There are two situations:

[0129] 1) Tie processing: If the number of occurrences is the same, a priority strategy can be adopted, such as giving priority to the test environment by default.

[0130] 2) Majority principle: In practical applications, a complete tie usually does not occur, and the accuracy of the statistical results can be ensured through multiple collections.

[0131] 6. Finalization of environmental labeling

[0132] · Final determination: Determine the final environmental mark based on the statistical results and apply it to the configuration of the ATMC software. Technical principle summary Through the counting principle of hardware feature codes, we can achieve a more intelligent and reliable environmental identification mechanism.

[0133] The specific technical principles include:

[0134] 1. Collect hardware signature: Get the unique hardware identifier from the device.

[0135] 2. Storing hardware signatures: storing hardware signatures in a configuration file or database and associating them with environment flags.

[0136] 3. Compare hardware feature codes: When the software is started, the hardware feature code of the current device is read and compared with the stored hardware feature code.

[0137] 4. Count environmental signs: record the number of occurrences of each environmental sign, and select the environmental sign with the most occurrences as the final environmental sign.

[0138] 5. Environmental label application: Apply the finalized environmental label to the configuration of the ATMC software to ensure that the software runs in the correct environment.

[0139] In this way, the accuracy and reliability of the financial terminal's automatic identification of the operating environment can be effectively improved, ensuring the consistency of software behavior in the test environment and the production environment.

[0140] Example 2: Example of how a financial terminal can automatically identify the operating environment

[0141] Example Background

[0142] Assume that there is a financial terminal application system, including the automated teller machine (ATM) client software (ATMC). This system needs to run in different environments, including the test environment and the production environment.

[0143] In order to ensure the safety and reliability of the system, a method is needed to enable ATMC to automatically identify its current environment and adjust its behavior accordingly.

[0144] The above method has the following beneficial effects:

[0145] 1. Enhanced Security:

[0146] ·Through hardware signature verification, unauthorized devices can be prevented from accessing the system, thereby improving the security of the overall system.

[0147] Ensure that only the correct configuration and logic are run in the correct environment to prevent data leakage or misoperation due to environment confusion.

[0148] 2. Improve reliability:

[0149] Through multiple verification mechanisms (configuration files, environment variables, hardware signature codes), it can ensure that the software can work properly in different environments, reducing problems caused by environmental configuration errors.

[0150] Using the counting principle can improve the accuracy of environmental recognition and reduce the risk of misjudgment.

[0151] 3. Simplify the deployment process:

[0152] Automated environment identification can simplify software deployment and maintenance processes and reduce human errors.

[0153] Freely conduct functional testing, performance testing, security testing and other activities in the test environment without affecting the normal operation of the production system.

[0154] 4. Reduce maintenance costs:

[0155] Reduce environment-related troubleshooting time and reduce IT support costs.

[0156] Improve the maintainability of the system, making it easier to manage and maintain.

[0157] The method in this embodiment is not only applicable to financial terminal systems, but can also be applied to other software systems that need to distinguish different operating environments. In this way, problems caused by environmental configuration errors can be greatly reduced and the overall stability of the system can be improved.

[0158] In the specific embodiments, see Figure 2 , is a structural diagram of an operating environment identification system for a financial terminal in the second embodiment of the present application, the system comprising: a setting module 201, a setting module 202, an acquisition module 203, an identifier extraction module 204 and an operating environment information identification module 205; the setting module 201 is used to set standard environment identifiers for different preset development process files; the types of the standard environment identifiers are used to characterize different operating environments; the operating environment is a test environment or a production environment; the setting module 202 is used to set a standard environment identifier in the development process file of the financial terminal when developing the financial terminal; the acquisition module 203 is used to obtain multiple development process files to be identified of the financial terminal to be identified when obtaining the operating environment of the financial terminal to be identified; the identifier extraction module 204 is used to extract the environment identifier to be identified in each of the development process files to be identified; the operating environment information identification module 205 is used to obtain the operating environment information of the financial terminal to be identified based on all the environment identifiers to be identified and the standard environment identifier; the operating environment information includes a test environment and a production environment.

[0159] Specifically, the system may also include the following functional modules:

[0160] 1. Configuration management module:

[0161] Responsible for reading and parsing environment flags in configuration files.

[0162] Provides an API for other modules to query the environment information in the current configuration file.

[0163] 2. Environment variable detection module:

[0164] Read the environment variables in the operating system to override the environment information in the configuration file.

[0165] Provide API for other modules to query the environment information in the current environment variables.

[0166] 3. Hardware signature code reading module:

[0167] Read the characteristic code of hardware devices (such as MAC address, serial number, etc.).

[0168] Read the current value of the hardware signature counter.

[0169] Update the value of the hardware signature counter.

[0170] Provide API for other modules to query the current hardware feature code and its counter value.

[0171] 4. Environmental recognition logic module:

[0172] Comprehensively judge the current environment based on information from configuration files, environment variables, and hardware feature codes.

[0173] Implement specific environment recognition logic, such as the counting principle in the above example.

[0174] Provide finalized environment flags for use by other modules.

[0175] 5. Logging module:

[0176] ·Record the results and related information of each environmental identification.

[0177] Provide log query function to facilitate subsequent audit and troubleshooting.

[0178] 6. Status notification module:

[0179] When the environment recognition is completed, the status notification of the current environment is sent to other components of the system.

[0180] Notify other components to adjust their behavior through message queues or event-driven methods.

[0181] Collaboration of various functional modules:

[0182] 1. Initialization at startup:

[0183] When the ATM terminal starts, the configuration management module first reads the environment information in the configuration file.

[0184] The environment variable detection module then reads the information in the environment variable and overwrites the information in the configuration file (if any).

[0185] 2. Hardware signature detection:

[0186] The hardware signature code reading module reads the signature code of the hardware device and obtains the current value of the hardware signature code counter.

[0187] The counter value is incremented by 1 and written back to the hardware device.

[0188] 3. Environmental identification:

[0189] The environment recognition logic module comprehensively judges the current environment based on configuration information, environmental variables and hardware feature codes.

[0190] If the hardware signature matches the test environment signature and the counter value is an even number, it is determined to be a test environment; otherwise, it is determined to be a production environment.

[0191] 4. Status notification and log record:

[0192] The status notification module sends status notifications of the current environment to other components so that they can adjust their behaviors.

[0193] The logging module records the results of this environment identification and related information.

[0194] 5. Component response:

[0195] After receiving the environment status notification, each functional module adjusts its behavior according to the current environment, such as connecting to the corresponding database, using different API addresses, etc.

[0196] Through the above modules and their collaborative mechanisms, financial terminals can automatically identify the environment in which they are located and make corresponding adjustments based on different environments, ensuring sufficient verification in the test environment and providing stable and reliable services in the production environment.

[0197] The system in this embodiment obtains multiple development process files to be identified of the financial terminal to be identified; and extracts the environment identifier to be identified in each development process file to be identified; based on all the environment identifiers to be identified and the standard environment identifier, the operating environment information of the financial terminal to be identified is obtained, thereby realizing automatic identification of the operating environment information, without the need for manual setting of configuration files and manual maintenance, reducing human errors, improving the maintainability of the system, and facilitating management and maintenance.

[0198] In a specific embodiment, the third embodiment of the present application provides an operating environment identification device for a financial terminal, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method described in any one of the first embodiments of the present application.

[0199] In a specific embodiment, the fourth embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of the method as described in any one of the first embodiments of the present application.

[0200] Figure 3 The internal structure of a computer device in one embodiment is shown. The computer device can be a terminal or a server. Figure 3 The computer device includes a processor, a memory, etc. connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the method in this embodiment. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement the method in this embodiment. Those skilled in the art can understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0201] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

[0202] The above description is only a preferred embodiment of the present invention and does not limit the present invention in other forms. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for identifying the operating environment of a financial terminal, characterized in that: The method comprises: Setting standard environment identifiers for different preset development process files; the types of the standard environment identifiers are used to characterize different operating environments; the operating environment is a test environment or a production environment; When developing a financial terminal, setting a standard environment identifier in a development process file of the financial terminal; When obtaining the operating environment of the financial terminal to be identified, obtaining a plurality of development process files to be identified of the financial terminal to be identified; Extracting the identifier of the environment to be identified in each of the development process files to be identified; The operating environment information of the financial terminal to be identified is obtained based on all the environment identifiers to be identified and the standard environment identifier.

2. The method for identifying the operating environment of a financial terminal according to claim 1, characterized in that: The obtaining the operating environment information of the financial terminal to be identified based on all the environment identifiers to be identified and the standard environment identifier includes: Obtaining a category set of all the environment identifiers to be identified; the category set includes all the categories corresponding to all the environment identifiers to be identified; The operating environment information of the financial terminal to be identified is obtained according to a first number representing a test environment and a second number representing a production environment in the category set.

3. The method for identifying the operating environment of a financial terminal according to claim 2, characterized in that: The obtaining the operating environment information of the to-be-identified financial terminal according to the first number representing the test environment and the second number representing the production environment in the category set includes: If the first number is greater than the second number, the operating environment information of the financial terminal to be identified is a test environment; If the first number is smaller than the second number, the operating environment information of the financial terminal to be identified is a production environment; If the first number is equal to the second number, the operating environment information of the financial terminal to be identified is determined according to the priorities of all the environment identifiers to be identified.

4. The method for identifying the operating environment of a financial terminal according to claim 2, characterized in that: The obtaining the operating environment information of the to-be-identified financial terminal according to the first number representing the test environment and the second number representing the production environment in the category set includes: If a first proportion of the first number to the total number is greater than a preset threshold, the operating environment information of the to-be-identified financial terminal is a test environment; the total data is the sum of the first number and the second number; If the second proportion of the second number to the total number is greater than a preset threshold, the operating environment information of the to-be-identified financial terminal is a production environment; If both the first proportion and the second proportion are not greater than a preset threshold, the operating environment information of the financial terminal to be identified is determined according to the priorities of all the environment identifiers to be identified.

5. The method for identifying the operating environment of a financial terminal according to claim 3 or 4, characterized in that: The step of determining the operating environment information of the financial terminal to be identified according to the priorities of all the environment identifiers to be identified includes: Preset the priorities of different standard environment identifiers; Filter out the target environment identifier to be identified with the highest priority from all the environment identifiers to be identified; The type of the target environment identifier to be identified is the operating environment information of the financial terminal to be identified.

6. The method for identifying the operating environment of a financial terminal according to claim 5, characterized in that: The development process files include configuration files, environment variables, database connection information, server URL, log level and hardware feature code.

7. The method for identifying the operating environment of a financial terminal according to claim 6, characterized in that: The priority of the standard environment identifier of the configuration file is the highest priority.

8. A system for identifying the operating environment of a financial terminal, characterized in that: The system includes: a setting module, a configuration module, an acquisition module, an identifier extraction module and an operating environment information identification module; The setting module is used to set standard environment identifiers of different preset development process files; the types of the standard environment identifiers are used to characterize different operating environments; the operating environment is a test environment or a production environment; The setting module is used to set a standard environment identifier in a development process file of the financial terminal when developing the financial terminal; The acquisition module is used to acquire a plurality of development process files to be identified of the financial terminal to be identified when acquiring the operating environment of the financial terminal to be identified; The identifier extraction module is used to extract the identifier of the environment to be identified in each of the development process files to be identified; The operating environment information identification module is used to obtain the operating environment information of the financial terminal to be identified based on all the environment identifiers to be identified and the standard environment identifier.

9. A financial terminal operating environment identification device, comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.