Application program running method, device, electronic device and storage medium
By loading the configuration nodes and target resources, the hardware modules of financial equipment and applications are decoupled, the universality of applications and low maintenance costs are achieved, and the problem of strong coupling in the development of traditional financial equipment applications is solved.
Patent Information
- Application Number
- CN202210493151.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-05-07
AI Technical Summary
In the development of traditional financial equipment application programs, the coupling between financial equipment and hardware functional modules is strong, resulting in the application being not universal and has high maintenance costs.
By obtaining the process configuration file from the installation package of the target application, loading the configuration nodes, and loading each configuration node in turn from the preset application protocol to obtain the target resources until all execution is successful, we can achieve normal operation of the application and realize financial Decoupling of the equipment and application hardware modules.
It realizes the general operation of applications on any financial equipment that supports preset protocols, reduces development and maintenance costs, and improves development efficiency.
Smart Images

Figure CN114895980B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to an application program running method, device, electronic device, and storage medium. Background Art
[0002] Financial equipment refers to the hardware equipment used by banks and other financial institutions on a daily basis, such as automated teller machines (ATMs), cash recycling systems (CRSs), smart terminals, self-service inquiry machines, and point of sale (POSs). These hardware equipment usually consists of a variety of hardware with specific functions and related hardware modules. For example, CRS equipment includes card readers, printers, password keyboards, deposit modules, withdrawal modules, indicator modules, and receipt printing modules, and smart terminals include cameras, printers, and high-definition cameras.
[0003] When developing business software on financial equipment, traditional solutions usually require programming for financial equipment, that is, corresponding applications need to be developed for the different characteristics of different financial equipment. When the development is completed, the various functional modules in the application are usually packaged together as a whole executable program and delivered together with the financial equipment.
[0004] During the development process of traditional financial equipment applications, there is a strong coupling between the financial equipment and the various hardware functional modules in the application, which makes the application non-universal and has high subsequent maintenance costs. Summary of the invention
[0005] The embodiments of the present invention provide an application running method, device, electronic device and storage medium, which can reduce the coupling between financial equipment and various hardware functional modules in the application, reduce maintenance costs and improve development efficiency.
[0006] In a first aspect, an embodiment of the present invention provides an application program running method, comprising:
[0007] Obtaining a process configuration file from an installation package corresponding to a target application, and loading a plurality of configuration nodes in the process configuration file, wherein the configuration nodes are nodes required to run the target application;
[0008] Each of the configuration nodes is loaded from the preset application protocol in sequence, and the target resource corresponding to each of the configuration nodes is obtained until all the target resources corresponding to the configuration nodes are successfully executed.
[0009] In a second aspect, an embodiment of the present invention provides an application running device, the device comprising:
[0010] A configuration file acquisition module, used to acquire a process configuration file from an installation package corresponding to a target application, and load a plurality of configuration nodes into the process configuration file, wherein the configuration nodes are nodes required to run the target application;
[0011] The target resource execution module is used to load each of the configuration nodes from the preset application protocol in sequence and obtain the target resources corresponding to each of the configuration nodes until all the target resources corresponding to the configuration nodes are successfully executed.
[0012] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the application running method described in any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the application running method described in any embodiment of the present invention when executed.
[0017] The application running method provided by the embodiment of the present invention first obtains the process configuration file from the installation package corresponding to the target application, and then loads multiple configuration nodes in the process configuration file, wherein the configuration nodes are nodes required to run the target application; then, each configuration node is loaded from the preset application protocol in turn, and the target resources corresponding to each configuration node are obtained, until all the target resources corresponding to the configuration nodes are successfully executed, the normal operation of the application on the financial machine can be realized. The technical solution provided by the embodiment of the present invention realizes the operation of the application by loading the target resources required by the target application from the preset application protocol and loading the target resources corresponding to the configuration nodes, and realizes the decoupling of the financial machine and the application hardware module when the application is installed on the financial machine, and can run on any financial machine that supports the preset protocol; it solves the problem of strong coupling between the financial machine and each hardware functional module in the application in the prior art, so that the application has universality, and achieves the beneficial effects of improving development efficiency and reducing maintenance costs.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the embodiments of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 It is a flowchart of the application program running method provided by an embodiment of the present invention;
[0021] Figure 2 is another flowchart of the application program running method provided by an embodiment of the present invention;
[0022] Figure 3 is a structural diagram of an application program running device provided by an embodiment of the present invention;
[0023] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0026] Figure 1 A flow chart of an application running method provided in an embodiment of the present invention. This embodiment is applicable to the case of running an application on a financial instrument. The method can be executed by an application running device. The application running device can be implemented in the form of hardware and / or software. The application running device can be configured in a computer device such as a server.
[0027] refer to Figure 1 , the method may specifically include the following steps:
[0028] S110 . Obtain a process configuration file from an installation package corresponding to the target application, and load multiple configuration nodes into the process configuration file, where the configuration nodes are nodes required to run the target application.
[0029] An application program refers to a computer program developed to run on an operating system in order to complete one or several specific tasks. The application program runs and calls the hardware instances in the application program to implement the corresponding application functions.
[0030] Exemplarily, in the financial field, the application may be a withdrawal business application, a deposit business application, an inquiry business application, a transfer business application, or a password modification business application of a financial machine (for example, an all-in-one deposit and withdrawal machine); in the medical field, the application may be a self-service registration business application, a medical record inquiry business application, a report printing business application, and a payment business application, etc. The fields and types of specific applications are not limited here.
[0031] Taking the financial field as an example, in the existing scheme, the application program needs to be developed specifically in combination with the business functions of the current financial machines. For example, the ATM has business functions such as withdrawal, card-to-card transfer, balance inquiry, password modification, etc., and the deposit and withdrawal machine has deposit business functions on the basis of the ATM function. On the basis of having different business functions, developers need to develop corresponding applications according to the business functions required by the current financial machines and bind different hardware modules, so there are problems such as the development process is relatively cumbersome, the coupling between the application program and the hardware module is high, and the application program is not universal in different types of financial machines. In view of this, the application program operation method provided in the embodiment of the present invention is to improve the above problems.
[0032] The target application mentioned above represents any application in the current financial machine. It is easy to understand that the application referred to in the embodiment of the present invention can be a program corresponding to the business function of the financial machine.
[0033] The financial machine contains installation packages corresponding to the application programs. The installation packages corresponding to each application program can be represented by jar packages or zip packages. The source code can be packaged directly using development tools.
[0034] The installation package corresponding to the application generally includes a variety of files, for example, there may be a process configuration file, a node type file, and an operation log file, etc. The process configuration file can be searched in the installation package corresponding to the target application according to the file identifiers of different files. The process configuration file includes the configuration nodes required to run the target application, so that the node operation process of the target application, that is, the execution sequence of the configuration nodes, is realized by loading each configuration node.
[0035] S120. Load each configuration node from the preset application protocol in sequence, and obtain the target resource corresponding to each configuration node, until all the target resources corresponding to the configuration nodes are successfully executed.
[0036] The preset application protocol provided in the embodiment of the present invention is: TpaaS application protocol. When developing applications based on the TpaaS protocol, business applications must be developed in accordance with the specifications of the TPaaS protocol, and the operating platform schedules and manages the applications in accordance with the protocol, and provides hardware, storage, network and other related resources for the operation of the applications.
[0037] Generally, the preset application protocol specifies the resources that can be used by the application programs required by all financial instruments, and the resources can be divided into control resources, device hardware module resources, page storage resources, and interface call resources, etc. Taking the device hardware module resources as an example, in the specific implementation, the hardware modules corresponding to all the application programs included in all financial instruments are first counted. For multiple financial instruments with the same hardware module, only one needs to be stored. The advantage of this is that it can reduce the development workload.
[0038] Specifically, according to step S110, after obtaining multiple configuration nodes in the target application process configuration file, the configuration process required to implement the target application can be obtained. In the configuration process, the first node is generally a "start" node, or a "start" node, and then the target resources corresponding to each configuration node are obtained from the TpaaS protocol in sequence according to the configuration node sequence in the configuration process. For the current configuration node, the target resource corresponding to the current node name can be obtained from the preset application protocol according to the node name of the current configuration node. After obtaining the target resource, the application platform can execute the current configuration node according to the actual content defined by the target resource until all target resources included in the configuration process are successfully executed, indicating that the current application on the financial instrument is running successfully.
[0039] Specifically, when the application platform can execute the current configuration node according to the actual content defined by the target resource, the target resource may only contain interface display resources. For example, the current node only needs to display the corresponding interface on the entry tool; or the current node needs to call at least one corresponding hardware module, so as to implement the call of the corresponding hardware instance according to the hardware module resources defined in the target resource. The content contained in the specific target resource is not limited here, and is subject to the actual needs of the developer when writing the application.
[0040] Optionally, the application running method provided by the embodiment of the present invention can determine the calling of the hardware module according to the user's selection instruction on the financial machine. For example, taking the "cash withdrawal application" as an example, after the withdrawal is completed, the "whether to print a receipt" will be displayed on the entry machine. If the user selects "yes", the printing module is obtained in the application protocol, and the hardware instance printer is started to print. If the user selects "no", the startup of the current application is terminated, and the configuration node in the configuration file is transferred to "end", indicating that the withdrawal application has completed running.
[0041] The application running method provided by the embodiment of the present invention first obtains the process configuration file from the installation package corresponding to the target application, and then loads multiple configuration nodes in the process configuration file, wherein the configuration nodes are nodes required to run the target application; then, each configuration node is loaded from the preset application protocol in turn, and the target resources corresponding to each configuration node are obtained, until all the target resources corresponding to the configuration nodes are successfully executed, the normal operation of the application on the financial machine can be realized. The technical solution provided by the embodiment of the present invention realizes the operation of the application by loading the target resources required by the target application from the preset application protocol and loading the target resources corresponding to the configuration nodes, and realizes the decoupling of the financial machine and the application hardware module when the application is installed on the financial machine, and can run on any financial machine that supports the preset protocol; it solves the problem of strong coupling between the financial machine and each hardware functional module in the application in the prior art, so that the application has universality, and achieves the beneficial effects of improving development efficiency and reducing maintenance costs.
[0042] Figure 2 1 is another flow chart of the application program running method provided by an embodiment of the present invention. The relationship between this embodiment and the above embodiment is a further refinement of the corresponding features of the above embodiment. Figure 2 As shown, the method may include the following steps:
[0043] S210: Obtain a process configuration file from an installation package corresponding to the target application.
[0044] S220: Obtain the target format file in the process configuration file.
[0045] The target format file is saved in the process configuration (config) directory of the target application installation package. Files in various formats can be obtained by loading config.
[0046] In order to obtain the configuration node of the target application, the target format file provided in the embodiment of the present invention is an extensible markup language (xml) format file. However, the target format file mentioned in the embodiment of the present invention is not limited to the xml format file, and can also be a docx format file, an xlsx format file, an xls format file, etc.
[0047] By loading the XML file in the config directory, you can get the configuration nodes in the target application.
[0048] S221. Load multiple configuration nodes in the target format file in sequence.
[0049] Each target format file includes a plurality of configuration nodes, and the configuration nodes are nodes required to run the target application, so that the configuration process of the target application is obtained by loading the configuration of the plurality of configuration nodes.
[0050] S222: Obtain the loading duration of multiple configuration nodes in the target format file.
[0051] For each configuration node, there are corresponding configuration attributes, which can generally be default attributes or node-customized attributes. The default attributes generally include the loading duration attribute, which indicates the time required to load the current configuration node. The purpose of obtaining the loading duration is to determine whether the current configuration node can be loaded normally, thereby determining whether the target application can run normally.
[0052] S223: Determine whether the loading time exceeds a preset value.
[0053] The preset value may be 0.5 seconds or 1 second. The specific preset value is not limited here and is subject to the actual needs of the developer.
[0054] If the preset time period is exceeded, step S224 is executed; if the preset time period is not exceeded, step S225 is executed.
[0055] S224: The target application fails to run.
[0056] If the target application fails to run, the current running process ends.
[0057] Optionally, when the loading time of the current configuration node exceeds a preset value, a warning message may be displayed through the running log, so that the developer can perform targeted optimization in the later stage of maintenance.
[0058] S225. When all configuration nodes are loaded, obtain the configuration process of the target application when it is running.
[0059] By loading each configuration node in the configuration file once, the order of running the configuration nodes when implementing the corresponding functions of the target application can be obtained, that is, the configuration process when the target application is running can be obtained.
[0060] S230: Load each configuration node from the preset application protocol in sequence, and obtain the target resource corresponding to each configuration node.
[0061] According to the obtained configuration process, the first configuration node is obtained, and according to the sequence of the configuration nodes defined in the configuration process, the target resource corresponding to each configuration node is obtained from the preset application protocol.
[0062] In an optional embodiment, for any configuration node i among the multiple configuration nodes, the configuration node i is loaded from a preset application protocol, and a target resource corresponding to the configuration node i is obtained:
[0063] A) Obtain the node name of configuration node i according to the target format file.
[0064] In the target format file, the node name of the configuration node can be named with the hardware name represented by the current node, or named with an identity identification attribute (Identity Document, referred to as ID). Generally, the node name of the current node is consistent with the name in the target hardware module, which facilitates the identification of the target hardware module in subsequent steps.
[0065] B) Determine the target resource of the configuration node i from the preset application protocol according to the node name of the configuration node i.
[0066] The target resource represents the resource required when loading the target hardware module from the preset application protocol according to the current configuration node. The target resource may include control resources, device module resources, page resources, storage resources, and interface call resources.
[0067] When the configuration node i of the target application is scheduled, the corresponding target resource is obtained in the preset application protocol according to the node name of the current configuration node, and the current configuration node is executed according to the actual content contained in the target resource.
[0068] C) Determine whether the target resource contains the target hardware module.
[0069] If included, execute step D); if not included, execute step E).
[0070] D) Load the target hardware module corresponding to the configuration node i from the target resource, and call the target hardware instance corresponding to the target hardware module.
[0071] When the target resource includes the target hardware module, the protocol interface of the target hardware module is loaded from the target resource in a manner defined by the application protocol, thereby implementing the call to the target hardware instance.
[0072] An optional embodiment, when calling a target hardware instance corresponding to a target hardware module, includes:
[0073] Obtain target interface information corresponding to the target hardware module; call the target hardware instance according to the target interface information.
[0074] The target interface information may be an interface name or identification information of the target interface, or a protocol address of the target interface, etc. The specific target interface information is not limited here, as long as the target hardware can be identified through the interface information of the target interface.
[0075] When the target hardware instance is called according to the target interface information, the target hardware instance may be calling a "camera", calling a "printer", calling a "card reader", calling a "password keyboard", etc.
[0076] The current step may also include determining whether all target hardware instances corresponding to the configuration nodes included in the configuration process have been successfully called. If so, the target hardware instance corresponding to the configuration node has been successfully called. If not, the next configuration node is re-acquired to perform the corresponding target hardware instance calling operation.
[0077] E) Execute the target resource corresponding to the configuration node i.
[0078] S240. All target resources corresponding to the configuration nodes are executed successfully.
[0079] S250: Obtain the node name of the last configuration node obtained according to the configuration process.
[0080] S260: When the node name is a preset name, confirm that the target application has completed running.
[0081] When calling the hardware instance corresponding to the node name as the configuration process, the node will specify a status code when exiting. Use exit to point the status code to the next execution process. If the next attribute is configured as END, it means the end of the app call.
[0082] Exemplarily, the preset name may be “end” or “end”, that is, when the node name is “end” or “end”, it is confirmed that the target application has been completed.
[0083] The embodiment of the present invention also provides an optional embodiment, before obtaining the target resource corresponding to the previous configuration node from the preset application protocol, and before obtaining the target resource corresponding to the next configuration node from the preset application protocol, the application running method provided by the embodiment of the present invention also includes: loading the configuration process corresponding to any application, obtaining a new configuration process, the new configuration process includes multiple new configuration nodes; calling the resources corresponding to each new configuration node in sequence according to the new configuration process; when the node name of the last new configuration node in the new configuration process is the preset name, confirming that any application has completed running. The advantage of doing this is that it can realize mutual calling between applications, and each application does not affect each other.
[0084] In the TPaaS protocol, the default server / client (C / S) mode is used for application development. That is, the logic of the application is written in the nodes of the financial instrument. Based on the characteristics of the TPaaS protocol, the platform can provide fast browser / server (B / S) mode application development support.
[0085] The B / S mode is actually a single-node C / S mode application, which only contains a fixed-name node. This node supports access to the remote positioning system (Uniform Resource Locator, referred to as URL) and supports interface jumps to provide support for B / S mode applications. For example, B / S mode applications do not need to control hardware resources such as card readers to implement card reading operations, but should implement card reading functions by calling card reading applications and obtaining the output of card reading applications. This development method enables mutual calls between applications, and each application does not affect each other.
[0086] Specifically, the application program running method provided by the embodiment of the present invention is described below with a complete embodiment:
[0087] The applications required by financial instruments can be divided into application 1, application 2 and application 3 according to different execution functions. When the business application is developed based on the TPaaS protocol, the application is developed in accordance with the specifications of the TPaaS protocol. In the TPaaS protocol, the resources corresponding to each application are specified. The current resources can be divided into process scheduling resources, page display resources, storage resources, hardware equipment resources and transaction resources. When the application is run on the terminal financial instrument, the installation package of the application required by the current financial instrument is stored in the financial instrument. By obtaining the configuration file in the current installation package, the configuration process is obtained, and then the corresponding resources are loaded from the application protocol on the application platform according to the configuration node in the configuration process, and the target resource corresponding to the current configuration node is further obtained. The current configuration node is executed according to the content contained in the current target resource. If the target resource contains a hardware module resource, indicating that the corresponding hardware needs to be called, the call to the hardware instance is implemented according to the hardware interface of the hardware module. When all the target resources corresponding to all configuration nodes are executed, the current application is completed.
[0088] The application running method provided by the embodiment of the present invention is a business application developed based on the TPaaS protocol, which can be run on any operating platform that supports the TPaaS protocol, so it can achieve compatibility with different operating systems and hardware devices; the TPaaS protocol abstracts the financial equipment hardware devices into corresponding resources, and third-party developers only need to understand the TPaaS protocol to develop financial equipment applications based on the TPaaS protocol; each application will run in its own independent thread space, and the various applications will not affect each other; each application will be loaded in its own independent class space, and the class spaces of different applications are isolated from each other; applications are allowed to call each other. By using the solution provided by the embodiment of the present invention, the versatility of a set of applications can be achieved, and maintenance costs can be reduced.
[0089] Figure 3 1 is a schematic diagram of a structure of an application program running device provided in an embodiment of the present invention. The device is suitable for executing the application program running method provided in an embodiment of the present invention. The application program running device can be implemented in the form of hardware and / or software, and the application program running device can be configured in a computer device such as a server. Figure 3 As shown, the device may specifically include: a configuration file acquisition module 310 and a target resource execution module 320, wherein:
[0090] The configuration file acquisition module 310 is used to acquire a process configuration file from an installation package corresponding to a target application, and load a plurality of configuration nodes into the process configuration file, wherein the configuration nodes are nodes required to run the target application;
[0091] The target resource execution module 320 is used to load each of the configuration nodes from the preset application protocol in sequence and obtain the target resource corresponding to each of the configuration nodes until all the target resources corresponding to the configuration nodes are successfully executed.
[0092] The application running device provided by the embodiment of the present invention first obtains the process configuration file from the installation package corresponding to the target application, and then loads multiple configuration nodes in the process configuration file, wherein the configuration node is the node required to run the target application; then, each configuration node is loaded from the preset application protocol in turn, and the target resource corresponding to each configuration node is obtained, until the target resources corresponding to the configuration node are all successfully executed, the normal operation of the application on the financial machine can be realized. The technical solution provided by the embodiment of the present invention realizes the operation of the application by loading the target resources required by the target application from the preset application protocol and loading the target resources corresponding to the configuration node, and realizes the decoupling of the financial machine and the application hardware module when the application is installed on the financial machine, and can run on any financial machine that supports the preset protocol; it solves the problem of strong coupling between the financial machine and each hardware functional module in the application in the prior art, so that the application has universality, and achieves the beneficial effects of improving development efficiency and reducing maintenance costs.
[0093] In one embodiment, the configuration file acquisition module 310 includes: a target format file acquisition unit, a configuration node loading unit and a configuration process acquisition unit, wherein:
[0094] A target format file acquisition unit, used to acquire the target format file in the process configuration file;
[0095] A configuration node loading unit, used to sequentially load a plurality of the configuration nodes in the target format file;
[0096] The configuration process obtaining unit is used to obtain the configuration process of the target application when all the configuration nodes are loaded.
[0097] In one embodiment, the configuration file acquisition module 310 further includes: a loading time acquisition unit and a loading time determination unit, wherein:
[0098] A loading duration acquisition unit, used to acquire a loading duration of loading a plurality of the configuration nodes in the target format file;
[0099] The loading time determination unit is used to confirm that the target application fails to run when the loading time exceeds a preset value.
[0100] In one embodiment, the target resource execution module 320 includes: a node name acquisition unit and a target resource acquisition unit, wherein:
[0101] A node name acquisition unit, used to acquire the node name of the configuration node i according to the target format file;
[0102] The target resource acquisition unit is used to determine the target resource of the configuration node i from the preset application protocol according to the node name of the configuration node i.
[0103] In one embodiment, the target resource execution module 320 further includes: a judgment unit;
[0104] A judging unit is used to judge whether the target resource contains a target hardware module; if so, load the target hardware module corresponding to the configuration node i from the target resource and call the target hardware instance corresponding to the target hardware module; if not, execute the target resource corresponding to the configuration node i.
[0105] In one embodiment, the target resource execution module 320 further includes: an interface information acquisition unit and a hardware instance calling unit, wherein:
[0106] An interface information acquisition unit, used to acquire target interface information corresponding to the target hardware module;
[0107] The hardware instance calling unit is used to call the target hardware instance according to the target interface information.
[0108] In one embodiment, the device further includes: a node name acquisition module and a program running confirmation module, wherein:
[0109] A node name acquisition module, used to acquire the node name of the last configured node obtained according to the configuration process;
[0110] The program running confirmation module is used to confirm that the target application program has completed running when the node name is a preset name.
[0111] In one embodiment, the device further comprises: a configuration process loading module, wherein:
[0112] A configuration process loading module, used to load a configuration process corresponding to any application program to obtain a new configuration process, wherein the new configuration process includes a plurality of new configuration nodes;
[0113] A resource calling module, specifically used to call the resources corresponding to each of the new configuration nodes in sequence according to the new configuration process;
[0114] The program running confirmation module is specifically used to confirm that any application program has been completed when the node name of the last new configuration node in the new configuration process is a preset name.
[0115] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0116] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the application running method described in any embodiment of the present invention.
[0117] An embodiment of the present invention further provides a computer-readable medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the application running method described in any embodiment of the present invention when executed.
[0118] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer system 500 of an electronic device suitable for implementing an embodiment of the present invention. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0119] like Figure 4 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0120] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0121] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0122] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be set in a processor. For example, they may be described as: a processor includes a configuration file acquisition module and a target resource execution module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0125] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining a process configuration file from an installation package corresponding to a target application, loading multiple configuration nodes in the process configuration file, and the configuration nodes are nodes required to run the target application;
[0126] The target hardware modules corresponding to the configuration nodes are sequentially obtained from the preset application protocol, and the target hardware instances corresponding to the target hardware modules are called until all the target hardware instances corresponding to the configuration nodes are called successfully.
[0127] According to the technical solution of the embodiment of the present invention, the normal operation of the application program on the financial machine can be realized. The technical solution provided by the embodiment of the present invention realizes the operation of the application program by loading the target resources required by the target application program from the preset application protocol and loading the configuration node corresponding to the target resources, thereby realizing the decoupling of the financial machine and the application program hardware module when the application program is installed on the financial machine, and can run on any financial machine that supports the preset protocol; it solves the problem of strong coupling between the financial machine and each hardware function module in the application program in the prior art, making the application program universal, and achieving the beneficial effects of improving development efficiency and reducing maintenance costs.
[0128] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for running an application, characterized in that: The method comprises: Obtaining a process configuration file from an installation package corresponding to a target application, and loading a plurality of configuration nodes in the process configuration file, wherein the configuration nodes are nodes required to run the target application; Loading each of the configuration nodes from the preset application protocol in sequence, and obtaining the target resource corresponding to each of the configuration nodes from the preset application protocol, until all the target resources corresponding to the configuration nodes are successfully executed; The target resources include control resources, device module resources, page resources, storage resources and interface call resources; The step of loading multiple configuration nodes in the process configuration file includes: Obtaining a target format file in the process configuration file; sequentially loading a plurality of the configuration nodes in the target format file; and obtaining a configuration process of the target application when the configuration nodes are all loaded; For any configuration node i among the multiple configuration nodes, loading the configuration node i from a preset application protocol, and obtaining a target resource corresponding to the configuration node i from the preset application protocol includes: Acquire a node name of the configuration node i according to the target format file; determine a target resource of the configuration node i from the preset application protocol according to the node name of the configuration node i; The method further comprises: determining whether the target resource includes a target hardware module; If included, load the target hardware module corresponding to the configuration node i from the target resource, and call the target hardware instance corresponding to the target hardware module corresponding to the configuration node i; If not included, execute the target resource corresponding to the configuration node i; The calling of the target hardware instance corresponding to the target hardware module corresponding to the configuration node i includes: Obtain target interface information corresponding to the target hardware module corresponding to the configuration node i; and call the target hardware instance according to the target interface information.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a loading time for loading a plurality of the configuration nodes in the target format file; When the loading time exceeds a preset value, it is confirmed that the target application fails to run.
3. The method according to claim 1, characterized in that After all target resources corresponding to the configuration nodes are successfully executed, the method further includes: Obtain the node name of the last configuration node obtained according to the configuration process; When the node name is a preset name, it is confirmed that the target application has been completed.
4. The method according to claim 1, characterized in that: Before obtaining the target resource corresponding to the previous configuration node from the preset application protocol and obtaining the target resource corresponding to the next configuration node from the preset application protocol, the method further includes: Loading a configuration flow corresponding to any application to obtain a new configuration flow, wherein the new configuration flow includes a plurality of new configuration nodes; Invoke the resources corresponding to each of the new configuration nodes in sequence according to the new configuration process; When the node name of the last new configuration node in the new configuration process is a preset name, it is confirmed that the running of any one of the applications is completed.
5. An application program running device, characterized in that: include: A configuration file acquisition module, used to acquire a process configuration file from an installation package corresponding to a target application, and load a plurality of configuration nodes into the process configuration file, wherein the configuration nodes are nodes required to run the target application; A target resource execution module, used to sequentially load each of the configuration nodes from a preset application protocol, and obtain a target resource corresponding to each of the configuration nodes from the preset application protocol, until all the target resources corresponding to the configuration nodes are successfully executed; The target resources include control resources, device module resources, page resources, storage resources and interface call resources; The configuration file acquisition module includes: a target format file acquisition unit, a configuration node loading unit and a configuration process acquisition unit: A target format file acquisition unit, used to acquire the target format file in the process configuration file; A configuration node loading unit, used to sequentially load a plurality of the configuration nodes in the target format file; A configuration process obtaining unit, used to obtain the configuration process of the target application when all the configuration nodes are loaded; Wherein, the target resource execution module includes: a node name acquisition unit and a target resource acquisition unit; A node name acquisition unit, used to acquire the node name of the configuration node i according to the target format file; a target resource acquisition unit, configured to determine a target resource of the configuration node i from the preset application protocol according to the node name of the configuration node i; Wherein, the target resource execution module further includes: a judgment unit; a judging unit, configured to judge whether the target resource contains a target hardware module; if so, load the target hardware module corresponding to the configuration node i from the target resource, and call the target hardware instance corresponding to the target hardware module corresponding to the configuration node i; if not, execute the target resource corresponding to the configuration node i; The target resource execution module further includes: an interface information acquisition unit and a hardware instance calling unit: An interface information acquisition unit, used to acquire target interface information corresponding to the target hardware module corresponding to the configuration node i; The hardware instance calling unit is used to call the target hardware instance according to the target interface information.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the application running method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the application program running method as described in any one of claims 1 to 4 is implemented.
