Payment program loading method and apparatus for distributed device, and electronic device
Through the payment program loading method of distributed devices, the current payment ability of the electronic device is identified and the matching alternative payment program is loaded, which solves the problems of high memory footprint, poor flexibility and low collection efficiency in the prior art, and achieves more efficient and flexible payment program loading.
Patent Information
- Application Number
- CN202411429801.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-03-07
AI Technical Summary
The collection application for existing electronic devices requires pre-installation of multiple collection methods, resulting in high memory footprint, poor flexibility and low collection efficiency.
Through the payment program loading method of the distributed device, the basic installation package is obtained, the current payment capability of the electronic device is identified, and an alternative payment program matching the current payment capability is obtained from the payment device distributedly connected to the electronic device for loading.
It reduces the memory usage of the program, improves applicability, flexibility and collection efficiency, avoids program rework caused by unprepared collection methods, and realizes adaptive payment program loading.
Smart Images

Figure CN119576487A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of payment, and in particular to a payment program loading method and device for distributed devices and electronic equipment. Background Art
[0002] There are many payment methods at present, such as bank cards, Cloud QuickPass, WeChat, Alipay, digital currency, etc. In the related technologies, the payment application programs of electronic devices all preset the payment methods in the program, which requires more memory. In addition, when using the preset method, when there is no preset payment method, the payment method will not be supported, resulting in program rework, low payment efficiency and poor flexibility. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a payment program loading method, device and electronic device for distributed devices, so as to reduce the memory usage of the program and improve the applicability, flexibility and collection efficiency.
[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is:
[0005] A payment program loading method for a distributed device is applied to an electronic device, wherein the electronic device is connected to a payment device in a distributed manner, and the payment device includes a payment component related to payment collection. The method includes:
[0006] Obtain a basic installation package, wherein the basic installation package includes basic information related to payment collection;
[0007] Load the basic installation package, and after loading is completed, trigger a payment capability identification instruction, wherein the payment capability identification instruction is used to identify the current payment capability currently possessed by the electronic device related to payment collection;
[0008] Acquiring the current payment capability of the electronic device based on the payment capability identification instruction;
[0009] An alternative payment program matching the current payment capability is obtained from the payment device, and the alternative payment program is loaded.
[0010] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0011] A payment program loading device for a distributed device includes an installation package acquisition module, an instruction triggering module, an information acquisition module, and a loading module:
[0012] The installation package acquisition module is used to acquire a basic installation package, wherein the basic installation package includes basic information related to payment collection;
[0013] The instruction triggering module is used to load the basic installation package, and after loading, trigger the payment capability identification instruction, wherein the payment capability identification instruction is used to identify the current payment capability currently possessed by the electronic device related to payment collection;
[0014] The information acquisition module is used to acquire the current payment capability of the electronic device based on the payment capability identification instruction;
[0015] The loading module is used to obtain an alternative payment program that matches the current payment capability from the payment device and load the alternative payment program.
[0016] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0017] An electronic device comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements each step of the above-mentioned payment program loading method for a distributed device when executing the computer program.
[0018] The beneficial effects of the present invention are as follows: the present application obtains a basic installation package, the basic installation package includes basic information related to the payment collection, loads the basic installation package, triggers a payment capability identification instruction after the loading is completed, obtains the current payment capability of the electronic device based on the payment capability identification instruction, obtains an alternative payment program matching the current payment capability from the payment device, and loads the alternative payment program. Through the method of the present application, since only the alternative payment program matching the current payment capability is loaded, it is not necessary to pre-set all the payment methods in advance, and the memory occupancy rate is low; and the alternative payment program is matched with the current payment capability and is actually needed to be used, therefore, it is avoided that a certain payment method cannot be supported and needs to be reworked, thereby reducing the memory occupancy of the program; at the same time, the alternative payment program of the present application is obtained from the payment device that is distributedly connected to the electronic device, therefore, it avoids the problem of acquisition failure due to server abnormality, can improve the efficiency of acquisition, and at the same time improve the applicability, flexibility and collection efficiency, and the entire loading process of the present application does not involve the user, and truly realizes self-adaptation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flowchart of a payment program loading method for a distributed device provided by an embodiment of the present invention;
[0020] Figure 2 A distributed connection diagram of a payment program loading method for a distributed device provided by an embodiment of the present invention;
[0021] Figure 3A loading flow chart of a payment program loading method for a distributed device provided by an embodiment of the present invention;
[0022] Figure 4 A schematic diagram of the final payment program composition of a payment program loading method for a distributed device provided by an embodiment of the present invention;
[0023] Figure 5 A structural diagram of a payment program loading device for a distributed device provided by an embodiment of the present invention;
[0024] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is 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 application and are not used to limit the present application.
[0026] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0027] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0028] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0029] In the related art, payment applications of electronic devices all pre-set payment methods in the program, which requires a lot of memory. In addition, the pre-set method is used. For example, regardless of whether the electronic device supports it, payment programs for WeChat, Alipay, digital currency, etc. are pre-installed, which will cause memory usage. When there is no pre-set payment method, the payment method will not be supported, resulting in program rework. The payment process is limited by the preset payment method, resulting in low payment efficiency. Since the payment method needs to be preset, it is inconvenient to add or delete the payment method during the payment process, which is inflexible and cannot reduce the memory usage as much as possible.
[0030] In order to solve the above problems, the present application provides a payment program loading method, device and electronic device for a distributed device. The following specifically introduces a payment program loading method for a distributed device of the present application.
[0031] Please refer to Figure 2 The payment program loading method of the distributed device in the present application can be used for electronic devices, and the electronic devices are connected to the payment devices in a distributed manner, such as Figure 2 As shown, the electronic device can be connected to multiple payment devices in a distributed manner. Distributed connection means that it can be connected in a distributed soft bus manner. The distributed soft bus is a physical bus similar to hardware software. All devices connected to it are in the form of software. It can be understood that the software is a device, and the software can achieve decentralized and distributed layout. Moreover, the most important feature is that the devices in the distributed soft bus can call the capabilities of other devices to process requests. For example, when a POS machine and a barcode scanner are in a distributed connection, the POS machine can use the payment capability of the barcode scanner to complete the payment, so that the POS machine can support barcode scanning payment. The payment device includes a payment component related to the payment. This application can configure the component name and function of each payment component of the payment device in advance, and the payment device itself can also be configured with the corresponding payment component. Electronic devices include POS machines, cash registers, card swiping machines and other devices that can collect money. Electronic devices need to load the payment program in advance in the electronic device before leaving the factory, so that when they need to be applied to the payment scene later, the payment program can be called to complete the payment process. Among them, the payment device includes a barcode scanner, a digital name currency acceptor, a fingerprint payment device, a face payment device and other devices with payment capabilities.
[0032] The following is a detailed description of the payment program loading method of the distributed device in the present invention. Figure 1 and Figure 2 , including the steps:
[0033] S101. Obtain a basic installation package, which includes basic information related to payment collection.
[0034] The basic installation package of the present application includes basic information related to payment, for example, only includes the information necessary for payment. For example, the basic installation package of the present application can be in HAP (HarmonyOS Ability Package) format.
[0035] S102, loading the basic installation package, after loading is complete, triggering a payment capability identification instruction, the payment capability identification instruction is used to identify the current payment capability of the electronic device related to payment collection.
[0036] S103: Acquire the current payment capability of the electronic device based on the payment capability identification instruction.
[0037] The current payment capability of this application is equivalent to the payment method of payment, which may include hardware payment capability and software payment capability. For example, the hardware payment capability may be a camera that supports face recognition payment, a PINPAD that supports keyboard payment, etc. The software payment capability may allow WeChat payment, digital currency payment, etc. at the software level.
[0038] S104: Obtain an alternative payment program that matches the current payment capability from the payment device, and load the alternative payment program.
[0039] Alternative payment procedures may include bank card payment procedures, digital currency payment procedures, WeChat payment procedures, and Alipay payment procedures, etc.
[0040] In this way, since only the alternative payment program that matches the current payment capability is loaded, there is no need to pre-set all the payment methods, and the memory occupancy rate is low; and the alternative payment program matches the current payment capability and is actually needed, therefore, the situation that a certain payment method cannot be supported and needs to be reworked is avoided, thereby reducing the memory occupancy rate of the program; at the same time, the alternative payment program of the present application is obtained from a payment device that is distributedly connected to the electronic device, therefore, the problem of acquisition failure due to server abnormalities is avoided, the efficiency of acquisition can be improved, and at the same time, the applicability, flexibility and collection efficiency are improved, and the entire loading process of the present application does not involve the participation of the user, thus truly achieving adaptability.
[0041] In one embodiment of the present application, in step S104, obtaining an alternative payment program that matches the current payment capability from the payment device includes: performing signature verification on the payment device, if the verification passes, obtaining an alternative payment program that matches the current payment capability from the payment device, if the verification fails, excluding the payment device and reselecting a payment device. The payment device includes signature information, and the signature verification of the payment device is performed based on the signature information. In this way, before obtaining the alternative payment program, the signature verification of the payment device is performed first, and pre-confirmation is achieved to ensure that the alternative payment program is suitable for use with the electronic device, avoiding wasting time and traffic downloading components that are not suitable for use with the terminal.
[0042] In one embodiment of the present application, in step S104, obtaining an alternative payment program that matches the current payment capability from the payment device includes: obtaining an alternative payment program that matches the current payment capability from the payment device through a distributed soft bus. In this way, the alternative payment program is directly obtained from the payment device through the distributed soft bus without having to be loaded from the server, thereby avoiding the situation where the server is unstable and cannot be loaded, and improving the success rate of loading.
[0043] In one embodiment of the present application, in step S104, obtaining an alternative payment program that matches the current payment capability from a payment device includes: if there are multiple payment devices, obtaining the priorities of the multiple payment devices, and obtaining an alternative payment program that matches the current payment capability from the multiple payment devices according to the priorities. The priorities of the multiple payment devices can be set according to the usage frequency of the payment devices, for example, the more frequently used the payment device is, the higher the priority is, and the alternative payment program is obtained from it first, such as Figure 2 As shown, assuming that payment device 1 has the highest priority, when WeChat payment is needed, the WeChat payment program is obtained from payment device 1. If the WeChat payment program does not exist in payment device 1, it is obtained from the payment device with the next highest priority, such as payment device 2, and so on. In this way, alternative payment programs are obtained from multiple payment devices according to the order of priority, which improves flexibility and applicability.
[0044] In one embodiment of the present application, after step S104, the process further includes: receiving a payment request from a user; and executing a corresponding alternative payment procedure according to the payment request. For example, if a user needs to pay using Alipay, the Alipay payment procedure is executed to complete the payment. In this way, the user can freely choose a payment method according to his or her needs to complete the payment.
[0045] In one embodiment of the present application, after step S104, it also includes: obtaining the number of executions of the alternative payment program within the historical preset time; if the number of executions is less than the preset number, deleting the alternative payment program with the execution number less than the preset number. The historical preset time includes the previous week, the previous month, or the previous three months. In this way, after loading the alternative payment program, if the number of executions of the alternative payment program within the historical preset time is less than the preset number, it means that the user has a low frequency of use of the payment method, and such alternative payment program can be deleted to avoid memory occupation.
[0046] In one embodiment of the present application, after step S104, it further includes: receiving access success information of the external device; loading an alternative payment program that matches the current payment capability from the external device according to the access success information, wherein the external device may be an external device based on OpenHarmony. In this way, as soon as the external device is connected, the required payment program can be directly loaded from the external device, for example, if the external device is a POS machine, the payment program is loaded from the POS machine, and the payment program may be a specific alternative payment program, such as a palmprint recognition payment program, which improves the flexibility of collecting payments.
[0047] In one embodiment of the present application, after step S104, it also includes: obtaining the distributed connection success information of the new payment device; obtaining a new alternative payment program that matches the current payment capability from the new payment device according to the distributed connection success information, and loading the new alternative payment program. For example, if the new palmprint payment device completes the distributed connection with the electronic device, the palmprint payment program is obtained and loaded from the palmprint payment device. In this way, when a new payment device is successfully connected, a new alternative payment program can be obtained and loaded from the new payment device, thereby improving the flexibility of collecting payments.
[0048] In one embodiment of the present application, it also includes: if there is no alternative payment program matching the current payment capability in the payment device, then obtaining the alternative payment program matching the current payment capability from the server and loading the alternative payment program. In one embodiment of the present application, the server pre-sets multiple payment components; obtaining the alternative payment program matching the current payment capability from the server, and loading the alternative payment program includes: performing signature verification on the payment component corresponding to the alternative payment program matching the current payment capability in the server, and if the verification passes, loading the alternative payment program. In this way, when there is no alternative payment program matching the current payment capability in the payment device, it is loaded from the server, which improves the flexibility of loading the payment program.
[0049] The following is a detailed introduction to the application examples of this application. This application can apply the above solution to the payment program loading scenario. Please refer to Figure 3 and Figure 4, including the following steps:
[0050] 1. Obtain the basic installation package, which includes basic information related to payment collection.
[0051] 2. Load the basic installation package. After loading, trigger the payment capability identification instruction. The payment capability identification instruction is used to identify the current payment capability of the electronic device related to payment collection.
[0052] 3. Obtain the current payment capability of the electronic device based on the payment capability identification instruction.
[0053] 4. Perform signature verification on the payment device. If the verification fails, obtain an alternative payment program that matches the current payment capability from the server and load the alternative payment program. If the verification passes, obtain an alternative payment program that matches the current payment capability from the payment device through the distributed soft bus and load the alternative payment program.
[0054] Specifically, if there are multiple payment devices, the priorities of the multiple payment devices are obtained, and the alternative payment procedures matching the current payment capability are obtained from the multiple payment devices according to the priorities.
[0055] 5. If there is no alternative payment program matching the current payment capability in the payment device, obtain an alternative payment program matching the current payment capability from the server and load the alternative payment program.
[0056] 6. The alternative payment program and the basic installation package constitute the final payment program.
[0057] like Figure 4 As shown, the alternative payment procedures include various payment procedures such as bank card payment procedure, digital RMB payment procedure, WeChat payment procedure and Alipay payment procedure.
[0058] In an optional implementation, the number of executions of the alternative payment program within a preset historical time period is obtained, and if the number of executions is less than the preset number, the alternative payment program with the number of executions less than the preset number is deleted.
[0059] In an optional implementation, distributed connection success information of a new payment device is obtained, a new alternative payment program matching the current payment capability is obtained from the new payment device according to the distributed connection success information, and the new alternative payment program is loaded.
[0060] In an optional implementation, access success information of an external device is received; and an alternative payment program matching the current payment capability is loaded from the external device according to the access success information.
[0061] The present invention also provides a payment program loading device for a distributed device. Figure 5, including installation package acquisition module, instruction trigger module, information acquisition module and loading module:
[0062] An installation package acquisition module is used to acquire a basic installation package, which includes basic information related to payment collection;
[0063] The instruction trigger module is used to load the basic installation package. After the loading is completed, the payment capability identification instruction is triggered. The payment capability identification instruction is used to identify the current payment capability of the electronic device related to the payment collection;
[0064] An information acquisition module, used to acquire the current payment capability of the electronic device based on the payment capability identification instruction;
[0065] The loading module is used to obtain an alternative payment program that matches the current payment capability from the payment device and load the alternative payment program.
[0066] Please refer to Figure 6 The present invention also provides an electronic device 300, including a memory 301 and a processor 302, and a computer program stored in the memory 301 and running on the processor 302. When the processor 302 executes the computer program, it implements the various steps in the payment program loading method of a distributed device as described above.
[0067] The beneficial effects of the electronic device of the present invention are the same as those of the above method and will not be described in detail here.
[0068] In summary, the present invention provides a payment program loading method, device and electronic device for a distributed device, obtains a basic installation package, the basic installation package includes basic information related to payment, loads the basic installation package, and after loading, triggers a payment capability identification instruction, obtains the current payment capability of the electronic device based on the payment capability identification instruction, obtains an alternative payment program matching the current payment capability from the payment device, and loads the alternative payment program. Through the method of the present invention, since only the alternative payment program matching the current payment capability is loaded, it is not necessary to pre-set all payment methods in advance, and the memory occupancy rate is low; and the alternative payment program matches the current payment capability and is actually needed to be used, therefore, it avoids the situation where a certain payment method cannot be supported and needs to be reworked, thereby reducing the memory occupancy of the program; at the same time, the alternative payment program is obtained from the payment device that is distributedly connected to the electronic device, therefore, it avoids the problem of acquisition failure due to server abnormality, can improve the efficiency of acquisition, and at the same time improve the applicability, flexibility and collection efficiency, and the entire loading process of the present invention, without the participation of the user, truly realizes self-adaptation. In addition, after loading the alternative payment program, if the execution times of the alternative payment program within the historical preset time are less than the preset times, it means that the user uses the payment method less frequently, and such alternative payment program can be deleted to avoid memory occupation. Moreover, as long as the external device is connected, the required payment program can be directly loaded from the external device, which improves the flexibility of collecting payments.
[0069] The above are only embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the specification and drawings of the present invention, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A payment program loading method for a distributed device, characterized in that: Applied to an electronic device, the electronic device is connected to a payment device in a distributed manner, the payment device includes a payment component related to payment collection, and the method includes: Obtain a basic installation package, wherein the basic installation package includes basic information related to payment collection; Load the basic installation package, and after loading is completed, trigger a payment capability identification instruction, wherein the payment capability identification instruction is used to identify the current payment capability currently possessed by the electronic device related to payment collection; Acquiring the current payment capability of the electronic device based on the payment capability identification instruction; An alternative payment program matching the current payment capability is obtained from the payment device, and the alternative payment program is loaded.
2. The payment program loading method of a distributed device according to claim 1, characterized in that: After acquiring the alternative payment program matching the current payment capability from the payment device and loading the alternative payment program, the method further includes: Obtaining the number of executions of the alternative payment program within a historical preset time period; If the execution times are less than the preset times, the alternative payment program whose execution times are less than the preset times is deleted.
3. The payment program loading method of a distributed device according to claim 1, characterized in that: After acquiring the alternative payment program matching the current payment capability from the payment device and loading the alternative payment program, the method further includes: Receive access success information from external devices; An alternative payment program matching the current payment capability is loaded from the external device according to the access success information.
4. The payment program loading method of a distributed device according to claim 1, characterized in that: After acquiring the alternative payment program matching the current payment capability from the payment device and loading the alternative payment program, the method further includes: Obtain the distributed connection success information of the new payment device; A new alternative payment program matching the current payment capability is obtained from the new payment device according to the distributed connection success information, and the new alternative payment program is loaded.
5. The payment program loading method of a distributed device according to claim 1, characterized in that: The acquiring, from the payment device, an alternative payment procedure matching the current payment capability comprises: The signature of the payment device is verified, and if the verification is successful, an alternative payment program matching the current payment capability is obtained from the payment device.
6. The payment program loading method of a distributed device according to claim 5, characterized in that: The acquiring, from the payment device, an alternative payment procedure matching the current payment capability comprises: An alternative payment program matching the current payment capability is obtained from the payment device via a distributed soft bus.
7. The payment program loading method of a distributed device according to claim 1, characterized in that: Also includes: If the payment device does not have an alternative payment program that matches the current payment capability, an alternative payment program that matches the current payment capability is obtained from a server and loaded.
8. The payment program loading method of a distributed device according to claim 1, characterized in that: The acquiring, from the payment device, an alternative payment procedure matching the current payment capability comprises: If there are multiple payment devices, the priorities of the multiple payment devices are obtained, and the alternative payment procedures matching the current payment capability are obtained from the multiple payment devices according to the priorities.
9. A payment program loading device for a distributed device, characterized in that: Including installation package acquisition module, instruction trigger module, information acquisition module and loading module: The installation package acquisition module is used to acquire a basic installation package, wherein the basic installation package includes basic information related to payment collection; The instruction triggering module is used to load the basic installation package, and after loading, trigger the payment capability identification instruction, wherein the payment capability identification instruction is used to identify the current payment capability currently possessed by the electronic device related to payment collection; The information acquisition module is used to acquire the current payment capability of the electronic device based on the payment capability identification instruction; The loading module is used to obtain an alternative payment program that matches the current payment capability from the payment device and load the alternative payment program.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, each step in a payment program loading method for a distributed device as described in any one of claims 1 to 8 is implemented.