CN114895980A - Application program running method and device, electronic equipment and storage medium - Google Patents
Application program running method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114895980A CN114895980A CN202210493151.XA CN202210493151A CN114895980A CN 114895980 A CN114895980 A CN 114895980A CN 202210493151 A CN202210493151 A CN 202210493151A CN 114895980 A CN114895980 A CN 114895980A
- Authority
- CN
- China
- Prior art keywords
- configuration
- target
- node
- application program
- nodes
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 115
- 230000008569 process Effects 0.000 claims abstract description 71
- 238000009434 installation Methods 0.000 claims abstract description 23
- 238000004590 computer program Methods 0.000 claims description 15
- 238000011161 development Methods 0.000 abstract description 13
- 238000012423 maintenance Methods 0.000 abstract description 9
- 230000009286 beneficial effect Effects 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 8
- 230000008878 coupling Effects 0.000 description 7
- 238000010168 coupling process Methods 0.000 description 7
- 238000005859 coupling reaction Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000007639 printing Methods 0.000 description 4
- 238000012790 confirmation Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000004064 recycling Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明实施例涉及计算机技术领域,尤其涉及应用程序运行方法、装置、电子设备及存储介质。The embodiments of the present invention relate to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for running an application program.
背景技术Background technique
金融机具是指银行等金融机构日常用到的硬件设备。如,自动取款机(AutomatedTeller Machine,简称ATM)、存-取款一体机(Cash Recycling System,简称CRS)、智能终端、自助查询机以及销售终端机(point of sale,简称POS)等。这些硬件设备通常由多种具备特定功能的硬件以及相关硬件模块组成,例如,CRS设备中包含读卡器、打印机、密码键盘、存款模块、取款模块、指示灯模块以及凭条打印模块等,智能终端中包含摄像头、打印机以及高拍仪等硬件。Financial equipment refers to the hardware equipment that banks and other financial institutions use on a daily basis. For example, Automated Teller Machine (ATM for short), Cash Recycling System (CRS for short), smart terminal, self-service inquiry machine, point of sale (POS), etc. These hardware devices are usually composed of a variety of hardware with specific functions and related hardware modules. For example, CRS devices include card readers, printers, password keyboards, deposit modules, cash withdrawal modules, indicator modules, and receipt printing modules. The terminal contains hardware such as cameras, printers, and high-speed cameras.
传统方案在金融机具上开发业务软件时,通常需要面向金融机具进行编程,即需针对不同金融融机具的不同特性开发对应的应用程序,在开发完成时,应用程序中的各个功能模块通常会一起打包作为整体的可执行程序与金融机具一同交付。When the traditional solution develops business software on financial instruments, it is usually necessary to program for financial instruments, that is, corresponding applications need to be developed according to the different characteristics of different financial instruments. The packaged executable program is delivered with the financial instrument as a whole.
传统的金融机具应用程序在开发过程中,金融机具与应用程序中各个硬件功能模块之间耦合性较强,导致应用程序不具备通用性,后期维护成本较高。In the development process of traditional financial equipment application programs, the coupling between financial equipment and various hardware functional modules in the application program is strong, resulting in the application program not having universality, and the later maintenance cost is high.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种应用程序运行方法、装置、电子设备及存储介质,能够降低金融机具与应用程序中各个硬件功能模块之间的耦合性,降低维护成本,提升开发效率。Embodiments of the present invention provide an application running method, apparatus, electronic device and storage medium, which can reduce the coupling between financial instruments and various hardware function modules in the application, reduce maintenance costs, and improve development efficiency.
第一方面,本发明实施例提供一种应用程序运行方法,包括:In a first aspect, an embodiment of the present invention provides a method for running an application, including:
从目标应用程序对应的安装包中获取流程配置文件,在所述流程配置文件中加载多个配置节点,所述配置节点为运行所述目标应用程序所需的节点;Obtain a process configuration file from an installation package corresponding to the target application, and load a plurality of configuration nodes in the process configuration file, where the configuration nodes are nodes required to run the target application;
依次从预设应用协议中加载各个所述配置节点,并获取各个所述配置节点对应的目标资源,直至所述配置节点对应的目标资源全部执行成功为止。Load each of the configuration nodes in sequence from the preset application protocol, and acquire target resources corresponding to each of the configuration nodes, until all the target resources corresponding to the configuration nodes are successfully executed.
第二方面,本发明实施例提供一种应用程序运行装置,所述装置包括:In a second aspect, an embodiment of the present invention provides an apparatus for running an application program, and the apparatus includes:
配置文件获取模块,用于从目标应用程序对应的安装包中获取流程配置文件,在所述流程配置文件中加载多个配置节点,所述配置节点为运行所述目标应用程序所需的节点;a configuration file obtaining module, configured to obtain a process configuration file from an installation package corresponding to a target application, and load a plurality of configuration nodes in the process configuration file, where the configuration nodes are nodes required to run the target application;
目标资源执行模块,用于依次从预设应用协议中加载各个所述配置节点,并获取各个所述配置节点对应的目标资源,直至所述配置节点对应的目标资源全部执行成功为止。The target resource execution module is configured to sequentially load each of the configuration nodes from the preset application protocol, and obtain target resources corresponding to each of the configuration nodes, until all the target resources corresponding to the configuration nodes are successfully executed.
第三方面,本发明实施例还提供了一种电子设备,所述电子设备包括:In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例所述的应用程序运行方法。The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform any of the embodiments of the present invention. Application run method.
第四方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的应用程序运行方法。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any of the embodiments of the present invention when executed. method of running the application described above.
本发明实施例提供的应用程序运行方法,首先从目标应用程序对应的安装包中获取流程配置文件,然后在流程配置文件中加载多个配置节点,其中,配置节点为运行目标应用程序所需的节点;再依次依次从预设应用协议中加载各个配置节点,并获取各个配置节点对应的目标资源,直至配置节点对应的目标资源全部执行成功时,可以实现金融机具上应用程序的正常运行。本发明实施例提供的技术方案,通过从预设应用协议中加载目标应用程序所需目标资源,通过加载配置节点对应目标资源的方式,以实现应用程序的运行,实现了在金融机具上安装应用程序时,金融机具与应用程序硬件模块的解耦,可以运行在任意支持预设协议的金融机具上;解决了现有技术中金融机具与应用程序中各个硬件功能模块之间耦合性较强问题,使得应用程序具备通用性,取到了提升开发效率,降低维护成本的有益效果。In the application running method provided by the embodiment of the present invention, a process configuration file is obtained from an installation package corresponding to a target application, and then a plurality of configuration nodes are loaded in the process configuration file, wherein the configuration nodes are required for running the target application. node; and then sequentially load each configuration node from the preset application protocol, and obtain the target resources corresponding to each configuration node, until all the target resources corresponding to the configuration nodes are successfully executed, the normal operation of the application program on the financial instrument 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 realizes the installation of the application program on the financial instrument by loading the corresponding target resources of the configuration node. During the program, the decoupling of the financial instrument and the hardware module of the application program can run on any financial instrument that supports a preset protocol; it solves the problem of strong coupling between the financial instrument and each hardware function module in the application program in the prior art , which makes the application program universal, and has the beneficial effects of improving development efficiency and reducing maintenance costs.
应当理解,本部分所描述的内容并非旨在标识本发明的实施例的关键或重要特征,也不用于限制本发明的范围。本发明实施例的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or critical features of the embodiments of the invention, nor is it intended to limit the scope of the invention. Other features of embodiments of the present invention will become readily understood from the following description.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore do not It should be regarded as a limitation of the scope, and for those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without any creative effort.
图1是本发明实施例提供的应用程序运行方法的一个流程示意图;1 is a schematic flowchart of a method for running an application program provided by an embodiment of the present invention;
图2是本发明实施例提供的应用程序运行方法的另一流程示意图;Fig. 2 is another schematic flow chart of the method for running an application program provided by an embodiment of the present invention;
图3是本发明实施例提供的应用程序运行装置的一个结构示意图;3 is a schematic structural diagram of an apparatus for running an application program provided by an embodiment of the present invention;
图4是本发明实施例提供的电子设备的一个结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only Embodiments are part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
下面结合附图和实施例对本发明作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部结构。The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all structures related to the present invention.
图1为本发明实施例提供的应用程序运行方法的一个流程示意图,本实施例可适用于在金融机具上运行应用程序的情况,该方法可以由应用程序运行装置来执行,该应用程序运行装置可以采用硬件和/或软件的形式实现,该应用程序运行装置可配置于服务器等计算机设备中。FIG. 1 is a schematic flowchart of a method for running an application program provided by an embodiment of the present invention. This embodiment is applicable to the case of running an application program on a financial instrument, and the method can be executed by an application program running device. It can be implemented in the form of hardware and/or software, and the apparatus for running the application program can be configured in a computer device such as a server.
参考图1,该方法具体可以包括如下步骤:1, the method may specifically include the following steps:
S110、从目标应用程序对应的安装包中获取流程配置文件,在流程配置文件中加载多个配置节点,配置节点为运行目标应用程序所需的节点。S110: Obtain a process configuration file from an installation package corresponding to the target application, load multiple configuration nodes in the process configuration file, and the configuration nodes are nodes required to run the target application.
应用程序表示为了完成某项或某几项特定任务而被开发运行于操作系统之上的计算机程序,以通过运行应用程序,调用应用程序中的硬件实例从而实现相应的应用功能。An application program represents a computer program developed to run on an operating system in order to complete one or several specific tasks, so as to call a hardware instance in the application program to realize the corresponding application function by running the application program.
示例性地,在金融领域,应用程序可以为金融机具(例如,存-取款一体机)的取款业务应用程序、存款业务应用程序、查询业务应用程序、转账业务应用程序或密码修改业务应用程序等;在医学领域,应用程序可以为自助挂号业务应用程序、病历查询业务应用程序、报告打印业务应用程序以及缴费业务应用程序等,具体应用程序的领域和类型在此不作限制。Exemplarily, in the financial field, the application may be a withdrawal service application, a deposit service application, an inquiry service application, a transfer service application or a password modification service application of a financial appliance (for example, a deposit-and-withdrawal machine), etc. ; In the field of medicine, the applications can be self-service registration applications, medical record query applications, report printing applications, and bill payment applications, etc. The fields and types of specific applications are not limited here.
以金融领域为例,在现有方案中,应用程序需结合当前金融机具所具备的业务功能进行针对性地开发,示例性地,自动取款机具备取款、卡卡转账、查询余额、修改密码等业务功能,存取款一体机在具备自动取款机功能的基础上还具备存款业务功能等,在具备不同业务功能的基础上,开发人员需根据当前金融机具所需的业务功能开发相对应的应用程序,绑定不同的硬件模块,从而存在开发过程较为繁琐,应用程序与硬件模块耦合性高,以及在不同类型金融机具中应用程序不具备通用性等问题。有鉴于此,本发明实施例提供的应用程序运行方法,以改善上述问题。Taking the financial field as an example, in the existing solution, the application needs to be developed in a targeted manner in combination with the business functions possessed by the current financial equipment. Exemplarily, an ATM has the functions of withdrawing money, transferring money to cards, checking balances, and changing passwords. Business functions, the deposit and withdrawal machine has the function of deposit business in addition to the function of the automatic teller machine. On the basis of different business functions, developers need to develop corresponding applications according to the business functions required by the current financial equipment. The program is bound to different hardware modules, so the development process is cumbersome, the coupling between the application and the hardware module is high, and the application is not universal in different types of financial instruments. In view of this, the application program running method provided by the embodiments of the present invention can improve the above problems.
其中,上述目标应用程序表示当前金融机具中的任一应用程序,容易理解到,本发明实施例中所指的应用程序可以为金融机具对应业务功能的程序。The above target application program represents any application program in the current financial instrument, and it is easy to understand that the application program referred to in the embodiment of the present invention may be a program corresponding to a business function of the financial instrument.
在金融机具中包含有应用程序对应的安装包,每个应用程序对应的安装包可以用jar包或zip包进行表示,可以直接使用开发工具将源码进行打包。The installation package corresponding to the application is included in the financial instrument. The installation package corresponding to each application can be represented by a jar package or a zip package, and the source code can be packaged directly by using the development tool.
在应用程序对应的安装包中一般包含有多种文件,示例性地,可以有流程配置文件、节点类型文件以及运行日志文件等。可以根据不同文件的文件标识,在目标应用程序对应的安装包查找流程配置文件,在流程配置文件中包含有运行目标应用程序所需的配置节点,以通过对每个配置节点的加载,实现目标应用程序的节点运行流程,即配置节点的执行先后顺序。The installation package corresponding to the application generally includes various files, for example, there may be a process configuration file, a node type file, and a running log file. According to the file identifiers of different files, the process configuration file can be found in the installation package corresponding to the target application. The process configuration file contains the configuration nodes required to run the target application, so as to achieve the goal by loading each configuration node The node running process of the application, that is, the execution sequence of the configuration nodes.
S120、依次从预设应用协议中加载各个配置节点,并获取各个配置节点对应的目标资源,直至配置节点对应的目标资源全部执行成功为止。S120. Load each configuration node from the preset application protocol in sequence, and acquire target resources corresponding to each configuration node, until all target resources corresponding to the configuration nodes are successfully executed.
本发明实施例提供的预设应用协议为:TpaaS应用协议。在基于TpaaS协议进行应用程序的开发时,业务应用程序需依照TPaaS协议的规范进行开发,运行平台依照协议对应用程序进行调度管理,并为应用程序的运行提供硬件、存储、网络等相关资源。The preset application protocol provided by the embodiment of the present invention is: TpaaS application protocol. When developing applications based on the TpaaS protocol, business applications need to be developed in accordance with the specifications of the TPaaS protocol. The operating platform schedules and manages the applications according to the protocol, and provides hardware, storage, network and other related resources for the operation of the applications.
一般地,预设应用协议中规定了所有金融机具所需应用程序可使用的资源,可以将资源分为控制资源、设备硬件模块资源、页面资存储资源以及接口调用资源等。以设备硬件模块资源为例,在具体实现时,首先统计所有金融机具中包含的所有应用程序对应的硬件模块,对于多种金融机具具备相同硬件模块的只需存储一个,这样做的好处在于可降低开发工作量。Generally, the preset application protocol specifies the resources available to the application programs required by all financial instruments, and the resources can be divided into control resources, device hardware module resources, page resource storage resources, and interface calling resources. Taking the device hardware module resources as an example, in the specific implementation, the hardware modules corresponding to all the applications included in all financial instruments are first counted. For multiple financial instruments with the same hardware module, only one is needed. The advantage of this is that it can Reduce development effort.
具体地,根据步骤S110,获得了目标应用程序流程配置文件中的多个配置节点后,可以获得实现目标应用程序所需的配置流程,在配置流程中,第一个节点一般为“start”节点,或者“开始”节点,然后根据配置流程中的配置节点顺序依次从TpaaS协议中获取每个配置节点对应的目标资源。针对当前配置节点,可以根据当前配置节点的节点名称,从预设应用协议中获取当前节点名称对应的目标资源,在获取到目标资源之后,应用平台可根据目标资源定义的实际内容执行当前配置节点,直至配置流程中包含的所有目标资源全部执行成功时,表明金融机具上的当前应用程序运行成功。Specifically, according to step S110, after obtaining multiple configuration nodes in the target application process configuration file, the configuration process required to realize the target application can be obtained. In the configuration process, the first node is generally the "start" node , or the "start" node, and then sequentially obtain the target resources corresponding to each configuration node from the TpaaS protocol 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 runs successfully.
具体地,在应用平台可根据目标资源定义的实际内容执行当前配置节点时,目标资源中可能只包含有界面展示资源,例如,当前节点只需在进入机具上展示对应的界面;或者当前节点需要调用对应的至少一个硬件模块,从而根据目标资源中定义的硬件模块资源实现对应硬件实例的调用。具体目标资源所包含的内容在此不做限制,以开发人员在编写应用程序时的实际需求为准。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 machine; or the current node needs The corresponding at least one hardware module is called, so that the corresponding hardware instance is called according to the hardware module resource defined in the target resource. The content contained in the specific target resources is not limited here, and is subject to the actual needs of developers when writing applications.
可选地,本发明实施例提供的应用程序运行方法,可根据在金融机具上用户的选择指令决定硬件模块的调用情况。示例性地,以“取款应用程序”为例,在取款完成后,会在进入机具上显示“是否打印凭条”,若用户选择“是”,则在应用协议中获取打印模块,启动硬件实例打印机进行打印操作,若用户选择“否”则结束当前应用程序的启动,配置文件中的配置节点转移至“end”,表示取款应用程序运行完成。Optionally, in the method for running an application program provided by the embodiment of the present invention, the calling situation of the hardware module can be determined according to the user's selection instruction on the financial instrument. Exemplarily, taking the "withdrawal application" as an example, after the withdrawal is completed, "whether to print a receipt" will be displayed on the entry machine. If the user selects "Yes", the printing module will be obtained in the application protocol and the hardware instance will be started. The printer performs the printing operation. If the user selects "No", the startup of the current application is ended, and the configuration node in the configuration file is transferred to "end", indicating that the running of the withdrawal application is completed.
本发明实施例提供的应用程序运行方法,首先从目标应用程序对应的安装包中获取流程配置文件,然后在流程配置文件中加载多个配置节点,其中,配置节点为运行目标应用程序所需的节点;再依次依次从预设应用协议中加载各个配置节点,并获取各个配置节点对应的目标资源,直至配置节点对应的目标资源全部执行成功时,可以实现金融机具上应用程序的正常运行。本发明实施例提供的技术方案,通过从预设应用协议中加载目标应用程序所需目标资源,通过加载配置节点对应目标资源的方式,以实现应用程序的运行,实现了在金融机具上安装应用程序时,金融机具与应用程序硬件模块的解耦,可以运行在任意支持预设协议的金融机具上;解决了现有技术中金融机具与应用程序中各个硬件功能模块之间耦合性较强问题,使得应用程序具备通用性,取到了提升开发效率,降低维护成本的有益效果。In the application running method provided by the embodiment of the present invention, a process configuration file is obtained from an installation package corresponding to a target application, and then a plurality of configuration nodes are loaded in the process configuration file, wherein the configuration nodes are required for running the target application. node; and then sequentially load each configuration node from the preset application protocol, and obtain the target resources corresponding to each configuration node, until all the target resources corresponding to the configuration nodes are successfully executed, the normal operation of the application program on the financial instrument 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 realizes the installation of the application program on the financial instrument by loading the corresponding target resources of the configuration node. During the program, the decoupling of the financial instrument and the hardware module of the application program can run on any financial instrument that supports a preset protocol; it solves the problem of strong coupling between the financial instrument and each hardware function module in the application program in the prior art , which makes the application program universal, and has the beneficial effects of improving development efficiency and reducing maintenance costs.
图2是本发明实施例提供的应用程序运行方法的另一流程示意图,本实施例与上述实施例之间的关系对上述实施例相应特征的进一步细化。如图2所示,该方法可以包括如下步骤:FIG. 2 is another schematic flowchart of the method for running an application program provided by an embodiment of the present invention, and the relationship between this embodiment and the above-mentioned embodiment further details the corresponding features of the above-mentioned embodiment. As shown in Figure 2, the method may include the following steps:
S210、从目标应用程序对应的安装包中获取流程配置文件。S210. Obtain a process configuration file from an installation package corresponding to the target application.
S220、获取流程配置文件中的目标格式文件。S220. Obtain the target format file in the process configuration file.
目标格式文件保存在目标应用程序安装包的流程配置(config)目录下,通过加载config可获得多种格式的文件。The target format file is saved in the process configuration (config) directory of the target application installation package, and files in various formats can be obtained by loading config.
为获得目标应用程序的配置节点,本发明实施例提供的目标格式文件为可扩展标记语言(extensible markup language,简称xml)格式文件。但本发明实施例提及的目标格式文件并不以xml格式文件为限制,可选地,还可以为docx格式文件、xlsx格式文件以及xls格式文件等。In order to obtain the configuration node of the target application, the target format file provided by the embodiment of the present invention is an extensible markup language (extensible markup language, xml for short) format file. However, the target format file mentioned in the embodiment of the present invention is not limited to the xml format file, and optionally, it may also be a docx format file, an xlsx format file, an xls format file, and the like.
通过在config目录下加载格式为xml的文件,可获得目标应用程序中的配置节点。The configuration node in the target application can be obtained by loading a file in the config directory in the format of xml.
S221、依次加载目标格式文件中的多个配置节点。S221. Load multiple configuration nodes in the target format file in sequence.
每个目标格式文件中包含有多个配置节点,配置节点为运行目标应用程序所需的节点,以通过对配置多个配置节点的加载,从而获得目标应用程序的配置流程。Each target format file contains multiple configuration nodes, and the configuration nodes are nodes required to run the target application, so as to obtain the configuration process of the target application by loading the configuration multiple configuration nodes.
S222、获取加载目标格式文件中的多个配置节点的加载时长。S222. Obtain the loading durations of the multiple configuration nodes in the loading target format file.
对于每个配置节点,有相应的配置属性,配置属性一般可以为默认属性,也可以是节点自定义的属性。在默认属性中一般可包括加载时长属性,即表示加载当前配置节点所需的时间。获取加载时长的目的是为了判断当前配置节点能否正常加载,从而决定目标应用程序能否正常运行。For each configuration node, there is a corresponding configuration attribute, which can generally be a default attribute or a node-defined attribute. The default properties generally include a loading duration property, which means the time required to load the current configuration node. The purpose of obtaining the loading time is to judge whether the current configuration node can be loaded normally, and thus determine whether the target application can run normally.
S223、判断加载时长是否超过预设数值。S223. Determine whether the loading duration exceeds a preset value.
预设数值可以为0.5秒,或者1秒,具体预设数值在此不作限制,以开发人员的实际需求为准。The preset value can be 0.5 seconds or 1 second. The specific preset value is not limited here, and the actual needs of the developer shall prevail.
若超过预设时长,执行步骤S224,若未超过预设时长,执行步骤S225。If the preset time period is exceeded, step S224 is performed, and if the preset time period is not exceeded, step S225 is performed.
S224、目标应用程序运行失败。S224, the target application fails to run.
目标应用程序运行失败,则当前运行流程结束。If the target application fails to run, the current running process ends.
可选地,在当前配置节点的加载时长超过预设数值时,可显示通过运行日志显示预警信息,以使得开发人员在维护后期能够进行针对性的优化。Optionally, when the loading time of the currently configured node exceeds a preset value, an early warning message may be displayed through the operation log, so that the developer can perform targeted optimization in the later stage of maintenance.
S225、在配置节点全部加载完成时,获得目标应用程序运行时的配置流程。S225 , when all the configuration nodes are loaded, obtain the configuration process when the target application is running.
一次对配置文件中的每一个配置节点进行加载,可获得实现目标应用程序相应功能时运行配置节点的先后顺序,即获得了目标应用程序运行时的配置流程。By loading each configuration node in the configuration file at one time, the sequence of running the configuration nodes when the corresponding function of the target application is realized can be obtained, that is, the configuration process when the target application is running can be obtained.
S230、依次从预设应用协议中加载各个配置节点,并获取各个配置节点对应的目标资源。S230. Load each configuration node from the preset application protocol in sequence, and acquire target resources corresponding to each configuration node.
根据获得的配置流程,获取第一个配置节点,依据配置流程中定义的配置节点的先后顺序,从预设应用协议中获取每个配置节点对应的目标资源。According to the obtained configuration process, the first configuration node is obtained, and the target resource corresponding to each configuration node is obtained from the preset application protocol according to the sequence of the configuration nodes defined in the configuration process.
一种可选实施例,对于多个配置节点中的任一配置节点i,从预设应用协议中加载配置节点i,并获取配置节点i对应的目标资源:An optional embodiment, for any configuration node i in the multiple configuration nodes, load the configuration node i from the preset application protocol, and obtain the target resource corresponding to the configuration node i:
A)根据目标格式文件获取配置节点i的节点名称。A) Obtain the node name of the configuration node i according to the target format file.
在目标格式文件中,配置节点的节点名称可以当前节点的表示的硬件名称进行命名,或者以身份标识属性(Identity Document,简称ID)进行命名,一般地,当前节点的节点名称与目标硬件模块中的名称保持一致,便于后续步骤对目标硬件模块的识别。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 the identity document (ID for short). Generally, the node name of the current node is the same as that in the target hardware module. The name of the target hardware module should be consistent, which is convenient for the identification of the target hardware module in the subsequent steps.
B)根据配置节点i的节点名称从预设应用协议中确定配置节点i的目标资源。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.
目标资源表示根据当前配置节点从预设应用协议中加载目标硬件模块时所需资源。目标资源可以包括控制资源、设备模块资源、页面资源、存储资源以及接口调用资源等。The target resource represents the resource required when the target hardware module is loaded from the preset application protocol according to the current configuration node. Target resources may include control resources, device module resources, page resources, storage resources, and interface calling resources.
在目标应用程序的配置节点i被调度时,根据当前配置节点的节点名称在预设应用协议中获取对应的目标资源,根据目标资源中包含的实际内容执行当前配置节点。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.
C)判断目标资源中是否包含目标硬件模块。C) Determine whether the target resource contains the target hardware module.
若包含,执行步骤D);若不包含,执行步骤E)。If it is included, go to step D); if not, go to step E).
D)从目标资源中加载配置节点i对应的目标硬件模块,并调用目标硬件模块对应的目标硬件实例。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.
在目标资源中包含有目标硬件模块时,则根据应用协议定义的方式从目标资源中加载目标硬件模块的协议接口,从而实现对目标硬件实例的调用。When the target hardware module is included in the target resource, the protocol interface of the target hardware module is loaded from the target resource according to the method defined by the application protocol, so as to realize the invocation of the target hardware instance.
一种可选实施例,在调用目标硬件模块对应的目标硬件实例时,包括:An optional embodiment, when invoking the target hardware instance corresponding to the target hardware module, includes:
获取目标硬件模块对应的目标接口信息;根据目标接口信息调用目标硬件实例。Obtain the target interface information corresponding to the target hardware module; call the target hardware instance according to the target interface information.
目标接口信息可以为接口名称或接目标接口的标识信息,或者目标接口的协议地址等,具体目标接口信息在此不作限制,只要能够通过目标接口的接口信息对目标硬件进行识别即可。The target interface information can be the interface name or the identification information of the target interface, or the 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.
在根据目标接口信息调用目标硬件实例时,目标硬件实例可以为调用“摄像头”、调用“打印机”、调用“读卡器”以及调用“密码键盘”等。When calling the target hardware instance according to the target interface information, the target hardware instance may be calling "camera", calling "printer", calling "card reader", calling "password keyboard" and so on.
在当前步骤中还可以包括,判断配置流程中包含的配置节点对应目标硬件实例是否全部调用成功,若是,则配置节点对应的目标硬件实例调用成功,若否,重新获取下一配置节点进行对应的目标硬件实例调用操作。The current step may further include: judging whether all the target hardware instances corresponding to the configuration nodes included in the configuration process are successfully invoked; if so, the target hardware instances corresponding to the configuration nodes are successfully invoked; The target hardware instance invokes the operation.
E)执行配置节点i对应的目标资源。E) Execute the target resource corresponding to the configuration node i.
S240、配置节点对应的目标资源全部执行成功。S240. All target resources corresponding to the configuration node are successfully executed.
S250、获取按照配置流程得到的最后一个配置节点的节点名称。S250. Obtain the node name of the last configuration node obtained according to the configuration process.
S260、在节点名称为预设名称时,确认目标应用程序运行完成。S260. When the node name is the preset name, confirm that the target application program is completed.
在随着配置流程对节点名称对应的硬件实例进行调用时,节点在退出时将指定状态码,使用exit可以将状态码指向下一个执行流程。如果next属性配置为END,则表示结束app调用。When the hardware instance corresponding to the node name is called with the configuration process, the node will specify a status code when it exits, and exit can be used to point the status code to the next execution process. If the next property is configured as END, it means to end the app call.
示例性地,预设名称可以为“end”或者“结束”,即在节点名称为“end”或“结束”时,确认目标应用程序运行完成。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 program is finished running.
本发明实施例还提供一种可选实施例,在从预设应用协议中获取上一个配置节点对应的目标资源,且在从预设应用协议中获取下一个配置节点对应的目标资源前,本发明实施例提供的应用程序运行方法还包括:加载任一应用程序对应的配置流程,获得新的配置流程,新的配置流程中包括多个新的配置节点;根据新的配置流程依次调用各个新的配置节点对应的资源;在新的配置流程中最后一个新的配置节点的节点名称为预设名称时,确认任一应用程序运行完成。这样做的好处在于能够实现应用程序间的互相调用,各个应用程序之间相互不产生影响。The embodiment of the present invention also provides an optional embodiment, before acquiring the target resource corresponding to the previous configuration node from the preset application protocol, and before acquiring the target resource corresponding to the next configuration node from the preset application protocol, this The application running method provided by the embodiment of the invention further includes: loading a configuration process corresponding to any application, and obtaining a new configuration process, where the new configuration process includes multiple new configuration nodes; and sequentially calling each new configuration process according to the new configuration process. When the node name of the last new configuration node in the new configuration process is the default name, confirm that any application is running. The advantage of this is that the applications can call each other without affecting each other.
在TPaaS协议中,默认采用服务器/客户机(Client/Server,简称C/S)方式进行应用程序开发。即,应用程序的逻辑都写在金融机具的节点中。平台可基于TPaaS协议的特性提供快速浏览器/服务器(Browser/Server,简称B/S)模式应用程序的开发支持。In the TPaaS protocol, a server/client (Client/Server, C/S for short) approach is adopted by default for application development. That is, the logic of the application is written in the nodes of the financial instrument. The platform can provide fast browser/server (Browser/Server, B/S for short) mode application development support based on the characteristics of the TPaaS protocol.
B/S模式实际上是单节点的C/S模式的应用程序,其只包含一个名固定名称节点节点,此节点支持访问远程定位系统(Uniform Resource Locator,简称URL),并支持界面跳转,以为B/S模式应用程序提供支持。例如,B/S模式的应用程序无需通过控制读卡器等硬件资源,实现读卡操作,而应当通过调用读卡应用程序,并获取读卡应用程序的输出,来实现读卡功能。通过此开发方式实现了应用程序间的互相调用,各个应用程序之间相互不产生影响。The B/S mode is actually a single-node C/S mode application, which only contains a node with a fixed name. This node supports accessing the remote location system (Uniform Resource Locator, URL for short), and supports interface jumping. Provide support for B/S mode applications. For example, an application in B/S mode does not need to control the card reader and other hardware resources to realize the card reading operation, but should call the card reading application and obtain the output of the card reading application to realize the card reading function. Through this development method, mutual calls between applications are realized, and each application does not affect each other.
具体地,以下以一个完整的实施例对本发明实施例所提供的应用程序运行方法进行说明:Specifically, the application running method provided by the embodiment of the present invention is described below with a complete embodiment:
对于金融机具所需的应用程序,根据不同的执行功能可分为应用1、应用2以及应用3等,在基于TPaaS协议开发的业务应用程序时,应用程序依照TPaaS协议的规范进行开发,在TPaaS协议中,规定了每个应用程序对应的资源,当前资源可以分为流程调度资源、页面显示资源、存储资源、硬件设备资源以及交易资源等。在终端金融机具上运行应用程序时,在金融机具中存储有关于当前金融机具所需的应用程序安装包,通过获取当前安装包内配置文件,获得配置流程,再根据配置流程中的配置节点在应用平台从应用协议中加载对应的资源,进一步获取当前配置节点对应的目标资源,根据当前目标资源所包含的内容执行当前配置节点,若目标资源中包含有硬件模块资源,表明需对相应硬件进行调用,则根据硬件模块的硬件接口实现对硬件实例的调用,在所有配置节点对应的目标资源全部执行完成时,当前应用程序运行完成。The applications required by financial equipment can be divided into application 1, application 2 and application 3 according to different execution functions. When developing business applications based on the TPaaS protocol, the applications are developed according to the specifications of the TPaaS protocol. The protocol specifies the resources corresponding to each application. The current resources can be divided into process scheduling resources, page display resources, storage resources, hardware device resources, and transaction resources. When the application is run on the terminal financial instrument, the application installation package required for the current financial instrument is stored in the financial instrument, and the configuration process is obtained by obtaining the configuration file in the current installation package, and then according to the configuration node in the configuration process, the The application platform loads the corresponding resources from the application protocol, further obtains the target resource corresponding to the current configuration node, and executes the current configuration node according to the content contained in the current target resource. If the target resource contains hardware module resources, it indicates that the corresponding hardware call, the call to the hardware instance is implemented according to the hardware interface of the hardware module. When all the target resources corresponding to the configuration nodes are all executed, the current application program is completed.
本发明实施例提供的应用程序运行方法,基于TPaaS协议开发的业务应用程序,可以运行在任意支持TPaaS协议的运行平台上,因此可实现对不同操作系统和硬件设备的兼容;TPaaS协议中将金融机具硬件设备抽象为了对应的资源,第三方开发人员只需要了解TPaaS协议,基于TPaaS协议即可开发金融机具应用;每个应用程序都将运行在自己独立的线程空间中,各个应用程序之间相互不产生影响;每个应用程序都将在自己独立的类空间中进行加载,不同应用程序的类空间相互隔离;应用程序之间允许相互调用。通过使用本发明实施例提供的方案,能够实现一套应用程序的通用性,以及降低维护成本。In the application running method provided by the embodiment of the present invention, the business application developed based on the TPaaS protocol can run on any running platform that supports the TPaaS protocol, so it can realize compatibility with different operating systems and hardware devices; in the TPaaS protocol, the financial Abstraction of equipment and hardware equipment For the corresponding resources, third-party developers only need to understand the TPaaS protocol, and can develop financial equipment applications based on the TPaaS protocol; each application will run in its own independent thread space, and each application will interact with each other. No impact; 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 solutions provided by the embodiments of the present invention, the versatility of a set of application programs can be realized, and the maintenance cost can be reduced.
图3是本发明实施例提供的应用程序运行装置的一个结构示意图,该装置适用于执行本发明实施例提供的应用程序运行方法。该应用程序运行装置可以采用硬件和/或软件的形式实现,该应用程序运行装置可配置于服务器等计算机设备中。如图3所示,该装置具体可以包括:配置文件获取模块310和目标资源执行模块320,其中:FIG. 3 is a schematic structural diagram of an apparatus for running an application program provided by an embodiment of the present invention, and the apparatus is suitable for executing the method for running an application program provided by the 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. As shown in FIG. 3, the apparatus may specifically include: a configuration
配置文件获取模块310,用于从目标应用程序对应的安装包中获取流程配置文件,在所述流程配置文件中加载多个配置节点,所述配置节点为运行所述目标应用程序所需的节点;A configuration
目标资源执行模块320,用于依次从预设应用协议中加载各个所述配置节点,并获取各个所述配置节点对应的目标资源,直至所述配置节点对应的目标资源全部执行成功为止。The target
本发明实施例提供的应用程序运行装置,首先从目标应用程序对应的安装包中获取流程配置文件,然后在流程配置文件中加载多个配置节点,其中,配置节点为运行目标应用程序所需的节点;再依次依次从预设应用协议中加载各个配置节点,并获取各个配置节点对应的目标资源,直至配置节点对应的目标资源全部执行成功时,可以实现金融机具上应用程序的正常运行。本发明实施例提供的技术方案,通过从预设应用协议中加载目标应用程序所需目标资源,通过加载配置节点对应目标资源的方式,以实现应用程序的运行,实现了在金融机具上安装应用程序时,金融机具与应用程序硬件模块的解耦,可以运行在任意支持预设协议的金融机具上;解决了现有技术中金融机具与应用程序中各个硬件功能模块之间耦合性较强问题,使得应用程序具备通用性,取到了提升开发效率,降低维护成本的有益效果。The application running device provided by the embodiment of the present invention first obtains a process configuration file from an installation package corresponding to the target application, and then loads a plurality of configuration nodes in the process configuration file, wherein the configuration nodes are required for running the target application. node; and then sequentially load each configuration node from the preset application protocol, and obtain the target resources corresponding to each configuration node, until all the target resources corresponding to the configuration nodes are successfully executed, the normal operation of the application program on the financial instrument 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 realizes the installation of the application program on the financial instrument by loading the corresponding target resources of the configuration node. During the program, the decoupling of the financial instrument and the hardware module of the application program can run on any financial instrument that supports a preset protocol; it solves the problem of strong coupling between the financial instrument and each hardware function module in the application program in the prior art , which makes the application program universal, and has the beneficial effects of improving development efficiency and reducing maintenance costs.
一实施例中,所述配置文件获取模块310包括:目标格式文件获取单元、配置节点加载单元和配置流程获得单元,其中:In one embodiment, the configuration
目标格式文件获取单元,用于获取所述流程配置文件中的目标格式文件;a target format file obtaining unit, used for obtaining the target format file in the process configuration file;
配置节点加载单元,用于依次加载所述目标格式文件中的多个所述配置节点;a configuration node loading unit, configured to sequentially load a plurality of the configuration nodes in the target format file;
配置流程获得单元,用于在所述配置节点全部加载完成时,获得所述目标应用程序运行时的配置流程。The configuration flow obtaining unit is configured to obtain the configuration flow when the target application is running when all the configuration nodes are loaded.
一实施例中,所述配置文件获取模块310还包括:加载时长获取单元和加载时长判断单元,其中:In one embodiment, the configuration
加载时长获取单元,用于获取加载所述目标格式文件中的多个所述配置节点的加载时长;a loading duration obtaining unit, configured to obtain loading durations for loading a plurality of the configuration nodes in the target format file;
加载时长判断单元,用于在所述加载时长超过预设数值时,确认所述目标应用程序运行失败。The loading duration judging unit is configured to confirm that the target application program fails to run when the loading duration exceeds a preset value.
一实施例中,目标资源执行模块320包括:节点名称获取单元和目标资源获取单元,其中:In one embodiment, the target
节点名称获取单元,用于根据所述目标格式文件获取配置节点i的节点名称;a node name obtaining unit, configured to obtain the node name of the configuration node i according to the target format file;
目标资源获取单元,用于根据所述配置节点i的节点名称从所述预设应用协议中确定所述配置节点i的目标资源。A target resource obtaining unit, configured 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.
一实施例中,所述目标资源执行模块320还包括:判断单元;In one embodiment, the target
判断单元,用于判断所述目标资源中是否包含目标硬件模块;若包括,从所述目标资源中加载所述配置节点i对应的目标硬件模块,并调用所述目标硬件模块对应的目标硬件实例;若不包括,则执行所述配置节点i对应的目标资源。A judging unit for judging whether the target resource includes 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 included, execute the target resource corresponding to the configuration node i.
一实施例中,目标资源执行模块320还包括:接口信息获取单元和硬件实例调用单元,其中:In one embodiment, the target
接口信息获取单元,用于获取所述目标硬件模块对应的目标接口信息;an interface information acquisition unit, configured to acquire target interface information corresponding to the target hardware module;
硬件实例调用单元,用于根据所述目标接口信息调用所述目标硬件实例。A hardware instance calling unit, configured to call the target hardware instance according to the target interface information.
一实施例中,所述装置还包括:节点名称获取模块和程序运行确认模块,其中:In one embodiment, the apparatus further includes: a node name acquisition module and a program running confirmation module, wherein:
节点名称获取模块,用于获取按照所述配置流程得到的最后一个配置节点的节点名称;a node name obtaining module, used to obtain the node name of the last configuration node obtained according to the configuration process;
程序运行确认模块,用于在所述节点名称为预设名称时,确认所述目标应用程序运行完成。The program operation confirmation module is used for confirming that the target application program is completed when the node name is a preset name.
一实施例中,所述装置还包括:配置流程加载模块,其中:In one embodiment, the apparatus further includes: a configuration process loading module, wherein:
配置流程加载模块,用于加载任一应用程序对应的配置流程,获得新的配置流程,所述新的配置流程中包括多个新的配置节点;a configuration process loading module, used to load a configuration process corresponding to any application, to obtain a new configuration process, where the new configuration process includes multiple new configuration nodes;
资源调用模块,具体用于根据所述新的配置流程依次调用各个所述新的配置节点对应的资源;A resource calling module, specifically configured to sequentially call resources corresponding to each of the new configuration nodes according to the new configuration process;
程序运行确认模块,具体用于在所述新的配置流程中最后一个新的配置节点的节点名称为预设名称时,确认所述任一应用程序运行完成。The program operation confirmation module is specifically configured to confirm that the operation of any application program is completed when the node name of the last new configuration node in the new configuration process is a preset name.
本领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述功能模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used for illustration. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above. For the specific working processes of the functional modules described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
本发明实施例还提供了一种电子设备,所述电子设备包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例所述的应用程序运行方法。An embodiment of the present invention further provides an electronic device, the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores data that can be processed by the at least one processor A computer program executed by a processor, where the computer program is executed by the at least one processor, so that the at least one processor can execute the method for running an application program according to any embodiment of the present invention.
本发明实施例还提供了一种计算机可读介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的应用程序运行方法。An embodiment of the present invention further provides a computer-readable medium, where the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the application program described in any of the embodiments of the present invention. method.
下面参考图4,其示出了适于用来实现本发明实施例的电子设备的计算机系统500的结构示意图。图4示出的电子设备仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Referring next to FIG. 4 , it shows a schematic structural diagram of a
如图4所示,计算机系统500包括中央处理单元(CPU)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储部分508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有系统500操作所需的各种程序和数据。CPU 501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。As shown in FIG. 4, a
以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入存储部分508。The following components are connected to the I/O interface 505: an
特别地,根据本发明公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。在该计算机程序被中央处理单元(CPU)501执行时,执行本发明的系统中限定的上述功能。In particular, the processes described above with reference to the flowcharts may be implemented as computer software programs in accordance with the disclosed embodiments of the present invention. For example, embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the
需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。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 can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.
描述于本发明实施例中所涉及到的模块和/或单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块和/或单元也可以设置在处理器中,例如,可以描述为:一种处理器包括配置文件获取模块和目标资源执行模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定。The modules and/or units involved in the embodiments of the present invention may be implemented in a software manner, and may also be implemented in a hardware manner. The described modules and/or units may also be provided in a processor, for example, it may be described as: a processor includes a configuration file acquisition module and a target resource execution module. Among them, the names of these modules do not constitute a limitation on the module itself under certain circumstances.
作为另一方面,本发明还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:从目标应用程序对应的安装包中获取流程配置文件,在所述流程配置文件中加载多个配置节点,所述配置节点为运行所述目标应用程序所需的节点;As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or may exist alone without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes: acquiring a process configuration file from an installation package corresponding to the target application, and in the process Loading a plurality of configuration nodes in the configuration file, the configuration nodes are nodes required to run the target application;
依次从预设应用协议中获取各个所述配置节点对应的目标硬件模块,并调用所述目标硬件模块对应的目标硬件实例,直至所述配置节点对应的目标硬件实例全部调用成功为止。The target hardware modules corresponding to each of the configuration nodes are sequentially acquired 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 successfully called.
根据本发明实施例的技术方案,可以实现金融机具上应用程序的正常运行。本发明实施例提供的技术方案,通过从预设应用协议中加载目标应用程序所需目标资源,通过加载配置节点对应目标资源的方式,以实现应用程序的运行,实现了在金融机具上安装应用程序时,金融机具与应用程序硬件模块的解耦,可以运行在任意支持预设协议的金融机具上;解决了现有技术中金融机具与应用程序中各个硬件功能模块之间耦合性较强问题,使得应用程序具备通用性,取到了提升开发效率,降低维护成本的有益效果。According to the technical solutions of the embodiments of the present invention, the normal operation of the application program on the financial instrument 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 realizes the installation of the application program on the financial instrument by loading the corresponding target resources of the configuration node. During the program, the decoupling of the financial instrument and the hardware module of the application program can run on any financial instrument that supports a preset protocol; it solves the problem of strong coupling between the financial instrument and each hardware function module in the application program in the prior art , which makes the application program universal, and has the beneficial effects of improving development efficiency and reducing maintenance costs.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above-mentioned specific embodiments 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 modifications, equivalent replacements and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210493151.XA CN114895980B (en) | 2022-05-07 | 2022-05-07 | Application program running method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210493151.XA CN114895980B (en) | 2022-05-07 | 2022-05-07 | Application program running method, device, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114895980A true CN114895980A (en) | 2022-08-12 |
CN114895980B CN114895980B (en) | 2024-12-03 |
Family
ID=82722496
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210493151.XA Active CN114895980B (en) | 2022-05-07 | 2022-05-07 | Application program running method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114895980B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103034481A (en) * | 2011-10-10 | 2013-04-10 | 深圳市证通电子股份有限公司 | Financial self-service terminal and interface realizing method thereof |
CN105354071A (en) * | 2015-12-15 | 2016-02-24 | 武汉长光科技有限公司 | Method for realizing compatibility between embedded software and hardware |
CN109830069A (en) * | 2019-01-29 | 2019-05-31 | 浪潮金融信息技术有限公司 | A kind of bank self-help wisdom teller machine (ATM) system that process is configurable |
CN110275723A (en) * | 2019-06-25 | 2019-09-24 | 北京字节跳动网络技术有限公司 | Obtain method, apparatus, electronic equipment and the readable medium of resource |
CN110968343A (en) * | 2019-11-29 | 2020-04-07 | 合肥美的电冰箱有限公司 | Resource file configuration method, configuration device, refrigerator and readable storage medium |
CN112698888A (en) * | 2020-12-28 | 2021-04-23 | 广州虎牙科技有限公司 | Application modularization, component calling and component initialization method and device |
CN113805973A (en) * | 2021-09-26 | 2021-12-17 | 工银科技有限公司 | Application program control method and device and application program development method and device |
WO2022027569A1 (en) * | 2020-08-07 | 2022-02-10 | 厦门雅基软件有限公司 | Application running method and apparatus, electronic device, and readable storage medium |
-
2022
- 2022-05-07 CN CN202210493151.XA patent/CN114895980B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103034481A (en) * | 2011-10-10 | 2013-04-10 | 深圳市证通电子股份有限公司 | Financial self-service terminal and interface realizing method thereof |
CN105354071A (en) * | 2015-12-15 | 2016-02-24 | 武汉长光科技有限公司 | Method for realizing compatibility between embedded software and hardware |
CN109830069A (en) * | 2019-01-29 | 2019-05-31 | 浪潮金融信息技术有限公司 | A kind of bank self-help wisdom teller machine (ATM) system that process is configurable |
CN110275723A (en) * | 2019-06-25 | 2019-09-24 | 北京字节跳动网络技术有限公司 | Obtain method, apparatus, electronic equipment and the readable medium of resource |
CN110968343A (en) * | 2019-11-29 | 2020-04-07 | 合肥美的电冰箱有限公司 | Resource file configuration method, configuration device, refrigerator and readable storage medium |
WO2022027569A1 (en) * | 2020-08-07 | 2022-02-10 | 厦门雅基软件有限公司 | Application running method and apparatus, electronic device, and readable storage medium |
CN112698888A (en) * | 2020-12-28 | 2021-04-23 | 广州虎牙科技有限公司 | Application modularization, component calling and component initialization method and device |
CN113805973A (en) * | 2021-09-26 | 2021-12-17 | 工银科技有限公司 | Application program control method and device and application program development method and device |
Non-Patent Citations (1)
Title |
---|
南淮北安: "一篇文章带你搞定程序的耦合和解耦", pages 1 - 6, Retrieved from the Internet <URL:https://blog.csdn.net/nanhuaibeian/article/details/106059409> * |
Also Published As
Publication number | Publication date |
---|---|
CN114895980B (en) | 2024-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021027592A1 (en) | File processing method, apparatus, device and computer readable storage medium | |
CN112288577B (en) | Transaction processing method, device, electronic equipment and medium for distributed service | |
CN110858172A (en) | A kind of automatic test code generation method and device | |
CN110727580A (en) | Response data generation method, full-flow interface data processing method and related equipment | |
US8984124B2 (en) | System and method for adaptive data monitoring | |
CN113111077A (en) | Consistency control method, consistency control device, electronic equipment, consistency control medium and program product | |
US20110010348A1 (en) | Rule-based record profiles to automate record declaration of electronic documents | |
CN112395194B (en) | Method and device for accessing test platform | |
CN114895980B (en) | Application program running method, device, electronic device and storage medium | |
CN112732547A (en) | Service testing method and device, storage medium and electronic equipment | |
US20020073003A1 (en) | Disbursement tracking system | |
CN107632893B (en) | Message queue processing method and device | |
CN116561013A (en) | Test method, device, electronic equipment and medium based on target service framework | |
CN113763094B (en) | A business information processing method, device, server, medium and system | |
CN115934537A (en) | Interface test tool generation method, device, equipment, medium and product | |
CN112231118B (en) | Aggregate payment platform, system and method | |
CN114707961A (en) | Method, apparatus, device, medium and program product for executing tasks to be approved based on approval flow configuration | |
CN110971664B (en) | Interface service management system | |
US20220129332A1 (en) | Handling of Metadata for Microservices Processing | |
CN112181650A (en) | Cloud computing resource metering method, device, system, equipment and medium | |
CN114117449B (en) | Testing method, device, electronic device and medium based on hidden parameter mining | |
CN114125062B (en) | Task information display method and device | |
CN109376023B (en) | Method and equipment for generating calling information and issuing return code group | |
CN102096720B (en) | Document library system | |
CN117609352A (en) | Data processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |