Program process keep-alive method and device, storage medium and program product
By creating and maintaining service processes on merchant devices, listening and responding to process recycling events, the problems of high cost and complex installation of IoT tag hardware equipment are solved, and the promotion of electronic payment and user payment experience are improved.
Patent Information
- Application Number
- CN202411148716.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-03-11
AI Technical Summary
In the prior art, merchants rely on hardware devices with IoT tags to detect the legitimacy of user mobile devices, resulting in high procurement costs and complex installation, affecting the promotion of electronic payments, and inconsistent equipment quality affects user experience.
By creating and maintaining the first and second service processes on the merchant device, the listening process recycles broadcast events and performs process keeping operations when a resource recovery event is detected, ensuring that the service process continues to run, thereby replacing the IoT tag hardware device for user equipment legality verification.
It realizes the legality verification of user equipment on the merchant device by replacing IoT tag hardware devices, reducing costs, simplifying the installation process, and improving user payment experience.
Smart Images

Figure CN119598437A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and more particularly to a method for keeping a program process alive, an apparatus for keeping a program process alive, a non-transitory computer-readable storage medium, and a computer program product. Background Art
[0002] With the continuous development of the Internet and information technology, more and more users choose to use mobile devices to complete transactions with merchants. For example, more and more customers use mobile devices such as mobile phones to pay through electronic payment channels such as online banking and payment platforms, and there are more and more payment methods, such as face recognition payment, fingerprint payment, code scanning payment, etc. Generally, before payment, the merchant needs to perform a legitimacy check on the user's mobile device to verify, for example, whether the user is in the store, the authenticity of the user's payment code, etc.
[0003] At present, merchants mainly rely on hardware devices of IoT tags to complete the legitimacy detection of users' mobile devices. However, the procurement cost and complicated installation process of hardware devices of IoT tags will affect the promotion of electronic payment on the merchant side. In addition, the uneven quality of hardware devices of IoT tags purchased by merchants will also affect the payment experience of users. Summary of the invention
[0004] In order to solve or at least alleviate one or more of the above problems, the following technical solutions are provided.
[0005] According to a first aspect of the present application, a method for keeping a program process alive is provided, the method being applied to a merchant-end device to verify the legitimacy of a user-end device, the method comprising the following steps: creating a first service process and a second service process corresponding to a service start request in response to a service start request from an application program of the merchant-end device; monitoring a process recovery broadcast event, the process recovery broadcast event being generated in response to resource recovery of the first service process or the second service process by an operating system; and performing a process keep-alive operation on the first service process and the second service process in response to monitoring the process recovery broadcast event, so that the first service process and the second service process continue to run in the operating system.
[0006] According to the method for keeping a program process alive described in one embodiment of the present application, monitoring the process recovery broadcast event includes: using a service registration listener to subscribe to the notification of the process recovery broadcast event; receiving the notification of the process recovery broadcast event via the first service process and the second service process; and monitoring the process recovery broadcast event based on the notification of the process recovery broadcast event.
[0007] According to the method for keeping a program process alive in one embodiment or any of the above embodiments of the present application, the first service process or the second service process is subjected to resource recovery by the operating system in response to one or more of the following events: insufficient memory of the operating system, restrictions on resources used by the operating system on the first service process or the second service process, an exception in the first service process or the second service process, a user operation for terminating the first service process or the second service process, or cessation of services or components associated with the first service process or the second service process.
[0008] According to the method for keeping a program process alive according to one embodiment of the present application or any of the above embodiments, performing a process keep-alive operation on the first service process and the second service process in response to monitoring the process recycling broadcast event includes: starting the first service process by using the second service process in response to monitoring the process recycling broadcast event generated when the first service process is recycled by the operating system; and starting the second service process by using the first service process in response to monitoring the process recycling broadcast event generated when the second service process is recycled by the operating system.
[0009] According to the method for keeping a program process alive in one embodiment of the present application or any of the above embodiments, a service startup request from an application of a merchant-end device is generated in response to the merchant-end device enabling one or more applets of the application.
[0010] According to the method for keeping a program process alive according to one embodiment of the present application or any of the above embodiments, one or more applets of the application are encapsulated in a universal language container.
[0011] According to the method for keeping a program process alive according to one embodiment of the present application or any of the above embodiments, the method further includes: setting an application programming interface for keeping a process alive in the application; calling the application programming interface for keeping a process alive in response to enabling each of one or more applets of the application; and listening to the process recycling broadcast event via the application programming interface for keeping a process alive and performing a process keeping alive operation on the first service process and the second service process in response to listening to the process recycling broadcast event.
[0012] According to the method for keeping a program process alive according to one embodiment of the present application or any of the above embodiments, the method further includes: setting an application programming interface for near field communication in the application; calling the application programming interface for near field communication in response to enabling each of one or more applets of the application; and establishing a near field communication connection between the merchant-end device and the user-end device via the application programming interface for near field communication.
[0013] According to the method for keeping a program process alive in one embodiment or any of the above embodiments of the present application, the merchant-end device verifies the legitimacy of the user-end device in the following manner: displays payment collection identification information and broadcasts the tag identification information and service identification information of the merchant-end device via a near-field communication connection; receives the tag identification information and service identification information from the user-end device via the near-field communication connection, wherein the tag identification information and service identification information of the user-end device are obtained by the user-end device based on at least the payment collection identification information; and verifies the legitimacy of the user-end device based on at least a comparison of the tag identification information and service identification information of the merchant-end device with the tag identification information and service identification information of the user-end device.
[0014] According to the method for keeping a program process alive described in one embodiment of the present application or any of the above embodiments, verifying the legitimacy of the user-end device at least based on a comparison between the tag identification information and service identification information of the merchant-end device and the tag identification information and service identification information of the user-end device includes: determining that the legitimacy of the user-end device has been verified at least in response to the tag identification information and service identification information of the merchant-end device matching the tag identification information and service identification information of the user-end device respectively; and determining that the legitimacy of the user-end device has not been verified at least in response to the tag identification information of the merchant-end device not matching the tag identification information of the user-end device and / or the service identification information of the merchant-end device not matching the service identification information of the user-end device.
[0015] According to the method for keeping a program process alive in one embodiment of the present application or any of the above embodiments, the legitimacy of the user-end device is used to indicate whether the user-end device is located at a transaction site corresponding to the merchant-end device.
[0016] According to the second aspect of the present application, a device for keeping a program process alive is provided, the device comprising: a memory; a processor coupled to the memory; and a computer program stored on the memory, wherein when the computer program runs on the processor, it causes the steps of the method for keeping a program process alive described in the first aspect of the present application to be executed.
[0017] According to a third aspect of the present application, a non-transitory computer-readable storage medium is provided, characterized in that the non-transitory computer-readable storage medium includes instructions, and the instructions, when running, execute the steps of the method for keeping a program process alive according to the first aspect of the present application.
[0018] According to a fourth aspect of the present application, a computer program product is provided, the computer program product comprising instructions, which, when executed by a processor, implement the steps of the method for keeping a program process alive according to the first aspect of the present application.
[0019] According to one or more embodiments of the present application, the program process keeping scheme can ensure that the first service process and the second service process created in response to the service startup request from the application of the merchant-side device continue to run in the operating system, thereby utilizing the application of the merchant-side device to replace the hardware device of the Internet of Things tag, thereby saving costs for merchants, realizing the promotion of electronic payment on the merchant side, and also improving the user's payment experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and / or other aspects and advantages of the present application will become clearer and easier to understand through the following description of various aspects in conjunction with the accompanying drawings, in which the same or similar units are represented by the same reference numerals. In the accompanying drawings:
[0021] Figure 1 A flowchart of a method for keeping a program process alive according to one or more embodiments of the present application is shown.
[0022] Figure 2 A schematic diagram of a process for keeping a program process alive according to one or more embodiments of the present application is shown.
[0023] Figure 3 A schematic diagram of the software architecture of a typical application program with a program process keep-alive function is shown.
[0024] Figure 4 A flowchart of a typical method for verifying the legitimacy of a user-end device is shown.
[0025] Figure 5 A schematic block diagram of a device for keeping a program process alive according to one or more embodiments of the present application is shown. DETAILED DESCRIPTION
[0026] The following describes in detail example embodiments of the present application, and examples of these embodiments are illustrated in the accompanying drawings. It should be noted that the following description is for explanation and illustration and is therefore not to be construed as limiting the present application. Without departing from the principles of the present application, those skilled in the art may make electrical, mechanical, logical and structural changes to these embodiments as needed without departing from the scope of the present application. In addition, those skilled in the art may appreciate that, for any specific application scenario or actual need, one or more features of the different embodiments described below may be combined.
[0027] Terms such as "comprising" and "including" indicate that in addition to the units and steps directly and clearly stated in the specification, the technical solution of the present application does not exclude the situation of having other units and steps that are not directly or clearly stated. Terms such as "first" and "second" do not indicate the order of units in terms of time, space, size, etc., but are only used to distinguish between units.
[0028] In the context of this application, the term "process" refers to an independent unit for resource allocation and scheduling by the operating system, which can be considered as an instance of a running program. In the context of this application, the term "application" refers to a computer program that runs on the operating system of a terminal and can perform one or more specific functions. In the context of this application, the term "service" refers to a software component that runs in the background and provides specific functions or data. Services can be called by applications to provide consistent functional implementations, such as database services, network services, authentication services, clock services, cloud storage services, message queue services, log and monitoring services, security services, etc.
[0029] Hereinafter, various exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings.
[0030] Figure 1 A flowchart of a method for keeping a program process alive according to one or more embodiments of the present application is shown, wherein the method is applied to a merchant terminal device to verify the legitimacy of a user terminal device. Optionally, the legitimacy of the user terminal device can be used to indicate whether the user terminal device is located at a transaction site corresponding to the merchant terminal device.
[0031] like Figure 1 As shown in FIG. 1 , in step S101 , in response to a service start request from an application program of a merchant terminal device, a first service process and a second service process corresponding to the service start request are created.
[0032] Optionally, a service startup request from an application of a merchant-side device may be generated in response to the merchant-side device enabling one or more applets of the application. In one embodiment, one or more applets of the application may be enabled by clicking on the applet icon in the application or scanning a QR code. In one embodiment, when each applet of the application is enabled by the merchant-side device, a corresponding service startup request may be generated and a first service process and a second service process corresponding to the service startup request may be created. Exemplarily, the application may include Cloud QuickPass, WeChat, Alipay, Baidu, Douyin, Google Pay, etc., and the applets may be understood as lightweight applications running on the platform of the application, such as financial services, life payment, commercial services, and other payment-related services (such as providing payment services, discount cards, etc.), social games, content creation, and entertainment services for music videos.
[0033] In step S103, a process recycling broadcast event is monitored, where the process recycling broadcast event is generated in response to resource recycling of the first service process or the second service process by the operating system.
[0034] Optionally, in step S103, a service registration listener (Service RegistrationListener) can be used to subscribe to a notification of a process recycling broadcast event, and a notification of a process recycling broadcast event can be received via a first service process and a second service process, and a process recycling broadcast event can be monitored based on the notification of the process recycling broadcast event. When one or more of the following situations occur, the first service process or the second service process can be resource recycled by the operating system: insufficient memory of the operating system, the operating system limits the resources used by the first service process or the second service process, an abnormality occurs in the first service process or the second service process, a user operation for terminating the first service process or the second service process, and a service or component associated with the first service process or the second service process stops running. Exemplarily, when the system memory is insufficient, the operating system may choose to end some processes to free up memory, such as selecting processes with lower priority or that have been idle for a period of time. The operating system can limit the resources used by the process (e.g., CPU time, memory, disk space, etc.), and if the process exceeds these limits, the operating system may terminate the process. Exemplarily, the operating system may include an Android operating system, an iOS operating system, a Windows operating system, etc.
[0035] In step S105, in response to monitoring the process recycling broadcast event, a process keep-alive operation is performed on the first service process and the second service process, so that the first service process and the second service process continue to run in the operating system.
[0036] Optionally, in step S105, when a process recovery broadcast event generated by resource recovery of the first service process by the operating system is monitored, the first service process can be started by the second service process; when a process recovery broadcast event generated by resource recovery of the second service process by the operating system is monitored, the second service process can be started by the first service process. After starting the first service process or starting the second service process, notifications of process recovery broadcast events can continue to be received via the first service process and the second service process, and process recovery broadcast events can be monitored based on the notifications of the process recovery broadcast events. Through the above-mentioned process keep-alive operation of the two processes starting each other, the first service process and the second service process can continue to run in the operating system. For example, when the merchant-end device is locked or switched to other applications, the applet corresponding to the service start request of the application can still run in the operating system background for a long time, thereby avoiding affecting the merchant-end device's verification process of the legitimacy of the user-end device, and improving the security of the transaction process.
[0037] According to the method of keeping the program process alive according to one or more embodiments of the present application, the first service process and the second service process created in response to the service startup request from the application of the merchant-side device can be continuously run in the operating system, thereby utilizing the application of the merchant-side device to replace the hardware device of the Internet of Things tag, thereby saving costs for the merchant, realizing the promotion of electronic payment at the merchant end, and also improving the user's payment experience.
[0038] The following will be combined Figure 2-5 The specific implementation of keeping the program process alive according to one or more embodiments of the present application is further described.
[0039] Figure 2 A schematic diagram of a process for keeping a program process alive according to one or more embodiments of the present application is shown.
[0040] like Figure 2 As shown in FIG. 2 , the software architecture 200 for keeping program processes alive includes an application main process 210 , a first service process 220 , a second service process 230 and a service registration listener 240 .
[0041] The application main process 210 can be created when the application is started, which can be implemented as a main() function, for example, through which the operating system starts the application. Optionally, the application main process 210 can create a first service process 220 and a second service process 230 corresponding to the service start request in response to a service start request of an application from a merchant-end device, wherein the service start request of an application from a merchant-end device can be generated in response to one or more applets of the merchant-end device enabling the application. Optionally, the application main process 210 can also be used to manage system resources (e.g., memory, file handles, and other system resources, etc.), process user input and system events (e.g., keyboard strokes, mouse clicks, touch screen events, etc.), create and manage UI components in an application with a graphical user interface, manage the data flow of the application (e.g., reading, processing, and persistence of data), manage the life cycle of the application (e.g., including initialization, running, pausing, resuming, and exiting), process interactions with other applications (e.g., data sharing, service calls, etc.), and monitor the performance indicators of the application (e.g., CPU and memory usage).
[0042] After the first service process 220 and the second service process 230 are created, the service registration listener 240 can be used to subscribe to the notification of the process recovery broadcast event. Exemplarily, the service registration listener 240 can be implemented based on polling, long connection (such as HTTP long connection, WebSocket), gRPC, etc. After subscribing to the notification of the process recovery broadcast event using the service registration listener 240, the first service process 220 and the second service process 230 can listen to the notification of the process recovery broadcast event, wherein when the first service process 220 or the second service process 230 is recycled by the operating system, a process recovery broadcast event can be generated and broadcasted through the service registration listener 240. When the first service process 220 listens to the notification of the process recovery broadcast event generated by the operating system for resource recovery of the second service process 230, the first service process 220 can be used to start the second service process 230; when the second service process 230 listens to the notification of the process recovery broadcast event generated by the operating system for resource recovery of the first service process 220, the second service process 230 can be used to start the first service process 220.
[0043] Through the above-mentioned process keep-alive operation of the two processes starting each other, the first service process 220 and the second service process 230 can continue to run in the operating system, thereby ensuring that the application's applet can continue to run in the operating system. For example, when the merchant-end device locks the screen or switches to other applications, the applet corresponding to the service startup request of the application can still run in the background of the operating system for a long time, thereby avoiding affecting the merchant-end device's verification process of the legitimacy of the user-end device, thereby improving the security of the transaction process.
[0044] Figure 3 A schematic diagram of the software architecture of a typical application program with a program process keep-alive function is shown.
[0045] like Figure 3 As shown in FIG. 3 , the software architecture 300 of the application includes a universal language container 310 , a UI component 320 , and a program interface 330 , wherein the universal language container 310 is provided with a plurality of applets of the application, such as Figure 3 As shown in FIG. 1 , applet 1, applet 2, applet 3, ..., applet N.
[0046] The UI component 320 is used to constitute the basic elements of the user interface to provide user interactive functions and display information. Optionally, the UI component 320 may include a button that allows the user to trigger an event or operation by clicking, a text box that allows the user to enter and edit text, a check box that allows the user to select or deselect one or more options, a drop-down menu that displays a drop-down list for the user to select, a slide bar that allows the user to select by sliding, etc.
[0047] The program interface 330 may include an application programming interface (Application Programming Interface, API) for process preservation and an application programming interface for near field communication. The API for process preservation may be configured to be called in response to each of one or more applets of an enabled application to start executing a method for program process preservation according to one or more embodiments of the present application. The API for near field communication may be configured to be called in response to each of one or more applets of an enabled application to establish a near field communication connection between a merchant-end device and a user-end device via the API for near field communication. Exemplarily, the near field communication connection may include a Bluetooth connection, an NFC connection, a Wi-Fi connection, a ZigBee connection, and the like.
[0048] Continue as Figure 3As shown in , the software architecture 300 of the application can be coupled with the system native capabilities of the operating system through bridging technology (for example, JSBridge, Cordova, Ionic, etc.), where the system native capabilities may include storage, camera, positioning, process keep-alive, etc.
[0049] Figure 4 A flowchart of a typical method for verifying the legitimacy of a user-end device is shown, wherein the legitimacy of the user-end device is used to indicate whether the user-end device is located at the transaction site of the merchant-end device.
[0050] like Figure 4 In step S1, the user-end device scans the payment code of the merchant-end device (for example, the payment QR code) to obtain the URL and obtain the tag ID based on the URL, wherein when the user-end device scans the payment code of the merchant-end device, the near-field communication API can be called to establish a near-field communication connection between the merchant-end device and the user-end device, and the process preservation API can be called to start executing the program process preservation method according to one or more embodiments of the present application.
[0051] In step S2, the user terminal device sends the acquired tag ID to the security authentication terminal. Optionally, the security authentication terminal can be implemented as a remote security authentication platform for authenticating the correctness and uniqueness of the identities of both parties to the transaction.
[0052] In step S3, the security authentication end determines the service ID of the user device based on the tag ID and returns the service ID to the user device.
[0053] In step S4, the user-end device may enter the monitoring mode by establishing a near field communication connection (eg, a Bluetooth connection) between the merchant-end device and the user-end device.
[0054] In step S5 , the merchant-end device broadcasts the tag ID and service ID of the merchant-end device, for example, broadcasts the tag ID and service ID of the merchant-end device periodically or at a predetermined time.
[0055] In step S6, the user-end device verifies whether the tag ID and service ID match the tag ID and service ID received from the merchant-end device. If they match, the process proceeds to step S7 to apply for a face-to-face credential.
[0056] In step S7, the user-end device generates an application message based on the user ID, the random number and the timestamp and sends the application message to the merchant-end device to apply for a face-to-face credential.
[0057] In step S8, the merchant-end device generates a face-to-face credential in response to the verification application message passing.
[0058] In step S9, the merchant-side device sends the generated face-to-face credential to the user-side device.
[0059] In step S10, the user terminal device sends the received face-to-face credential to the security authentication terminal to request authentication of the face-to-face credential.
[0060] In step S11, the security authentication end authenticates the face-to-face credentials, and if the authentication is successful, the process proceeds to step S12.
[0061] In step S12, the user terminal device jumps to a service interface, such as a payment interface, a coupon collection interface, etc.
[0062] Figure 5 A schematic block diagram of a device for keeping a program process alive according to one or more embodiments of the present application is shown.
[0063] like Figure 5 As shown in FIG. 5 , the apparatus 500 for keeping a program process alive includes a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520. The processor 520 executes the computer program 530 to implement a method for keeping a program process alive according to one aspect of the present application.
[0064] In addition, the present application may also be implemented as a non-transitory computer-readable storage medium, in which a program for causing a computer to execute the method for keeping a program process alive according to one aspect of the present application is stored.
[0065] Here, as non-temporary computer-readable storage media, various forms of non-temporary computer-readable storage media can be used, such as disks (e.g., magnetic disks, optical disks, etc.), cards (e.g., memory cards, optical cards, etc.), semiconductor memories (e.g., ROMs, non-volatile memories, etc.), and tapes (e.g., magnetic tapes, cassettes, etc.).
[0066] In the applicable situation, hardware, software or a combination of hardware and software can be used to realize the various embodiments provided by the application. Moreover, in the applicable situation, without departing from the scope of the application, the various hardware components and / or software components set forth herein can be combined into a composite component comprising software, hardware and / or both. In the applicable situation, without departing from the scope of the application, the various hardware components and / or software components set forth herein can be divided into subcomponents comprising software, hardware or both. In addition, in the applicable situation, it is contemplated that the software component can be implemented as a hardware component, and vice versa.
[0067] Software according to the present application (such as program code and / or data) may be stored on one or more non-transitory computer-readable storage media. It is also contemplated that the software identified herein may be implemented using one or more general or special-purpose computers and / or computer systems, networked and / or otherwise. Where applicable, the order of the various steps described herein may be changed, combined into composite steps, and / or divided into sub-steps to provide the features described herein.
[0068] The embodiments and examples set forth herein are provided to best illustrate embodiments according to the present application and its specific applications, and thereby enable those skilled in the art to implement and use the present application. However, those skilled in the art will appreciate that the above description and examples are provided only for ease of illustration and example. The description set forth is not intended to cover all aspects of the present application or to limit the present application to the precise form disclosed.
Claims
1. A method for keeping a program process alive, characterized in that: The method is applied to a merchant terminal device to verify the legitimacy of a user terminal device, and the method comprises the following steps: In response to a service start request from an application program of a merchant terminal device, creating a first service process and a second service process corresponding to the service start request; monitoring a process recycling broadcast event, where the process recycling broadcast event is generated in response to resource recycling of the first service process or the second service process by an operating system; as well as In response to monitoring the process recycling broadcast event, a process keep-alive operation is performed on the first service process and the second service process, so that the first service process and the second service process continue to run in the operating system.
2. According to the method of claim 1, wherein the monitoring process reclaims the broadcast event comprises: Use the service to register a listener to subscribe to the process of recycling broadcast event notifications; Receiving a notification of the process recycling broadcast event via the first service process and the second service process; as well as The process recycle broadcast event is monitored based on a notification of the process recycle broadcast event.
3. The method according to claim 1, wherein the first service process or the second service process is subjected to resource recovery by the operating system in response to one or more of the following events: insufficient memory of the operating system, restrictions imposed by the operating system on resources used by the first service process or the second service process, an exception in the first service process or the second service process, a user operation for terminating the first service process or the second service process, or cessation of services or components associated with the first service process or the second service process.
4. The method according to claim 1, wherein in response to monitoring the process recycling broadcast event, performing a process keep-alive operation on the first service process and the second service process comprises: In response to monitoring the process recycling broadcast event generated by resource recycling of the first service process by the operating system, starting the first service process by using the second service process; as well as In response to monitoring the process recycling broadcast event generated when the operating system performs resource recycling on the second service process, the second service process is started using the first service process.
5. The method of claim 1, wherein the service initiation request from the application of the merchant-side device is generated in response to the merchant-side device enabling one or more applets of the application.
6. The method of claim 5, wherein one or more applets of the application are packaged in a common language container.
7. The method according to claim 1, wherein the method further comprises: Setting an application programming interface for process keepalive in the application; In response to enabling each of the one or more applets of the application program, calling the process keep-alive application programming interface; as well as The process recycle broadcast event is monitored via the process keep-alive application programming interface, and in response to monitoring the process recycle broadcast event, a process keep-alive operation is performed on the first service process and the second service process.
8. The method according to claim 1, wherein the method further comprises: Setting an application programming interface for near field communication in the application; invoking the near field communication application programming interface in response to enabling each of the one or more applets of the application; as well as A near field communication connection is established between the merchant terminal device and the user terminal device via the near field communication application programming interface.
9. The method according to claim 8, wherein the merchant-end device verifies the legitimacy of the user-end device by: Displaying payment identification information and broadcasting tag identification information and service identification information of the merchant terminal device via a near field communication connection; Receiving tag identification information and service identification information from the user terminal device via the near field communication connection, wherein the tag identification information and service identification information of the user terminal device are obtained by the user terminal device based on at least the payment collection identification information; as well as The legitimacy of the user-end device is verified based at least on a comparison between the tag identification information and the service identification information of the merchant-end device and the tag identification information and the service identification information of the user-end device.
10. The method according to claim 9, wherein verifying the legitimacy of the user-end device based on at least a comparison between the tag identification information and the service identification information of the merchant-end device and the tag identification information and the service identification information of the user-end device comprises: At least in response to the tag identification information and service identification information of the merchant terminal device matching the tag identification information and service identification information of the user terminal device respectively, determining that the legitimacy of the user terminal device is verified; as well as At least in response to the tag identification information of the merchant terminal device not matching the tag identification information of the user terminal device and / or the service identification information of the merchant terminal device not matching the service identification information of the user terminal device, it is determined that the legitimacy of the user terminal device has not been verified.
11. The method according to claim 1, wherein the legitimacy of the user-end device is used to indicate whether the user-end device is located at a transaction site corresponding to the merchant-end device.
12. A device for keeping a program process alive, characterized in that: The device is arranged on the merchant terminal device to verify the legitimacy of the user terminal device, and the device comprises: Memory; a processor coupled to the memory; and A computer program stored on the memory, which, when executed on the processor, causes the following operations: In response to a service start request from an application program of a merchant terminal device, creating a first service process and a second service process corresponding to the service start request; monitoring a process recycling broadcast event, where the process recycling broadcast event is generated in response to resource recycling of the first service process or the second service process by an operating system; and In response to monitoring the process recycling broadcast event, a process keep-alive operation is performed on the first service process and the second service process, so that the first service process and the second service process continue to run in the operating system.
13. The apparatus according to claim 12, wherein when the computer program is executed on the processor, causing the listening process to recycle the broadcast event comprises: Use the service to register a listener to subscribe to the process of recycling broadcast event notifications; Receiving a notification of the process recycling broadcast event via the first service process and the second service process; as well as The process recycle broadcast event is monitored based on a notification of the process recycle broadcast event.
14. The device according to claim 12, wherein the first service process or the second service process is subjected to resource recovery by the operating system in response to one or more of the following events: insufficient memory of the operating system, restrictions imposed by the operating system on resources used by the first service process or the second service process, an exception in the first service process or the second service process, a user operation for terminating the first service process or the second service process, or cessation of services or components associated with the first service process or the second service process.
15. The apparatus according to claim 12, wherein when the computer program is executed on the processor, the process keeping alive operation is performed on the first service process and the second service process in response to monitoring the process recycling broadcast event, comprising: In response to monitoring the process recycling broadcast event generated by resource recycling of the first service process by the operating system, starting the first service process by using the second service process; as well as In response to monitoring the process recycling broadcast event generated when the operating system performs resource recycling on the second service process, the second service process is started using the first service process.
16. The apparatus of claim 12, wherein the service initiation request from the application of the merchant-side device is generated in response to the merchant-side device enabling one or more applets of the application.
17. The apparatus of claim 16, wherein one or more applets of the application are packaged in a universal language container.
18. The apparatus of claim 12, wherein the computer program when executed on the processor further causes: Setting an application programming interface for process keepalive in the application; In response to invoking each of the one or more applets of the application program, calling the process keep-alive application programming interface; and The process recycle broadcast event is monitored via the process keep-alive application programming interface, and in response to monitoring the process recycle broadcast event, a process keep-alive operation is performed on the first service process and the second service process.
19. The apparatus of claim 12, wherein the computer program when executed on the processor further causes: Setting an application programming interface for near field communication in the application; Invoking the near field communication application programming interface in response to enabling each of the one or more applets of the application; and A near field communication connection is established between the merchant terminal device and the user terminal device via the near field communication application programming interface.
20. The apparatus according to claim 19, wherein when the computer program is executed on the processor, the merchant terminal device verifies the legitimacy of the user terminal device in the following manner: Displaying payment identification information and broadcasting tag identification information and service identification information of the merchant terminal device via a near field communication connection; Receiving tag identification information and service identification information from the user terminal device via the near field communication connection, wherein the tag identification information and service identification information of the user terminal device are obtained by the user terminal device based on at least the payment collection identification information; as well as The legitimacy of the user-end device is verified based at least on a comparison between the tag identification information and the service identification information of the merchant-end device and the tag identification information and the service identification information of the user-end device.
21. The apparatus according to claim 20, wherein when the computer program is executed on the processor, the verification of the legitimacy of the user-end device based on at least a comparison between the tag identification information and the service identification information of the merchant-end device and the tag identification information and the service identification information of the user-end device comprises: At least in response to the tag identification information and service identification information of the merchant terminal device matching the tag identification information and service identification information of the user terminal device respectively, determining that the legitimacy of the user terminal device is verified; as well as At least in response to the tag identification information of the merchant terminal device not matching the tag identification information of the user terminal device and / or the service identification information of the merchant terminal device not matching the service identification information of the user terminal device, it is determined that the legitimacy of the user terminal device has not been verified.
22. The apparatus according to claim 12, wherein the legitimacy of the user-end device is used to indicate whether the user-end device is located at a transaction site corresponding to the merchant-end device.
23. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium includes instructions, which, when executed, execute the method for keeping a program process alive according to any one of claims 1 to 11.
24. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed by a processor, the method for keeping a program process alive according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Payment assistance method, apparatus, and equipment
CN108566641A
WeChat applet and API security protection method and device, equipment and storage medium
CN110210203A
Implementation method and system for downloading Bluetooth device certificate through WeChat applet
CN112104672A
Applet running method and device, electronic equipment and medium
CN112540804A
Application program keep-alive processing method and device, equipment and storage medium
CN117032826A