Cash collection processing method and device based on dynamic link library, equipment and storage medium
By encapsulating the underlying core interface into business function functions and encapsulating it into a dynamic link library, the risk of interface exposure caused by merchants' direct call to the underlying core interface is solved, and the effect of reducing the risk of attacks by the acquirer and cash register equipment is achieved.
Patent Information
- Application Number
- CN202411657124.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, merchants directly call the underlying core interface provided by the acquirer to realize the processing process of the cash register equipment, resulting in the risk of exposure of the underlying core interface and increasing the risk of the acquisition party and the cash register equipment being attacked.
By encapsulating the underlying core interface into business function functions and encapsulating these business function functions into a dynamic link library, the cashier equipment can directly call the business function functions in the dynamic link library for processing, hiding the specific implementation and calling methods of the underlying core interface, reducing exposure risk.
It effectively reduces the risk of attacks on the acquisition party and cash register equipment, and reduces the risk of interface exposure by hiding the specific implementation and calling methods of the underlying core interface.
Smart Images

Figure CN119579165A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a cashier processing method, device, equipment and storage medium based on a dynamic link library. Background Art
[0002] Financial institutions with acquiring licenses are called acquirers. When providing cash register services to external merchants, they need to connect technically with the merchant's own cash register equipment. Specifically, customers select a payment method on the merchant's cash register and then enter the payment information on the cash register. The cash register encrypts the payment information and sends it to the acquirer's server through a technical interface. After receiving the payment request, the acquirer's server performs a series of verifications and then initiates a transaction request to the bank or payment network. Once the transaction is approved, the acquirer's server will send a confirmation message of successful payment to the cash register. After the transaction is completed, the acquirer will settle funds with the merchant and clear with the bank or payment network to ensure the correctness of the flow of funds.
[0003] In the prior art, the technical connection between the acquirer and the cash register device is interface connection, that is, the merchant develops the processing flow of the cash register device by himself, such as payment processing, transaction verification, etc. The processing flow of the cash register device developed by the merchant needs to call the underlying core interface provided by the acquirer.
[0004] However, when merchants directly call the underlying core interface, they need to have an in-depth understanding of the specific implementation and calling methods of the interface. When these interfaces are exposed to merchants in large numbers, it is difficult to ensure that all merchants have a full understanding of the safe use of the underlying core interface and there is no negligence during the execution process. This greatly increases the risk of attacks on acquirers and cash registers. Summary of the invention
[0005] The present application provides a cashier processing method, device, equipment and storage medium based on a dynamic link library, which is used to solve the problem in the prior art that when a merchant directly calls the underlying core interface provided by the acquirer, it is difficult to ensure that the underlying core interface is not exposed, thereby increasing the risk of the acquirer and the cashier device being attacked.
[0006] In a first aspect, the present application provides a cash register processing method based on a dynamic link library, which is applied to a cash register device, on which one or more cash register programs are running, and the method includes:
[0007] When the cash register program is started for the first time on the cash register device, the dynamic link library of the cash register program is loaded from the acquiring server connected to the cash register device;
[0008] Obtaining operation abnormality information of all cash register programs on the cash register device during operation;
[0009] If the abnormal operation information exists, the business function corresponding to the abnormal operation information is loaded from the acquiring server, and updated to the dynamic link library of the cash register program corresponding to the abnormal operation information;
[0010] When receiving the user's operation instructions on the cash register program, the target business to be implemented by the operation instructions is determined from the preset instruction business relationship library according to the control information corresponding to the operation instructions and the input information for the controls, and the target dynamic link library corresponding to the cash register program is determined from one or more dynamic link libraries pre-loaded on the cash register device; from the target dynamic link library, one or more business function functions corresponding to the target business are called to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of cash register devices. Each of the business function functions is encapsulated by one or more underlying core interfaces. The underlying core interface is an interface in the acquiring server that needs to be securely protected.
[0011] In a possible design, the dynamic link library is a preset dynamic link library corresponding to the operating system of the cash register device, and different operating systems correspond to different dynamic link libraries.
[0012] In a possible design, the different dynamic link libraries are compiled based on the same source code, and the same source code includes pre-compiled macro definitions corresponding to basic functional interfaces of different operating systems.
[0013] In one possible design, the method further includes:
[0014] Obtain one or more function change information of all cash register programs running on the cash register device; if the function change information exists, determine the business function and the cash register program to which each function change information corresponds, so as to load the business function function corresponding to the business function of the cash register program from the acquiring server, and update it to the dynamic link library of the cash register program.
[0015] In a possible design, the obtaining of one or more function change information of all cash register programs running on the cash register device includes:
[0016] Obtaining one or more operation abnormality information of all cash register programs running on the cash register device;
[0017] If the abnormal operation information exists, the function change information of the cash register program running on the cash register device is obtained.
[0018] In a possible design, the historical running frequency and the most recent running time of each cash register program on the cash register device are obtained;
[0019] Determine the update frequency of each cash register program according to the historical operation frequency and the most recent operation time;
[0020] According to the update frequency of the cash register program, the changed business function in the dynamic link library of the cash register program is loaded from the acquiring server.
[0021] In one possible design, the underlying core interface includes: a message assembly interface, a message parsing interface, a network communication interface, a data encryption interface, a data decryption interface, and a data signature interface.
[0022] In a second aspect, the present application provides a task scheduling device, comprising:
[0023] A loading module, used to load the dynamic link library of the cash register program from the acquiring server connected to the cash register device when the cash register program is started for the first time on the cash register device;
[0024] An acquisition module, used for acquiring operation abnormality information of all cash register programs on the cash register device during operation;
[0025] If the abnormal operation information exists, the loading module is further used to load the business function corresponding to the abnormal operation information from the acquiring server, and update it to the dynamic link library of the cash register program corresponding to the abnormal operation information;
[0026] a processing module, configured to, upon receiving an operation instruction from a user on the cash register program, determine a target business to be implemented by the operation instruction from a preset instruction business relationship library according to control information corresponding to the operation instruction and input information for the control, and determine a target dynamic link library corresponding to the cash register program from one or more dynamic link libraries preloaded on the cash register device;
[0027] The processing module is also used to call one or more business function functions corresponding to the target business from the target dynamic link library to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of the cash register devices. Each of the business function functions is encapsulated by one or more underlying core interfaces, and the underlying core interface is an interface in the acquiring server that needs to be securely protected.
[0028] In a possible design, the dynamic link library is a preset dynamic link library corresponding to the operating system of the cash register device, and different operating systems correspond to different dynamic link libraries. The different dynamic link libraries are compiled based on the same source code, and the same source code includes pre-compiled macro definitions corresponding to the basic functional interfaces of different operating systems. The underlying core interface includes: message assembly interface, message parsing interface, network communication interface, data encryption interface, data decryption interface, and data signature interface.
[0029] The device further includes an acquisition module, which includes:
[0030] An acquisition module is used to obtain one or more function change information of all cash register programs running on the cash register device; if the function change information exists, the business function corresponding to each function change information and the cash register program to which it belongs are determined, so as to load the business function function corresponding to the business function of the cash register program from the acquiring server and update it to the dynamic link library of the cash register program.
[0031] In one possible design, this includes:
[0032] An acquisition module, used for acquiring one or more operation abnormality information of all cash register programs running on the cash register device;
[0033] If the abnormal operation information exists, the acquisition module is further used to obtain function change information of the cash register program running on the cash register device.
[0034] In one possible design, this includes:
[0035] An acquisition module, used to acquire the historical running frequency and the most recent running time of each cash register program on the cash register device;
[0036] A processing module, used for determining the update frequency of each cash register program according to the historical operation frequency and the most recent operation time;
[0037] The loading module is used to load the changed business function in the dynamic link library of the cash register program from the acquiring server according to the update frequency of the cash register program.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the cashier processing method based on the dynamic link library as described in the first aspect and various possible designs of the first aspect.
[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the cashier processing method based on the dynamic link library as described in the first aspect and various possible designs of the first aspect is implemented.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the cashier processing method based on the dynamic link library as described in the first aspect and various possible designs of the first aspect.
[0041] The cash register processing method, device, equipment and storage medium based on dynamic link library provided by the present application, when the cash register program is started for the first time on the cash register device, the dynamic link library of the cash register program is loaded from the acquiring server connected to the cash register device, and the operation abnormality information of all cash register programs on the cash register device during operation is obtained. If the operation abnormality information exists, the business function function corresponding to the abnormal operation information is loaded from the acquiring server, and updated to the dynamic link library of the cash register program corresponding to the operation abnormality information. When the user's operation instruction on the cash register program is received, according to the control information corresponding to the operation instruction and the input information for the control, the target business to be implemented by the operation instruction is determined from the preset instruction business relationship library, and the target dynamic link library corresponding to the cash register program is determined from one or more dynamic link libraries pre-loaded on the cash register device; from the target dynamic link library, one or more business function functions corresponding to the target business are called to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of cash register devices. Each business function function is obtained by encapsulating one or more underlying core interfaces. The underlying core interface is the interface that needs to be securely protected in the acquiring server. Compared with the prior art, merchants directly call the underlying core interface provided by the acquirer to implement the processing flow of the cash register device, which makes it difficult to ensure the safe use of the underlying core interface, and ultimately increases the risk of the acquirer and the cash register device being attacked. This application encapsulates the underlying core interface of the acquirer into business function functions, and then encapsulates these business function functions into a dynamic link library, so that the cash register device directly calls the business function functions in the dynamic link library to perform the processing flow of the cash register device. By hiding the specific implementation and calling method of the underlying core interface, the risk of the underlying core interface being exposed is reduced, thereby reducing the risk of the acquirer and the cash register device being attacked. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] Figure 1 An application scenario diagram of a cashier processing method based on a dynamic link library provided in an embodiment of the present application;
[0044] Figure 2 The process of the cashier processing method based on the dynamic link library provided in the embodiment of the present application Figure 1 ;
[0045] Figure 3 This is a schematic diagram of the dynamic link library compilation process;
[0046] Figure 4 The process of the cashier processing method based on the dynamic link library provided in the embodiment of the present application Figure 2 ;
[0047] Figure 5 The process of the cashier processing method based on the dynamic link library provided in the embodiment of the present application Figure 3 ;
[0048] Figure 6 The process of the cashier processing method based on the dynamic link library provided in the embodiment of the present application Figure 4 ;
[0049] Figure 7 A schematic diagram of the structure of a cashier processing device based on a dynamic link library provided in an embodiment of the present application;
[0050] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0051] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0053] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0054] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0055] Terminology explanation:
[0056] Dynamic Link Library: A Dynamic Link Library (DLL) is a program module that can be shared by other cash register programs, which encapsulates some shared routines and resources.
[0057] CMake: Cross Platform Make (CMake) is an open source, cross-platform automated build system that is mainly used for software building, testing and packaging.
[0058] Makefile: A text file that defines the build rules and dependencies of a software project. It contains the commands and steps that need to be executed during the build process, as well as the dependencies between files.
[0059] Cash register PAD: Also known as a tablet cash register or handheld cash register terminal, it is a cash register device based on a mobile platform. It is usually equipped with Android or other operating systems and a touch screen interface. Cash register PAD integrates multiple functions, such as ordering, checkout, member management, inventory management, and printing receipts.
[0060] PC cash register: usually includes multiple modules such as cash register system, inventory management system, member management system, etc. The cash register system can support multiple payment methods, such as cash, bank card, mobile payment, etc., and can update inventory information and sales data in real time.
[0061] Scanning box: Scanning box is usually composed of electronic components such as cameras and scanners, which can read the content of paper codes with high accuracy and convert them into digital signals for processing. For example, it can recognize and read consumers' payment codes to achieve fast and convenient payment functions.
[0062] In the prior art, when merchants develop cash register equipment, they need to call the underlying core interface provided by the acquirer. However, since merchants directly contact and call the underlying core interface, it is difficult to ensure that all merchants have a full understanding of the security of using the underlying core interface. Therefore, when a large number of underlying core interfaces are exposed to merchants, the risk of attacks on acquirers and cash register equipment is increased.
[0063] Based on this, the inventive concept of this application is to provide a cash register processing method based on a dynamic link library, which enables merchants to develop their own processing flow of cash register equipment without directly exposing the underlying core interface to merchants. Based on this, the underlying core interface can be encapsulated as a business function function, and then the business function function is encapsulated in a dynamic link library. When the merchant needs to develop the processing flow of the cash register equipment, the business function function in the dynamic link library is directly called. Merchants can directly call the business function function to implement the processing flow of the cash register equipment without directly contacting the underlying core interface, thereby reducing the risk of attacks on the acquirer and the cash register equipment.
[0064] Figure 1 Schematic diagram of the application scenario of the cashier processing method based on the dynamic link library provided in the embodiment of the present application. Figure 1 As shown, there are multiple cash register programs on the cash register device, and there is a dynamic link library corresponding to the cash register program on the acquiring server, wherein the dynamic link library encapsulates multiple business function functions, and each business function is encapsulated by multiple underlying core interfaces. When the cash register device starts the cash register program for the first time, the cash register device will load the dynamic link library in the acquiring server onto the cash register device to install the cash register program. When the cash register program needs to be updated, the cash register device loads the business function function corresponding to the business function of the cash register program from the acquiring server, and then updates it to the dynamic link library of the cash register program.
[0065] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0066] Figure 2 The process of the cashier processing method based on the dynamic link library provided in the embodiment of the present application Figure 1 ,like Figure 2 As shown, the method comprises the following steps:
[0067] S201: When the cash register program is started for the first time on the cash register device, the dynamic link library of the cash register program is loaded from the acquiring server connected to the cash register device.
[0068] In the embodiment of the present application, the acquiring server refers to a server-side system for receiving and processing payment requests, which is responsible for receiving payment requests from cash register devices, and verifying, processing and responding. Cash register devices include: POS machines, cash register PADs, PC cash registers, and code scanning boxes. When the cash register device starts the cash register program for the first time, a network connection is established between the cash register device and the acquiring server based on the communication protocol between the cash register device and the acquiring server. The cash register program sends a request to the acquiring server through the established network connection to load the required dynamic link library.
[0069] More optionally, in order to ensure that the request comes from a legitimate cash register device, the acquiring server will authenticate the cash register device after receiving the request. Specifically, when the cash register device requests to load the dynamic link library, it will send its unique cash register device identification information, such as the cash register device ID, to the acquiring server. The acquiring server will compare this cash register device identification information with the previously registered legitimate cash register device information. If the cash register device identification information matches the registered information, the acquiring server will consider the cash register device to be legitimate and allow it to continue to request to load the dynamic link library. If it does not match, the request will be rejected and a security alarm will be triggered.
[0070] After the acquiring server verifies that the cash register device is legitimate, it will send all the dynamic link libraries required by the cash register program to the cash register device at one time.
[0071] It should be noted that the dynamic link library is a preset dynamic link library corresponding to the operating system of the cash register device, and different operating systems correspond to different dynamic link libraries.
[0072] In the embodiment of the present application, the dynamic link library is a preset dynamic link library corresponding to the operating system of the cash register device, and different operating systems correspond to different dynamic link libraries. For example, the merchant can use any programming language and operating system environment to develop its own cash register device operating system including: Android, Windows and Linux. Therefore, different dynamic link libraries are designed to correspond to different operating systems.
[0073] Specifically, different dynamic link libraries are compiled based on the same source code, and the same source code includes pre-compiled macro definitions corresponding to basic functional interfaces of different operating systems.
[0074] In the embodiment of the present application, different dynamic link libraries corresponding to different operating systems are compiled based on the same source code, and the same source code includes precompiled macro definitions corresponding to the basic functional interfaces of different operating systems. Through one-time development, dynamic link libraries corresponding to different operating systems can be generated, so all common cash register device types can be supported. Compared with the prior art, in order to protect the security of the underlying core interface, the acquirer needs to develop a complete cash register application that can be used by merchants for different types of cash register devices. The method of the present application is more flexible and greatly reduces the cost of development and maintenance.
[0075] In other words, Figure 3 The figure shows a schematic diagram of the dynamic link library compilation process. The source code is written in C language, and in the process of writing the source code, the pre-compiled macro definition is used to distinguish the characteristics of different operating systems, so that the same source code includes the basic functional interfaces of different operating systems. Then in the compilation stage, CMake is used to compile cross-platform to build Makefile files for different operating systems, such as Makefile files under Android operating system, Makefile files under Windows operating system, and Makefile files under Linux operating system, and then the source code is compiled according to the Makefile files under different operating systems, and the dynamic link libraries of different operating systems are generated, i.e., the dynamic link library under Android operating system, the dynamic link library under Windows operating system, and the dynamic link library under Linux operating system.
[0076] S202: Acquire operation abnormality information of all cash register programs on the cash register device during operation.
[0077] In an embodiment of the present application, operation abnormality information of all cash register programs on the cash register device during operation is obtained. The cash register program on the cash register device will record the execution log corresponding to the cash register program in real time during operation. The execution log is stored in the database or local file of the cash register device and records the operation abnormality information of the cash register program. The cash register device will periodically scan the execution log to obtain the operation abnormality information of the cash register program during operation.
[0078] S203: If the abnormal operation information exists, the business function corresponding to the abnormal operation information is loaded from the acquiring server, and updated to the dynamic link library of the cash register program corresponding to the abnormal operation information.
[0079] In an embodiment of the present application, if there is abnormal operation information during the operation of the cash register program, the JSON format or XML format of the abnormal operation information is sent to the acquiring server through a network request. After receiving the abnormal operation information, the acquiring server parses the abnormal operation information, loads the corresponding business function according to the content of the parsed abnormal operation information, and updates it to the dynamic link library of the cash register program corresponding to the abnormal operation information.
[0080] S204: When receiving the operation instruction from the user on the cash register program, determine the target business to be implemented by the operation instruction from the preset instruction business relationship library according to the control information corresponding to the operation instruction and the input information for the control, and determine the target dynamic link library corresponding to the cash register program from one or more dynamic link libraries pre-loaded on the cash register device; call one or more business function functions corresponding to the target business from the target dynamic link library to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of cash register devices. Each business function function is encapsulated by one or more underlying core interfaces. The underlying core interface is the interface that needs to be securely protected in the acquiring server.
[0081] In an embodiment of the present application, the cash register program monitors the user's operation instructions in real time, and when receiving the operation instructions on the cash register program, extracts the control information corresponding to the operation instructions and the input information for the controls. For example, the control information refers to the specific control used to identify the user operation, including: button ID, text box name, and the input information of the control refers to the parameters used to provide the operation, including: user input data, selected options. According to the control information corresponding to the operation instruction and the input information for the control, the target business to be implemented by the operation instruction is determined from the preset instruction business relationship library. The instruction business relationship library is a mapping table that associates the user operation instruction with the business function to be implemented. The cash register program selects the target dynamic link library from one or more pre-loaded dynamic link libraries according to the determined target business. After determining the target business to be processed on the cash register device, call one or more business function functions corresponding to the target business from the dynamic link library provided by the acquiring server connected to the cash register device to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of cash register devices. In other words, the business function is an encapsulation and extension of the underlying core interface. The business function implements specific business logic by calling the core functions provided by the underlying core interface. The business function is encapsulated in a dynamic link library, which allows different applications or modules to easily call these business function functions through a unified interface and calling method. By encapsulating the underlying core interface into a business function, and then encapsulating the business function into a dynamic link library, and cash registers with different operating systems correspond to different dynamic link libraries. The dynamic link library is equivalent to a black box for users. Merchants can only call the function functions in the dynamic link library, but cannot directly access the underlying core interface, which is more secure.
[0082] Among them, the underlying core interfaces include: message assembly interface, message parsing interface, network communication interface, data encryption interface, data decryption interface, and data signature interface.
[0083] In the embodiment of the present application, the message assembly interface is used to assemble various data into a complete message according to a specific format and protocol; the message parsing interface is used to receive and parse the message from the cash register device and restore it to the original data or data structure; the network communication interface is used to provide network connection and communication functions, including establishing a connection, sending data, and receiving data; the data encryption interface ensures the security of data during transmission or storage by encrypting the data; the data decryption interface is used to decrypt the received encrypted data and restore it to the original data; the data signature interface is used to generate and verify the digital signature of the data to ensure the integrity of the data and the formality of the source. These underlying core interfaces provide stable and reliable basic functional support for business function functions.
[0084] In an embodiment of the present application, when the cash register program is started for the first time on the cash register device, the dynamic link library of the cash register program is loaded from the acquiring server to which the cash register device is connected, and the operation exception information of all cash register programs on the cash register device during operation is obtained. If the operation exception information exists, the business function function corresponding to the abnormal operation information is loaded from the acquiring server, and updated to the dynamic link library of the cash register program corresponding to the operation exception information. When the user's operation instruction on the cash register program is received, according to the control information corresponding to the operation instruction and the input information for the control, the target business to be achieved by the operation instruction is determined from the preset instruction business relationship library, and the target dynamic link library corresponding to the cash register program is determined from one or more dynamic link libraries pre-loaded on the cash register device; from the target dynamic link library, one or more business function functions corresponding to the target business are called to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of cash register devices. Each business function function is encapsulated by one or more underlying core interfaces. The underlying core interface is the interface that needs to be securely protected in the acquiring server. Compared with the prior art, merchants directly call the underlying core interface provided by the acquirer to implement the processing flow of the cash register device, which makes it difficult to ensure the safe use of the underlying core interface, and ultimately increases the risk of the acquirer and the cash register device being attacked. This application encapsulates the underlying core interface of the acquirer into business function functions, and then encapsulates these business function functions into a dynamic link library, so that the cash register device directly calls the business function functions in the dynamic link library to perform the processing flow of the cash register device. By hiding the specific implementation and calling method of the underlying core interface, the risk of the underlying core interface being exposed is reduced, thereby reducing the risk of the acquirer and the cash register device being attacked.
[0085] Figure 4 The process of the cashier processing method based on the dynamic link library provided in the embodiment of the present application Figure 2 ,like Figure 4 As shown, the method comprises the following steps:
[0086] S401: Obtain one or more function change information of all cash register programs running on the cash register device; if there is function change information, determine the business function and the cash register program to which each function change information corresponds, so as to load the business function function corresponding to the business function of the cash register program from the acquiring server, and update it to the dynamic link library of the cash register program.
[0087] In an embodiment of the present application, the cash register device can actively obtain one or more function change information of all cash register programs running thereon. If there is function change information, the business function corresponding to each function change information and the cash register program to which it belongs are determined. According to the function change information, the business function function corresponding to the business function of the latest cash register program is downloaded from the acquiring server, and then updated to the dynamic link library of the cash register program. For example, the cash register device periodically sends a request to the acquiring server to inquire whether there is new function change information. Optionally, the function change information includes: cash register program identification, business function identification, version information. If the function change information exists, the business function corresponding to each function change information and the cash register program to which it belongs can be determined through the cash register program identification and business function identification in the function change information. Finally, the business function function corresponding to the business function of the cash register program is loaded from the acquiring server, and updated to the dynamic link library of the cash register program.
[0088] In the embodiment of the present application, the cash register device actively obtains one or more function change information of all cash register programs running thereon; if there is function change information, the business function corresponding to each function change information and the cash register program to which it belongs are determined, so as to load the business function function corresponding to the business function of the cash register program from the acquiring server, and update it to the dynamic link library of the cash register program. The cash register device actively loads the dynamic link library to dynamically update the dynamic link library to ensure that the dynamic link library is kept at the latest version, thereby improving the reliability and security of the cash register system.
[0089] Figure 5 The process of the cashier processing method based on the dynamic link library provided in the embodiment of the present application Figure 3 ,like Figure 5 As shown in the above Figure 4 Based on the embodiment shown, the specific implementation method of obtaining one or more function change information of all cash register programs running on the cash register device in step S401 is:
[0090] S501: Obtain one or more operation exception information of all cash register programs running on the cash register device.
[0091] In an embodiment of the present application, one or more operation exception information of all cash register programs running on the cash register device is obtained. Optionally, the operation exception information includes: an error report generated when the cash register program terminates unexpectedly, and an abnormal event recorded in a log generated when the cash register program is running.
[0092] S502: If the abnormal operation information exists, the function change information of the cash register program running on the cash register device is obtained.
[0093] In the embodiment of the present application, if an error report generated when the cash register program is terminated unexpectedly or an abnormal event recorded in a log generated when the cash register program is running is obtained, the function change information of the cash register program corresponding to the abnormal information running on the cash register device is obtained from the acquiring server. Then, according to the business function corresponding to the function change information and the cash register program to which it belongs, the business function function corresponding to the business function of the cash register program is loaded from the acquiring server and updated to the dynamic link library of the cash register program.
[0094] In an embodiment of the present application, one or more operation abnormality information of all cash register programs running on the cash register device is obtained, and if the operation abnormality information exists, the function change information of the cash register program running on the cash register device is obtained. When an error occurs in the operation of the cash register program on the cash register device, it can be inferred that the cash register program on the cash register device has been updated. Therefore, at this time, the function change information of the cash register program running on the cash register device is obtained, and then the business function function corresponding to the business function of the cash register program is loaded from the acquiring server according to the function change information, and updated to the dynamic link library of the cash register program, which can effectively solve the problem of the cash register program crashing due to the update between the cash register program on the cash register device and the acquiring server, and ensure the normal operation of the cash register program.
[0095] Figure 6 The process of the cashier processing method based on the dynamic link library provided in the embodiment of the present application Figure 4 ,like Figure 6 As shown, the method comprises the following steps:
[0096] S601: Obtain the historical running frequency and the most recent running time of each cash register program on the cash register device.
[0097] In an embodiment of the present application, the historical running frequency and the most recent running time of each cash register program on the cash register device are obtained. For example, by monitoring the startup and shutdown events of the cash register program to record the running times and timestamp of each cash register program, the historical running frequency and the most recent running time of the cash register program are obtained.
[0098] S602: Determine the update frequency of each cash register program according to the historical operation frequency and the most recent operation time.
[0099] In the embodiment of the present application, the update frequency of each cashier program is determined based on the historical operation frequency and the most recent operation time. Specifically, for each cashier program, the average operation frequency in the specified time period is calculated based on the historical operation frequency, and then all cashier programs are sorted from high to low according to the average operation frequency, and according to business needs, one or more thresholds are set to distinguish between high-frequency operation programs and low-frequency operation programs; or, for each cashier program, the time difference between its most recent operation time and the current time is calculated, and all cashier programs are sorted from long to short according to the time difference, and then, according to business needs, a time threshold is set to identify programs that have not been run for a long time, and then they are classified as low-frequency operation programs.
[0100] S603: According to the update frequency of the cash register program, the changed business function in the dynamic link library of the cash register program is loaded from the acquiring server.
[0101] In the embodiment of the present application, the business function functions that have changed in the dynamic link library of the cash register program are loaded from the acquiring server according to the update frequency of each cash register program calculated. More optionally, the business function functions that have changed in the dynamic link library of the cash register program are loaded from the acquiring server according to the division of high-frequency operation programs and low-frequency operation programs. Specifically, for the cash register program divided into the high-frequency operation program, a shorter update interval is set, such as daily or weekly update; for the cash register program divided into the low-frequency operation program, a longer update interval can be set, such as monthly update.
[0102] In an embodiment of the present application, the historical running frequency and the most recent running time of each cash register program on the cash register device are obtained, and the update frequency of each cash register program is determined according to the historical running frequency and the most recent running time. According to the update frequency of the cash register program, the changed business function in the dynamic link library of the cash register program is loaded from the acquiring server. For frequently used cash register programs, a higher update frequency is set to ensure that users can obtain new functions of the cash register program in a timely manner. For less used cash register programs, the update frequency is reduced to reduce the occupation and interference of system resources while ensuring that users can use the cash register program normally.
[0103] Figure 7 This is a schematic diagram of the structure of a cash register processing device based on a dynamic link library provided in an embodiment of the present application. Figure 7 As shown, the cashier processing device based on the dynamic link library includes: a loading module 701, an acquisition module 702 and a processing module 703;
[0104] The loading module 701 is used to load the dynamic link library of the cash register program from the acquiring server connected to the cash register device when the cash register program is started for the first time on the cash register device; the acquisition module 702 is used to obtain the abnormal operation information of all cash register programs on the cash register device during operation; if the abnormal operation information exists, the loading module is also used to load the business function function corresponding to the abnormal operation information from the acquiring server, and update it to the dynamic link library of the cash register program corresponding to the abnormal operation information; the processing module 703 is also used to, when receiving the user's operation instruction on the cash register program, according to the control information corresponding to the operation instruction and the input information for the control, from the predicted The target business to be achieved by the operation instruction is determined from the instruction business relationship library, and the target dynamic link library corresponding to the cash register program is determined from one or more dynamic link libraries pre-loaded on the cash register device; the processing module 703 is also used to call one or more business function functions corresponding to the target business from the target dynamic link library to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of cash register devices. Each business function function is encapsulated by one or more underlying core interfaces. The underlying core interface is the interface that needs to be securely protected in the acquiring server.
[0105] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device may include: a transceiver 801 , a processor 802 , and a memory 803 .
[0106] The processor 802 executes the computer execution instructions stored in the memory, so that the processor 802 executes the scheme in the above embodiment. The processor 802 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0107] The memory 803 is connected to the processor 802 via a system bus and implements communication therebetween. The memory 803 is used to store computer program instructions.
[0108] The transceiver 801 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.
[0109] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0110] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0111] The embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the cashier processing method based on the dynamic link library in the above embodiment.
[0112] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the cashier processing method based on the dynamic link library of the above embodiment.
[0113] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the cashier processing method based on the dynamic link library in the above embodiment.
[0114] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules 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 interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0115] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0116] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0117] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0118] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0119] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0120] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0121] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0122] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0123] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A cashier processing method based on a dynamic link library, characterized in that: Applied to a cash register device, one or more cash register programs are running on the cash register device, and the method includes: When the cash register program is started for the first time on the cash register device, the dynamic link library of the cash register program is loaded from the acquiring server connected to the cash register device; Obtaining operation abnormality information of all cash register programs on the cash register device during operation; If the abnormal operation information exists, the business function corresponding to the abnormal operation information is loaded from the acquiring server, and updated to the dynamic link library of the cash register program corresponding to the abnormal operation information; When receiving the user's operation instructions on the cash register program, the target business to be implemented by the operation instructions is determined from the preset instruction business relationship library according to the control information corresponding to the operation instructions and the input information for the controls, and the target dynamic link library corresponding to the cash register program is determined from one or more dynamic link libraries pre-loaded on the cash register device; from the target dynamic link library, one or more business function functions corresponding to the target business are called to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of cash register devices. Each of the business function functions is encapsulated by one or more underlying core interfaces. The underlying core interface is an interface in the acquiring server that needs to be securely protected.
2. The method according to claim 1, characterized in that The dynamic link library is a preset dynamic link library corresponding to the operating system of the cash register device, and different operating systems correspond to different dynamic link libraries.
3. The method according to claim 2, characterized in that The different dynamic link libraries are compiled based on the same source code, and the same source code includes pre-compiled macro definitions corresponding to basic functional interfaces of different operating systems.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Obtain one or more function change information of all cash register programs running on the cash register device; if the function change information exists, determine the business function and the cash register program to which each function change information corresponds, so as to load the business function function corresponding to the business function of the cash register program from the acquiring server, and update it to the dynamic link library of the cash register program.
5. The method according to claim 4, characterized in that The obtaining of one or more function change information of all cash register programs running on the cash register device includes: Obtaining one or more operation abnormality information of all cash register programs running on the cash register device; If the abnormal operation information exists, the function change information of the cash register program running on the cash register device is obtained.
6. The method according to claim 1, characterized in that Also includes: Obtain the historical running frequency and the most recent running time of each cash register program on the cash register device; Determine the update frequency of each cash register program according to the historical operation frequency and the most recent operation time; According to the update frequency of the cash register program, the changed business function in the dynamic link library of the cash register program is loaded from the acquiring server.
7. The method according to any one of claims 1 to 3, characterized in that The underlying core interface includes: a message assembly interface, a message parsing interface, a network communication interface, a data encryption interface, a data decryption interface, and a data signature interface.
8. A cash register processing device based on a dynamic link library, characterized in that: include: A loading module, used to load the dynamic link library of the cash register program from the acquiring server connected to the cash register device when the cash register program is started for the first time on the cash register device; An acquisition module, used for acquiring operation abnormality information of all cash register programs on the cash register device during operation; If the abnormal operation information exists, the loading module is further used to load the business function corresponding to the abnormal operation information from the acquiring server, and update it to the dynamic link library of the cash register program corresponding to the abnormal operation information; a processing module, configured to, upon receiving an operation instruction from a user on the cash register program, determine a target business to be implemented by the operation instruction from a preset instruction business relationship library according to control information corresponding to the operation instruction and input information for the control, and determine a target dynamic link library corresponding to the cash register program from one or more dynamic link libraries preloaded on the cash register device; The processing module is also used to call one or more business function functions corresponding to the target business from the target dynamic link library to process the target business. The business function function is obtained by encapsulating the underlying core interface of the acquiring server according to the basic business functions required by various types of the cash register devices. Each of the business function functions is encapsulated by one or more underlying core interfaces, and the underlying core interface is an interface in the acquiring server that needs to be securely protected.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
