Resource configuration method, apparatus and system

By automatically initiating resource acquisition requests and allocation instructions when the target application's resource space is transferred out, the problem of users needing to recharge periodically is solved, resource space is automatically replenished, the problem of insufficient balance is avoided, and the user experience is improved.

CN114707985BActive Publication Date: 2026-08-04ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2020-09-23
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In existing technologies, users need to regularly check the remaining funds in their electronic accounts and recharge them in a timely manner; otherwise, they may run out of funds and be unable to make purchases, causing inconvenience to users.

Method used

When a resource transfer is detected in the resource space of the target application, a resource acquisition request is generated and sent to the resource manager. The manager receives and executes the resource allocation instruction, transferring the resource to the resource space of the target application, thus realizing the association between resource acquisition and transfer.

Benefits of technology

By automatically initiating resource acquisition operations, the system ensures that the target application always has sufficient resources available for transfer, avoiding the inability to consume due to insufficient balance and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114707985B_ABST
    Figure CN114707985B_ABST
Patent Text Reader

Abstract

This specification provides a resource configuration method, apparatus, and system. The resource configuration method includes: upon detecting a resource transfer out of the first resource space of a target application, generating a resource acquisition verification factor for acquiring resources, and generating second verification information. The resource acquisition verification factor refers to the authentication information generated by the resource transferor after the resource transfer. Based on the resource transfer result and the resource acquisition verification factor, third verification information is generated. Based on the second and third verification information, a resource acquisition request is generated, which is a request to add resources from the first resource space. In this specification, if a resource transfer out occurs in the first resource space, a resource acquisition request can be automatically initiated directly by combining the resource acquisition verification factor and the resource transfer result to request additional resources from the resource manager, ensuring that there are always sufficient resources in the first resource space for resource transfer out.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of application number 202011009324.3, filed on September 23, 2020, entitled "Resource Allocation Method, Apparatus and System". Technical Field

[0002] This manual relates to the field of computer technology, and in particular to resource allocation methods, apparatus and systems. Background Technology

[0003] With the rapid development of computer technology, the internet has become an important part of people's lives, especially electronic payment, which has provided convenience for daily life. In existing technology, users can apply for an electronic account and pre-deposit a certain amount of funds for subsequent daily consumption; when making a purchase, the corresponding amount can be directly deducted from this electronic account and paid to the recipient. However, in the above process, recharging and consumption are two completely independent processes, requiring users to regularly monitor the remaining funds in their electronic accounts and recharge in a timely manner. Therefore, it is possible that the electronic account balance will be insufficient, preventing the user from making purchases and causing inconvenience. Thus, there is a need to provide a simpler and more convenient method for recharging funds. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a resource allocation method. This specification also relates to a resource allocation apparatus, a resource allocation system, a computing device, and a computer-readable storage medium to address the technical deficiencies existing in the prior art.

[0005] According to a first aspect of the embodiments of this specification, a resource allocation method is provided, including:

[0006] If a resource transfer occurs in the first resource space of the target application, a resource acquisition request for the first resource space is generated.

[0007] The resource acquisition request is sent to the resource manager of the target application, and the resource allocation instruction returned by the resource manager in response to the resource acquisition request is received. The resource allocation instruction carries the first target resource to be allocated.

[0008] According to the resource allocation instruction, the first target resource is transferred to the first resource space of the target application.

[0009] Optionally, generating a resource acquisition request for the first resource space includes:

[0010] Generate a resource acquisition verification factor for acquiring resources, and generate second verification information;

[0011] Generate third verification information based on the resource transfer result and the resource acquisition verification factor;

[0012] The resource acquisition request is generated based on the second verification information and the third verification information.

[0013] Optionally, the resource allocation instruction carries fourth verification information, and the step of transferring the first target resource to the first resource space of the target application according to the resource allocation instruction includes:

[0014] The resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction. If the verification is successful, the operation step of transferring the first target resource to the first resource space of the target application according to the resource allocation instruction is executed.

[0015] Optionally, before generating the resource acquisition request for the first resource space, the method further includes:

[0016] Receive a resource transfer instruction sent by a resource recipient, wherein the resource transfer instruction carries a second target resource to be transferred;

[0017] According to the resource transfer instruction, the second target resource in the first resource space is transferred to the second resource space, where the second resource space is the resource space corresponding to the resource recipient.

[0018] If the transfer of the second target resource is completed, it is determined that a resource transfer of the first resource space has been detected.

[0019] Optionally, the resource transfer instruction further carries first verification information, and after receiving the resource transfer instruction sent by the resource recipient, it further includes:

[0020] The resource transfer instruction is verified based on the first verification information. If the verification passes, the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction is executed.

[0021] Optionally, after receiving the resource transfer instruction sent by the resource recipient, the method further includes:

[0022] Determine whether the resources in the first resource space are greater than or equal to the second target resource. If so, execute the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction.

[0023] Optionally, after transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction, the method further includes:

[0024] If the transfer of the second target resource is completed, determine whether the remaining resources in the first resource space are greater than a preset threshold. If not, generate a resource acquisition request for the first resource space.

[0025] Optionally, after transferring the second target resource from the first resource space to the second resource space, the method further includes:

[0026] Generate a first resource transfer response message carrying the fifth verification information;

[0027] The first resource transfer response message is sent to the resource manager.

[0028] Optionally, after transferring the first target resource to the first resource space of the target application according to the resource allocation instruction, the method further includes:

[0029] Generate a second resource transfer response message carrying the sixth verification information;

[0030] The second resource transfer response message is sent to the resource manager.

[0031] Optionally, after generating the third verification information based on the resource transfer result and the resource acquisition verification factor, the method further includes:

[0032] A third resource transfer response message is generated based on the third verification information;

[0033] The third resource transfer response message is sent to the resource recipient.

[0034] According to a second aspect of the embodiments of this specification, a resource allocation apparatus is provided, comprising:

[0035] The generation module is configured to generate a resource acquisition request for the first resource space when it detects that a resource transfer has occurred in the first resource space of the target application.

[0036] The first receiving module is configured to send the resource acquisition request to the resource manager of the target application and receive the resource allocation instruction returned by the resource manager in response to the resource acquisition request, wherein the resource allocation instruction carries the first target resource to be allocated.

[0037] The transfer module is configured to transfer the first target resource to the first resource space of the target application according to the resource allocation instruction.

[0038] According to a third aspect of the embodiments of this specification, a resource allocation system is provided, the system including a first terminal device, a second terminal device configured with a target application, and a server for resource management services of the target application, wherein the first terminal device establishes a communication connection with the second terminal device, and the second terminal device establishes a communication connection with the server;

[0039] The first terminal device is configured to generate a resource transfer instruction and send the resource transfer instruction to the second terminal device, wherein the resource transfer instruction carries a second target resource to be transferred.

[0040] The second terminal device is configured to receive the resource transfer instruction, and according to the resource transfer instruction, transfer the second target resource in the first resource space to the second resource space, where the first resource space is the resource space corresponding to the target application and the second resource space is the resource space corresponding to the first terminal device; generate a resource acquisition request for the first resource space based on the resource transfer result, and send the resource acquisition request to the server; receive a resource allocation instruction returned by the server, wherein the resource allocation instruction carries the first target resource to be allocated; and according to the resource allocation instruction, transfer the first target resource to the first resource space of the target application.

[0041] The server is configured to receive the resource acquisition request, generate a resource allocation instruction carrying the first target resource based on the resource acquisition request, and send the resource allocation instruction to the second terminal device.

[0042] Optionally, the resource transfer instruction also carries first verification information, and the second terminal device is further configured to:

[0043] Upon receiving the resource transfer instruction, the resource transfer instruction is verified according to the first verification information. If the verification passes, the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction is executed.

[0044] Optionally, the second terminal device is further configured to:

[0045] Generate a resource acquisition verification factor for acquiring resources, and generate second verification information;

[0046] Based on the result of the resource transfer and the resource acquisition verification factor, a third verification information is generated, and the second verification information and the third verification information are carried in the resource acquisition request.

[0047] Optionally, the server is further configured to:

[0048] The resource acquisition request is verified based on the third verification information carried in the resource acquisition request. If the verification passes, fourth verification information is generated based on the second verification information and the third verification information.

[0049] The fourth verification information is carried in the resource allocation instruction.

[0050] Optionally, the second terminal device is further configured to:

[0051] The resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction. If the verification is successful, the operation step of transferring the first target resource to the first resource space of the target application according to the resource allocation instruction is executed.

[0052] Optionally, the second terminal device is further configured to:

[0053] Upon receiving the resource transfer instruction, determine whether the resources in the first resource space are greater than or equal to the second target resource. If so, execute the operation step of transferring the second target resource from the first resource space to the second resource space.

[0054] Optionally, the second terminal device is further configured to:

[0055] If the transfer of the second target resource is completed, determine whether the remaining resources in the first resource space are greater than a preset threshold. If not, generate a resource acquisition request for the first resource space.

[0056] Optionally, the second terminal device is further configured to:

[0057] When transferring the second target resource in the first resource space to the second resource space, a first resource transfer response message carrying the fifth verification information is generated.

[0058] Send the first resource transfer response message to the server;

[0059] Accordingly, the server is further configured as follows:

[0060] The first resource transfer response message is verified based on the fifth verification information carried in the received first resource transfer response message. If the verification passes, the resources in the first resource space are updated.

[0061] Optionally, the second terminal device is further configured to:

[0062] In the case of transferring the first target resource to the first resource space of the target application, a second resource transfer response message carrying sixth verification information is generated;

[0063] Send the second resource transfer response message to the server;

[0064] Accordingly, the server is further configured as follows:

[0065] The second resource transfer response message is verified based on the sixth verification information carried in the received second resource transfer response message. If the verification passes, the resources in the first resource space are updated.

[0066] Optionally, the second terminal device is further configured to:

[0067] A third resource transfer response message is generated based on the third verification information;

[0068] Send the third resource transfer response message to the first terminal device;

[0069] Accordingly, the first terminal device is further configured as follows:

[0070] Based on the received third resource transfer response message, generate and display the result of the resource transfer.

[0071] Optionally, the first terminal device is further configured to:

[0072] Send an application selection instruction carrying the device identifier of the first terminal device to the second terminal device, and receive an application response message returned by the second terminal device;

[0073] Upon receiving the application response message, the resource transfer instruction is generated;

[0074] Accordingly, the second terminal device is further configured as follows:

[0075] Based on the device identifier carried in the received application selection instruction, the corresponding target application is determined, and the application selection instruction is sent to the target application;

[0076] Obtain the application response message returned by the target application and send the application response message to the first terminal device.

[0077] According to a fourth aspect of the embodiments of this specification, a resource allocation method is provided, including:

[0078] The first terminal device generates a resource transfer instruction and sends the resource transfer instruction to the second terminal device. The resource transfer instruction carries the second target resource to be transferred.

[0079] The second terminal device receives the resource transfer instruction, and according to the resource transfer instruction, transfers the second target resource in the first resource space to the second resource space. The first resource space is the resource space corresponding to the target application, and the second resource space is the resource space corresponding to the first terminal device. Based on the result of the resource transfer, a resource acquisition request for the first resource space is generated, and the resource acquisition request is sent to the server.

[0080] The server receives the resource acquisition request, generates a resource allocation instruction carrying a first target resource to be allocated based on the resource acquisition request, and sends the resource allocation instruction to the second terminal device.

[0081] The second terminal device receives the resource allocation instruction returned by the server; according to the resource allocation instruction, it transfers the first target resource to the first resource space of the target application.

[0082] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising:

[0083] Memory and processor;

[0084] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method:

[0085] If a resource transfer occurs in the first resource space of the target application, a resource acquisition request for the first resource space is generated.

[0086] The resource acquisition request is sent to the resource manager of the target application, and the resource allocation instruction returned by the resource manager in response to the resource acquisition request is received. The resource allocation instruction carries the first target resource to be allocated.

[0087] According to the resource allocation instruction, the first target resource is transferred to the first resource space of the target application.

[0088] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the resource configuration method provided in the first aspect.

[0089] The resource configuration method provided in this specification, when detecting a resource transfer out of the target application's first resource space, generates a resource acquisition request for the first resource space; sends the resource acquisition request to the target application's resource manager and receives a resource allocation instruction returned by the resource manager in response to the resource acquisition request, the resource allocation instruction carrying the first target resource to be allocated; according to the resource allocation instruction, the first target resource is transferred to the target application's first resource space. In this case, since the resources configured in the first resource space are for subsequent resource transfer out, i.e., the resource acquisition and resource transfer out actions are interrelated, if a resource transfer out occurs in the first resource space, a resource acquisition operation can be automatically initiated directly based on the result of the resource transfer out to request resources from the resource manager, without requiring the user to initiate a separate resource acquisition operation. This ensures that there are always sufficient resources in the first resource space for resource transfer out, avoiding situations where insufficient balance leads to inability to consume resources, facilitating user use, and improving the user experience. Attached Figure Description

[0090] Figure 1 This is a flowchart of a resource allocation method provided in one embodiment of this specification;

[0091] Figure 2 This is a flowchart illustrating a resource allocation method for a terminal device provided in one embodiment of this specification.

[0092] Figure 3 This is an interactive diagram illustrating a resource allocation method applied to a public transportation scenario, as provided in one embodiment of this specification.

[0093] Figure 4 This is a schematic diagram of the structure of a resource allocation device provided in one embodiment of this specification;

[0094] Figure 5 This is a schematic diagram of the structure of a resource allocation system provided in one embodiment of this specification;

[0095] Figure 6 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0096] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0097] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0098] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0099] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0100] Radio Frequency Identification (RFID): RFID is an automatic identification technology that uses non-contact data communication between a reader and a tag to identify targets. Specifically, it enables non-contact two-way data communication via radio frequency, reading and writing data to a recording medium (electronic tag or RFID card) to achieve target identification and data exchange. RFID utilizes radio waves for rapid, non-contact information exchange and storage, combining wireless communication with data access technology, and connecting to a database system to achieve non-contact two-way communication, thus achieving identification and data exchange. This creates a highly complex system where electromagnetic waves are used for reading, writing, and communication with electronic tags. RFID has a wide range of applications, including animal microchips, car anti-theft devices, access control, parking management, production line automation, and material management.

[0101] NFC: Near Field Communication is an emerging technology that allows devices (such as mobile phones) to exchange data when they are close to each other. It evolved from contactless radio frequency identification (RFID) and interconnection technologies. By integrating inductive card readers, inductive cards and peer-to-peer communication functions on a single chip, it enables mobile payments, electronic ticketing, access control, mobile identity recognition, anti-counterfeiting and other applications using mobile terminals.

[0102] Mobile terminals, also known as mobile communication terminals, refer to computer devices that can be used while on the move. Broadly speaking, this includes mobile phones, laptops, tablets, POS machines, and even in-vehicle computers. However, in most cases, it refers to mobile phones or smartphones and tablets with multiple application functions. With the development of networks and technologies towards greater broadband, the mobile communication industry is entering a true mobile information age. On the other hand, with the rapid development of integrated circuit technology, mobile terminals have acquired powerful processing capabilities, transforming from simple communication tools into comprehensive information processing platforms.

[0103] Smart card: A general term for plastic cards (usually the size of a credit card) with an embedded microchip. Some smart cards contain a microelectronic chip. Smart cards require a reader to exchange data. Equipped with a CPU, RAM, and I / O, smart cards can process large amounts of data independently without interfering with the host CPU's operation. Smart cards can also filter erroneous data to reduce the burden on the host CPU, making them suitable for applications with a large number of ports and high communication speed requirements. The integrated circuits within the card include a central processing unit (CPU), an EEPROM (Electronic Programmable Read-Only Memory), RAM, and an internal operating system (COS) embedded in the ROM. Data on the card is divided into external reading and internal processing sections.

[0104] COS: Short for Chip Operating System, it's typically developed specifically for the characteristics of the smart card it serves. COS is a dedicated system, not a general-purpose one; that is, a COS can generally only be applied to a specific type (or some types) of smart card, and the COS within different cards is usually different. Compared to common operating systems on microcomputers, COS is essentially closer to a monitoring program than a true operating system in the conventional sense. At present, the main problem that COS needs to solve is how to process and respond to external commands. This generally does not involve the management and processing of sharing and concurrency, and in the context of smart card applications, concurrent and sharing tasks are indeed unnecessary.

[0105] Applet: An application unit, a type of mobile application developed on mobile terminal platforms using the Java language, used to implement the business logic of mobile terminals, and can be a form of COS.

[0106] APDU: Application Protocol Data Unit. A Protocol Data Unit (PDU) is a unit of data transmitted between peer layers; the PDU at the physical layer is a bit, the PDU at the data link layer is a frame, the PDU at the network layer is a packet, the PDU at the transport layer is a segment, and other higher-level PDUs are data.

[0107] In computer authentication, a token is a temporary token that represents the right to perform certain operations. It can also be called a code. Before some data is transmitted, the code must be verified, and different codes are authorized to perform different data operations.

[0108] This specification provides a resource allocation method, and also relates to a resource allocation device, a resource allocation system, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.

[0109] Figure 1 A flowchart of a resource allocation method according to an embodiment of this specification is shown, which specifically includes the following steps:

[0110] Step 102: If a resource transfer occurs in the first resource space of the target application, generate a resource acquisition request for the first resource space.

[0111] In practical applications, a certain amount of resources can be pre-stored in the target application's resource space for subsequent resource transfer. When a user consumes resources, they can directly transfer the corresponding amount from this resource space to the resource recipient. However, in the above process, resource pre-stored and resource transfer are two completely independent processes. It is necessary to regularly monitor the remaining resources in the target application's resource space and promptly obtain resources from the resource manager for pre-stored storage. Therefore, it is very likely that there will be insufficient resource balance in the resource space, making it impossible to transfer, which will cause inconvenience to users.

[0112] This specification provides a resource allocation method. When a resource transfer from the first resource space of a target application is detected, a resource acquisition request for the first resource space is generated. This request is sent to the resource manager of the target application, and a resource allocation instruction is received from the resource manager in response. This instruction carries the first target resource to be allocated. Based on the allocation instruction, the first target resource is transferred to the first resource space of the target application. In this scenario, since the resources allocated to the first resource space are intended for subsequent resource transfers, the acquisition and transfer actions are interrelated. Therefore, if a resource transfer occurs in the first resource space, a resource acquisition operation can be automatically initiated based on the transfer result to request resources from the resource manager. This eliminates the need for the user to initiate a separate resource acquisition operation, ensuring that the first resource space always has sufficient resources for transfers and preventing insufficient resources from consuming them.

[0113] Specifically, the target application refers to the application of the resource transferor, such as a public transport card application, a smart card application, a meal card application, or a prepaid card application. The first resource space refers to the space where the target application stores resources, including but not limited to funds, data resources, computing resources, or virtual resources. Resource transfer-out refers to transferring resources from the first resource space to other resource spaces. A resource acquisition request is a request to acquire resources, i.e., a request to increase the resources in the first resource space. Taking funds as an example, the first resource space is the account where the target application stores funds; resource transfer-out means deducting the target amount of funds from that account; and a resource acquisition request is a request to add funds to that account.

[0114] In practical applications, this solution can be implemented by creating virtual cards for the target application, such as virtual bus cards or virtual meal cards.

[0115] The process of creating the virtual card may include:

[0116] Receive a virtual card application request for the target application;

[0117] Upon receiving confirmation information for the virtual card application, the virtual card is created for the target application, and the virtual card is associated with the first resource space.

[0118] Taking a transit card as an example, in practical applications, an application portal for a virtual card can be provided through an NFC transit card mini-program. The card features can be displayed on the card issuance page, prompting the user to agree to issue the card. Then, the user is prompted to sign up for the automatic deduction service on the automatic deduction agreement page. Once the user completes the automatic deduction service agreement, it is equivalent to sending a confirmation message for the transit card application, and the agreement is successful. The user then enters the card writing page, which calls the phone service to begin writing the card, and the transit card is created.

[0119] Once created, the transit card can be linked to the user's resource space, allowing the user to use the transit card to ride public transportation.

[0120] Of course, after creating the virtual card, if the target application is no longer needed, the virtual card can be deleted. Deletion methods may include receiving a return request for the virtual card;

[0121] Upon receiving a refund confirmation message for the virtual card, the virtual card data is deleted, and the association between the virtual card and the first resource space is severed.

[0122] Taking a transit card as an example again, this can still be achieved through an NFC transit card mini-program. On the card details page, click "Refund Card," which calls the phone service to delete the card data. After the application corresponding to the transit card refunds the user's card balance, the refund status updates from "Refund in Progress" to "Completed." Refunding the card also requires unlinking the transit card from the primary resource space.

[0123] It should be noted that when a resource transfer is detected in the first resource space of the target application, it means that the resources in the first resource space have decreased. At this time, a resource acquisition request for the first resource space can be automatically triggered to replenish the resources in the first resource space. The user does not need to initiate a separate resource acquisition operation, which ensures that there are always sufficient resources in the first resource space for resource transfer.

[0124] In an optional implementation of this embodiment, resources in the first resource space are only transferred out upon receiving a resource transfer-out instruction, and only then is the resource transfer-out of the target application's first resource space detected. Therefore, before generating a resource acquisition request for the first resource space, this specification further includes:

[0125] Receive a resource transfer instruction sent by the resource recipient. The resource transfer instruction carries a second target resource to be transferred.

[0126] According to the resource transfer instruction, the second target resource in the first resource space is transferred to the second resource space, which is the resource space corresponding to the resource recipient.

[0127] If the transfer of the second target resource is completed, it is determined that a resource transfer of the first resource space has been detected.

[0128] Specifically, the resource receiver refers to the party receiving the resources, the second resource space is the space where the resource receiver stores the resources, and the resource transfer instruction is the instruction used to transfer resources from the resource transferor to the resource receiver. For example, the resource receiver could be a bus card reader, subway gate, meal card reader, or access control device. The second target resource refers to the resource to be transferred, i.e., how much resource needs to be transferred from the first resource space to the second resource space. Taking funds as an example, if 20 yuan is spent at the resource receiver, the second target resource is 20 yuan. At this point, a resource transfer instruction of 20 yuan will be received from the resource receiver. After receiving this instruction, the 20 yuan in the first resource space will be transferred to the second resource space. After the transfer is complete, the funds in the first resource space will decrease by 20 yuan, at which point it can be confirmed that a resource transfer has occurred in the first resource space.

[0129] In an optional implementation of this embodiment, the resource transfer instruction sent by the resource recipient may also carry first verification information, so that after receiving the resource transfer instruction, the resource transferor can first verify the identity of the resource recipient, and then perform the resource transfer after the verification is successful. The specific implementation process can be as follows:

[0130] The resource transfer instruction is verified based on the first verification information. If the verification passes, the operation step of transferring the second target resource in the first resource space to the second resource space is executed according to the resource transfer instruction.

[0131] Specifically, the first verification information is generated by the resource recipient and represents their identity. For example, the first verification information could be a token, which could be the resource recipient's device address. Before transferring resources, the resource recipient and the resource sender establish a communication connection. After establishing the connection, the resource recipient can send a resource transfer instruction to the resource sender. Upon receiving the instruction, the resource sender verifies the resource recipient's identity. If the verification passes, the resource transfer is performed; if the verification fails, the transfer is not executed.

[0132] This specification allows for the verification of the first verification information carried in the received resource transfer instruction, thereby validating the identity of the resource recipient. Only when the identity of the resource recipient is validly verified will the resource transfer proceed, ensuring the resource security of the resource transferor.

[0133] In one optional implementation of this embodiment, resource transfer can only proceed normally if there are sufficient resources in the first resource space for resource transfer. Therefore, it is necessary to determine the resources in the first resource space before transferring out resources. The specific implementation process can be as follows:

[0134] Determine whether the resources in the first resource space are greater than or equal to the second target resource. If so, execute the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction.

[0135] It should be noted that the second target resource is the resource to be transferred out. Therefore, we can determine whether the resources in the first resource space are greater than or equal to the second target resource. If so, it means that the resources in the first resource space are sufficient to support this resource transfer, and the operation step of transferring the second target resource from the first resource space to the second resource space is executed normally, and the resource transfer is successful. If not, it means that the resources in the first resource space are insufficient to support this resource transfer, and the operation step of transferring the second target resource from the first resource space to the second resource space is not executed, and the resource transfer fails.

[0136] In an optional implementation of this embodiment, after transferring the second target resource from the first resource space to the second resource space, the method further includes:

[0137] Generate a first resource transfer response message carrying the fifth verification information;

[0138] Send the first resource transfer response message to the resource manager.

[0139] Specifically, the fifth verification message is generated by the resource transferor (target application) and represents the legitimacy of the resource transfer. This fifth verification message can also be a token. The first resource transfer response message refers to the result of the resource transfer, i.e., the transfer certificate. Since the resource manager manages the resources of the resource transferor, if the second target resource in the first resource space is transferred to the second resource space, the resource manager needs to be notified to synchronize the resource transfer operation and update the resources in the first resource space stored by the resource manager.

[0140] In one optional implementation of this embodiment, after the resource transfer is completed, a resource acquisition request for the first resource space can be automatically and directly generated. That is, as long as a resource transfer occurs in the first resource space, a resource acquisition operation will be initiated directly, i.e., acquisition occurs while the transfer is being completed.

[0141] In an optional implementation of this embodiment, after the resource transfer is completed, it can be determined whether to initiate a resource acquisition request based on the remaining resources in the first resource space. The specific implementation process can be as follows:

[0142] If the transfer of the second target resource is completed, determine whether the remaining resources in the first resource space are greater than a preset threshold. If not, generate a resource acquisition request for the first resource space.

[0143] Specifically, the preset threshold is a pre-set value used to determine whether to initiate a resource acquisition request. For example, the preset threshold can be 20, 30, 50, etc. In this specification, after transferring resources from the first resource space to the second resource space, it can be determined whether the remaining resources in the first resource space are greater than the preset threshold. If not, it means that the remaining resources in the first resource space are few, and a resource acquisition request for the first resource space can be generated. If yes, it means that the remaining resources in the first resource space are many, and a resource acquisition request for the first resource space can be not generated, i.e., no resource acquisition operation is performed.

[0144] In an optional implementation of this embodiment, when generating a resource acquisition request for the first resource space, verification information can also be included to prove the legitimacy of the resource acquisition request. The specific implementation process can be as follows:

[0145] Generate a resource acquisition verification factor for acquiring resources, and generate second verification information;

[0146] Generate third verification information based on the resource transfer results and resource acquisition verification factors;

[0147] Based on the second and third verification information, a resource acquisition request is generated.

[0148] Specifically, the resource acquisition verification factor refers to the identity verification information generated by the resource transferor (target application) after transferring the resources. The result of the resource transfer refers to the credential of the resource transfer. The first resource space has been transferred out, which proves that the first resource space can legally acquire resources. Therefore, the third verification information can be generated together with the result of the resource transfer and the resource acquisition verification factor. This third verification information is used to prove that the resource acquisition behavior is legal.

[0149] In addition, the second verification information is a message generated by the resource transferor for subsequent verification of the legitimacy of the resource manager. This second verification information can be a random number generated by the resource transferor. After the resource transferor sends this random number to the resource manager in the resource acquisition request, the resource manager can encrypt the random number and then send it back to the resource transferor in the resource allocation instruction. The resource transferor decrypts the random number and determines whether it is the same as the previously generated random number to verify the legitimacy of the resource manager's identity.

[0150] In this manual, when generating a resource acquisition request, not only will the request include third-party verification information to verify the legality of the resource acquisition behavior, but it will also include second-party verification information to verify the legality of the resource manager's identity, which greatly ensures the security of the entire resource acquisition process.

[0151] In addition to carrying second and third verification information in the resource acquisition request, other parameters can also be carried in the resource acquisition request depending on the application scenario. This is to avoid issuing multiple resource allocation instructions for the same task. For example, in a transaction scenario, a resource acquisition request will be generated after a transaction is generated. In addition to carrying verification information such as random numbers and resource acquisition verification factors, this resource acquisition request can also carry parameter information such as transaction time, transaction sequence number, and transaction device. This allows the resource manager to verify and analyze the resource acquisition request after receiving it, ensuring that the resource manager issues only one resource allocation instruction for the same transaction task.

[0152] In one optional implementation of this embodiment, after the resource transfer is completed, the resource transfer result can also be returned to the resource recipient. The specific implementation process is as follows:

[0153] Generate a third resource transfer response message based on the third verification information;

[0154] Send the third resource transfer response message to the resource recipient.

[0155] It should be noted that the third resource transfer response message refers to the result of the resource transfer by the resource transferor, i.e., whether the resource transfer was successful. Since the third verification information is generated based on the resource transfer result and the resource acquisition verification factor, it includes both the identity verification information generated by the resource transferor after the transfer and the resource transfer credentials. Therefore, the third resource transfer response message can be directly generated based on the third verification information. After receiving the third resource transfer response message, the resource recipient can verify the identity of the resource transferor based on the third verification information and simultaneously obtain the resource transfer result.

[0156] Step 104: Send the resource acquisition request to the resource manager of the target application and receive the resource allocation instruction returned by the resource manager in response to the resource acquisition request. The resource allocation instruction carries the first target resource to be allocated.

[0157] Specifically, the resource manager is the party that manages the resources of the target application. That is, the resource manager stores the resources of the target application's first resource space; for example, the resource manager could be the target application's server. The first target resource refers to the resource to be allocated, i.e., how much resource needs to be allocated to the first resource space. Taking funds as an example, the first target resource carried in the resource allocation instruction could be 100 yuan. The resource allocation instruction is an instruction to allocate resources to the target application's first resource space. This resource allocation instruction can be an APDU instruction, which can carry multiple identifier parameters, indicating the specific operation of the resource transfer.

[0158] It should be noted that this specification associates resource transfer-out and resource acquisition behaviors in the first resource space of the target application. Whenever a resource transfer-out is detected in the first resource space, a resource acquisition will be automatically initiated. Furthermore, this specification does not limit the amount of resources transferred out of or into the first resource space; these amounts can be the same or different. That is, the first target resource can be the same as or different from the second target resource, and both can be preset; this specification does not impose any limitations.

[0159] In other words, the amount of resources transferred out of the first resource space as described in this manual can be used to request additional resources from the resource manager, or a preset multiple of the transferred resources can be requested. For example, in a consumption deduction scenario, assuming 100 yuan is deducted from the first fund account, a recharge request can be automatically initiated to recharge the first fund account with 100 yuan, or a recharge request can be initiated to recharge the first fund account with 200 yuan.

[0160] Step 106: According to the resource allocation instruction, transfer the first target resource to the first resource space of the target application.

[0161] It should be noted that upon receiving the resource allocation instruction from the resource manager, it indicates that the resource manager has agreed to the resource acquisition request. At this point, the resource allocation instruction can be executed directly according to the parameters carried in it. For example, if the first target resource is 100 yuan, then 100 yuan can be added to the first resource space of the target application. In an optional implementation of this embodiment, the resource manager can also carry fourth verification information in the resource allocation instruction to prove the legitimacy of the resource manager's identity. In this case, when transferring the first target resource to the first resource space of the target application according to the resource allocation instruction, the fourth verification information carried in the resource allocation instruction needs to be verified first. The specific implementation process can be as follows:

[0162] The resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction. If the verification is successful, the operation step of transferring the first target resource to the first resource space of the target application is executed according to the resource allocation instruction.

[0163] Specifically, the fourth verification information is generated by the resource manager based on the second and third verification information, and is used to verify whether the resource manager's identity is legitimate.

[0164] In this manual, when a resource allocation instruction is received, the fourth verification information carried in the resource allocation instruction can be verified first. If the verification passes, the resource allocation instruction can be executed, which greatly ensures the security of the entire resource acquisition process.

[0165] In an optional implementation of this embodiment, after transferring the first target resource to the first resource space of the target application according to the resource allocation instruction, the method further includes:

[0166] Generate a second resource transfer response message carrying the sixth verification information;

[0167] Send the second resource transfer response message to the resource manager.

[0168] Specifically, the sixth verification message is generated by the resource transferor (target application) and represents the resource transferor's identity information; for example, the sixth verification message can also be a token. The second resource transfer response message indicates the result of adding resources to the first resource space. Since the resource manager manages the resources of the resource transferor, if the first target resource is transferred to the first resource space of the target application, the resource manager needs to be notified to synchronize the resource transfer operation and update the resources in the first resource space stored by the resource manager.

[0169] The resource configuration method provided in this specification, when detecting a resource transfer out of the target application's first resource space, generates a resource acquisition request for the first resource space; sends the resource acquisition request to the target application's resource manager and receives a resource allocation instruction returned by the resource manager in response to the resource acquisition request, the resource allocation instruction carrying the first target resource to be allocated; according to the resource allocation instruction, the first target resource is transferred to the target application's first resource space. In this case, since the resources configured in the first resource space are for subsequent resource transfer out, i.e., the resource acquisition and resource transfer out actions are interrelated, if a resource transfer out occurs in the first resource space, a resource acquisition operation can be automatically initiated directly based on the result of the resource transfer out to request resources from the resource manager, without requiring the user to initiate a separate resource acquisition operation. This ensures that there are always sufficient resources in the first resource space for resource transfer out, avoiding situations where insufficient balance leads to inability to consume resources, facilitating user use, and improving the user experience.

[0170] The following is in conjunction with the appendix Figure 2 Taking the application of the resource configuration method provided in this specification to a terminal device as an example, the resource configuration method will be further explained. Figure 2 This specification illustrates a process flowchart of a resource configuration method for a terminal device according to an embodiment, which specifically includes the following steps:

[0171] Step 202: The first terminal device generates a resource transfer instruction and sends the resource transfer instruction to the second terminal device. The resource transfer instruction carries the second target resource to be transferred.

[0172] Specifically, the first terminal device can be the resource recipient's device, such as a bus card reader, subway gate, meal card reader, access control device, etc.; the second terminal device can be the resource sender's device, such as a mobile terminal used by the user (phone, tablet, wristband, etc.). The first terminal device and the second terminal device establish a communication connection. In specific implementation, the first terminal device can achieve the connection through (but not limited to) Near Field Communication (NFC).

[0173] Additionally, the target application refers to the application of the resource transferor, including but not limited to electronic bus card applications and electronic meal card applications. The second terminal device is configured with the target application, meaning that the target application can communicate with the second terminal device or can be directly installed on the second terminal device. For example, the target application can be a COS application set in a smart card, which can communicate with the second terminal device, in which case the second terminal device is configured with the target application; or, the target application can be an application (applet) installed on the second terminal device, which is actually also a COS application.

[0174] In an optional implementation of this embodiment, before the first terminal device generates the resource transfer instruction, it should first determine whether the corresponding target application exists in the second terminal device. Therefore, the first terminal device should send an application selection instruction to the second terminal device in advance, instructing the second terminal device to find the corresponding target application and return a response message. The specific implementation process is as follows:

[0175] The first terminal device sends an application selection instruction carrying the device identifier of the first terminal device to the second terminal device, and receives an application response message returned by the second terminal device;

[0176] The second terminal device determines the corresponding target application based on the device identifier carried in the received application selection instruction, and sends the application selection instruction to the target application; then, it obtains the application response message returned by the target application and sends the application response message to the first terminal device.

[0177] Upon receiving the application response message, the first terminal device generates a resource transfer instruction.

[0178] Specifically, this device identifier uniquely identifies the first terminal device, and the corresponding target application can be determined based on this identifier. It should be noted that the first terminal device is the resource recipient. Generally, a resource recipient has a corresponding resource sender. This resource sender typically uses an application to store and transfer resources. For example, if the first terminal device is a subway turnstile, then the corresponding subway card application needs to be found in the second terminal device; if the first terminal device is a bus card reader, then the corresponding bus card application needs to be found in the second terminal device.

[0179] In this specification, the first terminal device can send an application selection instruction carrying the device identifier of the first terminal device to the second terminal device. After receiving the application selection instruction, the second terminal device searches for the existence of a corresponding target application. If a target application is found, the application selection instruction is passed through to the target application. After receiving the application selection instruction, the target application can return an application response message to the second terminal device, indicating that it knows that it needs to transfer resources. The second terminal device forwards the application response message to the first terminal device. At this time, the first terminal device knows that the second terminal device has a target application that can transfer resources and generates a resource transfer instruction.

[0180] Step 204: The second terminal device receives a resource transfer instruction and, according to the resource transfer instruction, transfers the second target resource in the first resource space to the second resource space. The first resource space is the resource space corresponding to the target application, and the second resource space is the resource space corresponding to the first terminal device.

[0181] Specifically, the first resource space refers to the space of the target application storage resources configured on the second terminal device of the resource transferor. The second resource space is the space of the storage resources on the first terminal device of the resource recipient.

[0182] In an optional implementation of this embodiment, the resource transfer instruction sent by the first terminal device may also carry first verification information, so that after receiving the resource transfer instruction, the target application of the second terminal device can first verify the identity of the first terminal device, and then perform resource transfer after the verification is successful. The specific implementation process can be as follows:

[0183] When the target application of the second terminal device receives a resource transfer instruction, it can verify the resource transfer instruction according to the first verification information. If the verification is successful, it can execute the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction.

[0184] It should be noted that after the first terminal device sends the resource transfer instruction to the second terminal device, the second terminal device (transceiver module) can pass the resource transfer instruction through to the target application. Then the target application can verify the resource transfer instruction and execute the resource transfer instruction if the verification passes.

[0185] This specification allows for the verification of the first verification information carried in the received resource transfer instruction, thereby validating the identity of the first terminal device. Only when the identity of the first terminal device is validly verified will the resource transfer proceed, ensuring the security of resources in the target application of the second terminal device.

[0186] In one optional implementation of this embodiment, resource transfer can only proceed normally if there are sufficient resources in the first resource space for resource transfer. Therefore, it is necessary to determine the resources in the first resource space before transferring out resources. The specific implementation process can be as follows:

[0187] When the target application of the second terminal device receives a resource transfer instruction, it determines whether the resources in the first resource space are greater than or equal to the second target resources. If so, it executes the operation step of transferring the second target resources in the first resource space to the second resource space.

[0188] In an optional implementation of this embodiment, after the target application of the second terminal device transfers the second target resource from the first resource space to the second resource space, it further includes:

[0189] The target application of the second terminal device generates a first resource transfer response message carrying the fifth verification information and sends the first resource transfer response message to the server.

[0190] The server verifies the first resource transfer response message based on the fifth verification information carried in the received first resource transfer response message. If the verification passes, the server updates the resources in the first resource space.

[0191] Here, "server" refers to the server that manages the resource management business of the target application. In other words, this server manages the resources of the target application. Therefore, if the second target resource in the first resource space of the target application is transferred out to the second resource space, the server needs to be notified to synchronize the resource transfer operation and update the resources in the first resource space stored on the server.

[0192] In an optional implementation of this embodiment, after the resource transfer is completed, the target application of the second terminal device can also return the resource transfer result to the server. The specific implementation process is as follows:

[0193] The target application of the second terminal device generates a third resource transfer response message based on the third verification information and sends the third resource transfer response message to the first terminal device.

[0194] The first terminal device generates and displays the result of the resource transfer based on the received third resource transfer response message.

[0195] For example, the metro card application transfers 5 yuan from its resource space to the resource space corresponding to the metro gate device. After the transfer is successful, the metro card application generates a third resource transfer response message, which indicates that the 5 yuan has been successfully transferred to the resource space corresponding to the metro gate device. After receiving the third resource transfer response message, the metro gate device displays that the deduction was successful and opens the gate to allow the user to pass.

[0196] Step 206: The second terminal device generates a resource acquisition request for the first resource space based on the result of the resource transfer, and sends the resource acquisition request to the server.

[0197] It should be noted that when the second terminal device receives a resource transfer instruction, it transfers the second target resource from the first resource space to the second resource space according to the instruction. There are two transfer results: successful transfer and failed transfer. If the transfer is successful, it means that the resources in the first resource space have decreased. At this time, it can be confirmed that a resource transfer has occurred in the first resource space of the target application, and a resource acquisition request for the first resource space is automatically triggered to replenish the resources in the first resource space. In this case, as long as a resource transfer occurs in the first resource space, a resource acquisition operation will be initiated directly, that is, the transfer and acquisition are carried out simultaneously to always ensure that there are sufficient resources in the first resource space.

[0198] If the transfer fails, it indicates that the resources in the first resource space may not have changed, and a resource acquisition request does not need to be generated. However, if the target application determines whether the resources in the first resource space can support the transfer before performing the transfer, and if the resources in the first resource space are less than the second target resource, the resource transfer instruction will not be executed, resulting in a transfer failure. This type of transfer failure is due to insufficient resources in the first resource space, requiring resource acquisition. Therefore, the target application can generate a resource insufficiency flag. If this flag is detected, it can be determined that a resource transfer has occurred in the target application's first resource space, and a resource acquisition request for the first resource space will be generated.

[0199] In an optional implementation of this embodiment, after the transfer of the second target resource is completed, it can be determined whether to initiate a resource acquisition request based on the remaining resources in the first resource space. The specific implementation process can be as follows:

[0200] The target application of the second terminal device determines whether the remaining resources in the first resource space are greater than a preset threshold. If not, it generates a resource acquisition request for the first resource space.

[0201] In an optional implementation of this embodiment, when the target application of the second terminal device generates a resource acquisition request for the first resource space, it may also carry verification information to prove the legitimacy of the resource acquisition request. The specific implementation process can be as follows:

[0202] Generate a resource acquisition verification factor for acquiring resources, and generate second verification information;

[0203] The third verification information is generated based on the result of the resource transfer and the resource acquisition verification factor. The second and third verification information are then carried in the resource acquisition request.

[0204] In this specification, the target application of the second terminal device, when generating a resource acquisition request, will not only carry third verification information to verify whether the resource acquisition behavior is legal, but also carry second verification information to verify whether the identity of the resource manager is legal, which greatly ensures the security of the entire resource acquisition process.

[0205] Step 208: The server receives a resource acquisition request, generates a resource allocation instruction carrying the first target resource to be allocated based on the resource acquisition request, and sends the resource allocation instruction to the second terminal device.

[0206] In practice, after receiving a resource acquisition request, the server is aware of the target application's need for resources. The server can then verify the request. If the verification passes, the server generates a resource allocation instruction and sends it to the target application on the second terminal device, signifying the server's agreement to the target application's resource acquisition. The specific implementation process can be as follows:

[0207] The resource acquisition request is verified based on the third verification information carried in the resource acquisition request. If the verification passes, the fourth verification information is generated based on the second and third verification information.

[0208] The fourth verification information is carried in the resource allocation instruction.

[0209] It should be noted that the third verification information is generated by the target application based on the resource transfer result and the resource acquisition verification factor. This information is used to verify the legality of the resource acquisition behavior. Therefore, after receiving a resource acquisition request, the server only needs to verify the third verification information in the request to determine the legality of the resource acquisition behavior. The second verification information, on the other hand, is a random number generated by the target application on the second terminal device and is used to subsequently verify the server's identity. Therefore, the server only needs to encrypt the second verification information before returning it to the second terminal device. Thus, if the third verification information passes verification, the server can generate a fourth verification information based on the second and third verification information, and then include this fourth verification information in the resource allocation instruction and return it to the second terminal device.

[0210] Step 210: The second terminal device receives the resource allocation instruction returned by the server, and transfers the first target resource to the first resource space of the target application according to the resource allocation instruction.

[0211] In practice, when the server returns a resource allocation instruction, it can also include a fourth verification information in the instruction to prove the server's legitimacy. In this case, when the target application on the second terminal device transfers the first target resource to its first resource space according to the resource allocation instruction, it needs to verify the fourth verification information carried in the resource allocation instruction. The specific implementation process can be as follows:

[0212] The resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction. If the verification is successful, the operation step of transferring the first target resource to the first resource space of the target application is executed according to the resource allocation instruction.

[0213] In an optional implementation of this embodiment, after the second terminal device transfers the first target resource to the first resource space of the target application according to the resource allocation instruction, it further includes:

[0214] The target application of the second terminal device generates a second resource transfer response message carrying the sixth verification information and sends the second resource transfer response message to the server.

[0215] The server verifies the second resource transfer response message based on the sixth verification information carried in the received second resource transfer response message. If the verification passes, the server updates the resources in the first resource space.

[0216] It should be noted that since the server manages the resources of the target application, if the first target resource is successfully transferred to the first resource space of the target application, the server needs to be notified to synchronize the resource transfer operation and update the resources in the first resource space stored on the server.

[0217] The resource allocation method provided in this specification involves a first terminal device generating a resource transfer-out instruction and sending it to a second terminal device. The second terminal device receives the resource transfer-out instruction, transfers a second target resource from a first resource space to a second resource space according to the instruction, and generates a resource acquisition request for the first resource space based on the transfer-out result, sending the request to a server. The server receives the resource acquisition request, generates a resource allocation instruction carrying the first target resource to be allocated, and sends the allocation instruction to the second terminal device. The second terminal device receives the resource allocation instruction returned by the server and, according to the instruction, transfers the first target resource to the first resource space of the target application. In this scenario, since the resources allocated to the first resource space are intended for subsequent resource transfers, the actions of acquiring and transferring resources are interconnected. Therefore, if a resource transfer occurs in the first resource space, a resource acquisition operation can be automatically initiated based on the result of the transfer to request resources from the server. This eliminates the need for the user to initiate a separate resource acquisition operation, ensuring that there are always sufficient resources in the first resource space for resource transfers. This avoids situations where insufficient balance prevents consumption, making it easier for users and improving the user experience.

[0218] The above Figure 2 The illustration shown is a schematic scheme of a resource allocation method according to this embodiment. It should be noted that the technical solution of this resource allocation method is similar to that described above. Figure 1 The technical solutions of the resource allocation methods shown belong to the same concept. Figure 2 For details not described in the technical solution of the resource allocation method shown above, please refer to the above. Figure 1 The technical solution of the resource allocation method is described.

[0219] The following is in conjunction with the appendix Figure 3 Taking the application of the resource allocation method provided in this specification in a public transportation scenario as an example, the resource allocation method will be further explained. Figure 3 An interactive diagram is shown illustrating an embodiment of a resource allocation method applied to a public transportation scenario, which specifically includes the following steps:

[0220] Step 302: After the mobile terminal approaches the payment gate, the payment gate triggers the establishment of a communication connection with the mobile terminal via near-field communication.

[0221] In practical applications, various solutions have emerged in the public transportation sector to serve different types of travel payments, such as mobile NFC for bus rides, contactless smart cards for subway rides, and QR code payments for buses and subways. Each method has its own advantages. QR code applications reduce the need for pre-payment, allowing users to pay after boarding. However, in situations without a network or with a poor signal, users often cannot open or refresh the QR code, leading to boarding difficulties. Mobile NFC and smart cards also have their advantages, allowing passengers to quickly board buses and subways, but pre-payment is required; insufficient balance will prevent boarding. In other words, the current card application's top-up and payment processes are two independent procedures.

[0222] This manual provides a resource configuration method that provides an application portal for virtual cards via an NFC transit card mini-program on a mobile terminal. The card application page displays card features and prompts the user to agree to apply for the card. Then, a direct debit agreement page prompts the user to sign up for a direct debit service. Once the user completes the direct debit service agreement, it is equivalent to sending a confirmation message for the transit card application, indicating successful agreement. The user then proceeds to the card writing page, which invokes the phone's service to begin writing the card, thus completing the transit card creation. After creation, the transit card can be bound to the user's resource space, allowing the user to use this transit card to ride public transportation.

[0223] Upon detecting a deduction from the card application's funds account, a recharge request is generated for that account. This request is sent to the server, and the application receives a recharge instruction from the server. The card application can then recharge the account according to this instruction. In this scenario, the card application directly links the deduction and recharge actions within the card's funds account. If a deduction occurs, the recharge process is automatically triggered, and the mobile terminal is proactively notified. The mobile terminal then initiates a recharge request to the server, eliminating the need for a separate user recharge operation and ensuring that the card application's funds account always has sufficient funds for spending.

[0224] Specifically, the payment gates include, but are not limited to, subway turnstiles, and the mobile terminals include, but are not limited to, mobile phones and tablets. Furthermore, both the payment gates and mobile terminals have NFC functionality. When a user brings their mobile terminal close to the payment gate, the gate can recognize the mobile terminal and establish a connection.

[0225] In practice, the payment gate can establish a communication connection request through near-field communication, in which the communication connection request carries communication parameters; when the mobile terminal is close to the payment gate, it can receive the communication connection request, and in response to the communication connection request, establish a communication connection with the payment gate based on the communication parameters.

[0226] It's important to note that NFC is a contactless, short-range, high-frequency wireless technology. Typically, NFC uses a frequency band of 13.56MHz and a range usually within 10cm. When activated, the NFC chip continuously emits radio frequency signals; the NFC tag is a coil that can be written to. When this coil comes into contact with the radio frequency signals emitted by the NFC chip, it generates a signal carrying the written data; the reader within the NFC chip can read this signal and extract the data.

[0227] Both the payment gate and the mobile terminal have built-in NFC modules. The payment gate continuously sends radio frequency signals through the NFC module to establish a communication connection request. The communication connection request carries the device information of the payment gate. When the mobile terminal is close to the payment gate, it receives the communication connection request and, in response to the communication connection request, establishes a communication connection with the mobile terminal based on the device information of the payment gate.

[0228] Step 304: The payment gate sends an application selection instruction carrying the payment gate's device identifier to the mobile terminal.

[0229] Step 306: The mobile terminal determines the corresponding card application based on the device identifier carried in the received application selection instruction, and sends the application selection instruction to the card application.

[0230] Step 308: After receiving the application selection instruction, the card application returns an application response message to the payment gate via the mobile terminal.

[0231] Step 310: The payment gate generates a deduction instruction and sends the instruction to the card application via the mobile terminal.

[0232] Step 312: The card application receives the deduction instruction and deducts the first target amount from the card application's funds account according to the deduction instruction. At the same time as the card application deducts the funds, the card application generates a recharge request for the card application's funds account based on the result of the fund deduction and sends the recharge request to the server via the mobile terminal.

[0233] Step 314: The card application generates a deduction response and sends the deduction response to the payment gate via the mobile terminal to notify the payment gate of this deduction response. Then, the payment gate notifies the corresponding server of the deduction response, and the server adds the funds to the corresponding fund account of the payment gate.

[0234] Step 316: The payment gate generates and displays the deduction result based on the received deduction response.

[0235] Step 318: The server receives the recharge request, generates a recharge instruction based on the recharge request, and sends the recharge instruction to the card application via the mobile terminal.

[0236] Step 320: The card application receives the recharge instruction returned by the server, recharges the second target amount of funds into the card application's funds account according to the recharge instruction, generates a recharge response, and sends the recharge response to the server via the mobile terminal.

[0237] Of course, after creating the virtual card, if the target application is no longer needed, the virtual card can be deleted. Deletion methods may include receiving a return request for the virtual card;

[0238] Upon receiving a refund confirmation message for the virtual card, the virtual card data is deleted, and the association between the virtual card and the first resource space is severed.

[0239] Taking a transit card as an example again, this can still be achieved through an NFC transit card mini-program. On the card details page, click "Refund Card," which calls the phone service to delete the card data. After the application corresponding to the transit card refunds the user's card balance, the refund status updates from "Refund in Progress" to "Completed." Refunding the card also requires unlinking the transit card from the primary resource space.

[0240] The resource configuration method provided in this manual ensures that the funds deposited into the card application's account are used for subsequent consumption. Since the deposit and consumption actions are interconnected, if a deduction occurs in the card application's account, a deposit request can be automatically initiated directly to request funds from the server. This eliminates the need for the user to initiate a separate deposit, guaranteeing that the card application's account always has sufficient funds for consumption. This avoids situations where insufficient balance prevents consumption, facilitating user convenience and improving the user experience.

[0241] With the above Figure 1 Corresponding to the resource allocation method embodiments shown, this specification also provides resource allocation device embodiments. Figure 4 A schematic diagram of a resource allocation device according to an embodiment of this specification is shown. Figure 4 As shown, the device includes:

[0242] The generation module 402 is configured to generate a resource acquisition request for the first resource space when it is detected that a resource transfer has occurred in the first resource space of the target application.

[0243] The first receiving module 404 is configured to send the resource acquisition request to the resource manager of the target application and receive the resource allocation instruction returned by the resource manager in response to the resource acquisition request, wherein the resource allocation instruction carries the first target resource to be allocated.

[0244] The transfer module 406 is configured to transfer the first target resource to the first resource space of the target application according to the resource allocation instruction.

[0245] Optionally, the generation module 402 is further configured as follows:

[0246] Generate a resource acquisition verification factor for acquiring resources, and generate second verification information;

[0247] Generate third verification information based on the resource transfer result and the resource acquisition verification factor;

[0248] The resource acquisition request is generated based on the second verification information and the third verification information.

[0249] Optionally, the transfer module 406 is further configured to:

[0250] The resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction. If the verification is successful, the operation step of transferring the first target resource to the first resource space of the target application according to the resource allocation instruction is executed.

[0251] Optionally, the device further includes:

[0252] The second receiving module is configured to receive a resource transfer instruction sent by the resource receiver, the resource transfer instruction carrying a second target resource to be transferred.

[0253] The transfer module is configured to transfer the second target resource in the first resource space to the second resource space according to the resource transfer instruction, wherein the second resource space is the resource space corresponding to the resource receiver;

[0254] The determination module is configured to determine that a resource transfer has occurred in the first resource space when the transfer of the second target resource is completed.

[0255] Optionally, the device further includes:

[0256] The verification module is configured to verify the resource transfer instruction based on the first verification information. If the verification passes, the module executes the operation step of transferring the second target resource in the first resource space to the second resource space based on the resource transfer instruction.

[0257] Optionally, the device further includes:

[0258] The first judgment module is configured to determine whether the resources in the first resource space are greater than or equal to the second target resource. If so, the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction is executed.

[0259] Optionally, the device further includes:

[0260] The second judgment module is configured to determine whether the remaining resources in the first resource space are greater than a preset threshold after the second target resource transfer is completed. If not, a resource acquisition request for the first resource space is generated.

[0261] Optionally, the device further includes:

[0262] The first generation module is configured to generate a first resource transfer response message carrying fifth verification information;

[0263] The first sending module is configured to send the first resource transfer response message to the resource manager.

[0264] Optionally, the device further includes:

[0265] The second generation module is configured to generate a second resource transfer response message carrying the sixth verification information;

[0266] The second sending module is configured to send the second resource transfer response message to the resource manager.

[0267] Optionally, the generation module 402 is further configured as follows:

[0268] A third resource transfer response message is generated based on the third verification information;

[0269] The third resource transfer response message is sent to the resource recipient.

[0270] The resource configuration device provided in this manual, upon detecting a resource transfer out of the first resource space of a target application, generates a resource acquisition request for the first resource space; sends the resource acquisition request to the resource manager of the target application and receives a resource allocation instruction returned by the resource manager in response to the resource acquisition request, the resource allocation instruction carrying the first target resource to be allocated; and transfers the first target resource to the first resource space of the target application according to the resource allocation instruction. In this case, since the resources configured in the first resource space are for subsequent resource transfer out, that is, the actions of acquiring resources and transferring resources out are interrelated, if a resource transfer out occurs in the first resource space, a resource acquisition operation can be automatically initiated directly based on the result of the resource transfer out to request resources from the resource manager, without requiring the user to initiate a separate resource acquisition operation. This ensures that there are always sufficient resources in the first resource space for resource transfer out, avoids the situation of insufficient balance leading to inability to consume, facilitates user use, and improves the user experience.

[0271] The above is an illustrative scheme of a resource allocation device according to this embodiment. It should be noted that the technical solution of this resource allocation device and the technical solution of the resource allocation method described above belong to the same concept. For details not described in detail in the technical solution of the resource allocation device, please refer to the description of the technical solution of the resource allocation method described above.

[0272] With the above Figure 2 Corresponding to the resource allocation method embodiments shown, this specification also provides resource allocation system embodiments. Figure 5 A schematic diagram of the structure of a resource allocation system provided in one embodiment of this specification is shown. For example... Figure 5 As shown, the system includes: a first terminal device 502, a second terminal device 504 configured with a target application, and a server 506 for the resource management business of the target application. The first terminal device 502 establishes a communication connection with the second terminal device 504, and the second terminal device 504 establishes a communication connection with the server 506.

[0273] The first terminal device 502 is configured to generate a resource transfer instruction and send the resource transfer instruction to the second terminal device, wherein the resource transfer instruction carries a second target resource to be transferred.

[0274] The second terminal device 504 is configured to receive the resource transfer instruction, and according to the resource transfer instruction, transfer the second target resource in the first resource space to the second resource space, where the first resource space is the resource space corresponding to the target application and the second resource space is the resource space corresponding to the first terminal device; generate a resource acquisition request for the first resource space based on the result of the resource transfer, and send the resource acquisition request to the server; receive a resource allocation instruction returned by the server, wherein the resource allocation instruction carries the first target resource to be allocated; and transfer the first target resource to the first resource space of the target application according to the resource allocation instruction.

[0275] The server 506 is configured to receive the resource acquisition request, generate a resource allocation instruction carrying the first target resource according to the resource acquisition request, and send the resource allocation instruction to the second terminal device.

[0276] Optionally, the resource transfer instruction also carries first verification information, and the second terminal device 504 is further configured as follows:

[0277] Upon receiving the resource transfer instruction, the resource transfer instruction is verified according to the first verification information. If the verification passes, the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction is executed.

[0278] Optionally, the second terminal device 504 is further configured to:

[0279] Generate a resource acquisition verification factor for acquiring resources, and generate second verification information;

[0280] Based on the result of the resource transfer and the resource acquisition verification factor, a third verification information is generated, and the second verification information and the third verification information are carried in the resource acquisition request.

[0281] Optionally, the server 506 is further configured to:

[0282] The resource acquisition request is verified based on the third verification information carried in the resource acquisition request. If the verification passes, fourth verification information is generated based on the second verification information and the third verification information.

[0283] The fourth verification information is carried in the resource allocation instruction.

[0284] Optionally, the second terminal device 504 is further configured to:

[0285] The resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction. If the verification is successful, the operation step of transferring the first target resource to the first resource space of the target application according to the resource allocation instruction is executed.

[0286] Optionally, the second terminal device 504 is further configured to:

[0287] Upon receiving the resource transfer instruction, determine whether the resources in the first resource space are greater than or equal to the second target resource. If so, execute the operation step of transferring the second target resource from the first resource space to the second resource space.

[0288] Optionally, the second terminal device 504 is further configured to:

[0289] If the transfer of the second target resource is completed, determine whether the remaining resources in the first resource space are greater than a preset threshold. If not, generate a resource acquisition request for the first resource space.

[0290] Optionally, the second terminal device 504 is further configured to:

[0291] When transferring the second target resource in the first resource space to the second resource space, a first resource transfer response message carrying the fifth verification information is generated.

[0292] Send the first resource transfer response message to the server;

[0293] Accordingly, the server 506 is further configured as follows:

[0294] The first resource transfer response message is verified based on the fifth verification information carried in the received first resource transfer response message. If the verification passes, the resources in the first resource space are updated.

[0295] Optionally, the second terminal device 504 is further configured to:

[0296] In the case of transferring the first target resource to the first resource space of the target application, a second resource transfer response message carrying sixth verification information is generated;

[0297] Send the second resource transfer response message to the server;

[0298] Accordingly, the server 506 is further configured as follows:

[0299] The second resource transfer response message is verified based on the sixth verification information carried in the received second resource transfer response message. If the verification passes, the resources in the first resource space are updated.

[0300] Optionally, the second terminal device 504 is further configured to:

[0301] A third resource transfer response message is generated based on the third verification information;

[0302] Send the third resource transfer response message to the first terminal device;

[0303] Accordingly, the first terminal device 502 is further configured as follows:

[0304] Based on the received third resource transfer response message, generate and display the result of the resource transfer.

[0305] Optionally, the first terminal device 502 is further configured to:

[0306] Send an application selection instruction carrying the device identifier of the first terminal device to the second terminal device, and receive an application response message returned by the second terminal device;

[0307] Upon receiving the application response message, the resource transfer instruction is generated;

[0308] Accordingly, the second terminal device 504 is further configured as follows:

[0309] Based on the device identifier carried in the received application selection instruction, the corresponding target application is determined, and the application selection instruction is sent to the target application;

[0310] Obtain the application response message returned by the target application and send the application response message to the first terminal device.

[0311] Optionally, the second terminal device 504 is further configured to:

[0312] Receive a virtual card application request for the target application;

[0313] Upon receiving confirmation information for the virtual card application, the virtual card is allocated to the target application, and the virtual card is associated with the first resource space.

[0314] Optionally, the second terminal device 504 is further configured to:

[0315] Receive a request to return the virtual card;

[0316] Upon receiving a refund confirmation message for the virtual card, the virtual card data is deleted, and the association between the virtual card and the first resource space is severed.

[0317] The resource allocation system provided in this specification involves a first terminal device generating a resource transfer-out instruction and sending it to a second terminal device. The second terminal device receives the resource transfer-out instruction, transfers a second target resource from a first resource space to a second resource space according to the instruction, and generates a resource acquisition request for the first resource space based on the transfer result, sending the request to a server. The server receives the resource acquisition request, generates a resource allocation instruction carrying the first target resource to be allocated, and sends the allocation instruction to the second terminal device. The second terminal device receives the resource allocation instruction returned by the server and, according to the instruction, transfers the first target resource to the first resource space of the target application. In this scenario, since the resources allocated to the first resource space are intended for subsequent resource transfers, the actions of acquiring and transferring resources are interconnected. Therefore, if a resource transfer occurs in the first resource space, a resource acquisition operation can be automatically initiated based on the result of the transfer to request resources from the server. This eliminates the need for the user to initiate a separate resource acquisition operation, ensuring that there are always sufficient resources in the first resource space for resource transfers. This avoids situations where insufficient balance prevents consumption, making it easier for users and improving the user experience.

[0318] Figure 6 A structural block diagram of a computing device 600 according to an embodiment of this specification is shown. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.

[0319] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0320] In one embodiment of this specification, the above-described components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0321] The computing device 600 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 600 can also be a mobile or stationary server.

[0322] The processor 620 is used to execute the following computer-executable instructions:

[0323] If a resource transfer occurs in the first resource space of the target application, a resource acquisition request for the first resource space is generated.

[0324] The resource acquisition request is sent to the resource manager of the target application, and the resource allocation instruction returned by the resource manager in response to the resource acquisition request is received. The resource allocation instruction carries the first target resource to be allocated.

[0325] According to the resource allocation instruction, the first target resource is transferred to the first resource space of the target application.

[0326] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the resource allocation method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the resource allocation method described above.

[0327] This specification also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are used to implement the following method:

[0328] If a resource transfer occurs in the first resource space of the target application, a resource acquisition request for the first resource space is generated.

[0329] The resource acquisition request is sent to the resource manager of the target application, and the resource allocation instruction returned by the resource manager in response to the resource acquisition request is received. The resource allocation instruction carries the first target resource to be allocated.

[0330] According to the resource allocation instruction, the first target resource is transferred to the first resource space of the target application.

[0331] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the resource allocation method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the resource allocation method described above.

[0332] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0333] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0334] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this specification is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this specification. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this specification.

[0335] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0336] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. These embodiments have been selected and specifically described in this specification to better explain the principles and practical applications of this specification, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A resource allocation method, comprising: If a resource transfer occurs in the first resource space of the target application, a resource acquisition verification factor is generated to acquire the resource, and second verification information is generated. The resource acquisition verification factor refers to the identity verification information generated by the resource transferor after the resource transfer is completed. The second verification information is used to verify whether the identity of the resource manager is legitimate. Based on the result of the resource transfer and the resource acquisition verification factor, a third verification information is generated. The third verification information is used to verify whether the resource acquisition behavior is legal. The third verification information includes the identity verification information generated after the resource transfer and the resource transfer certificate. Based on the second and third verification information, a resource acquisition request is generated, which refers to a request to add resources to the first resource space; the resource acquisition request is sent to the resource manager of the target application, and a resource allocation instruction is received from the resource manager in response to the resource acquisition request. The resource allocation instruction carries a first target resource to be allocated and fourth verification information, wherein the fourth verification information is generated by the resource manager based on the second and third verification information; the resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction, and if the verification passes, the first target resource is transferred to the first resource space of the target application.

2. The resource allocation method according to claim 1, before generating the resource acquisition verification factor for acquiring resources and generating the second verification information, further comprising: Receive a resource transfer instruction sent by a resource recipient, wherein the resource transfer instruction carries a second target resource to be transferred; According to the resource transfer instruction, the second target resource in the first resource space is transferred to the second resource space, where the second resource space is the resource space corresponding to the resource recipient. If the transfer of the second target resource is completed, it is determined that a resource transfer of the first resource space has been detected.

3. The resource allocation method according to claim 2, wherein the resource transfer-out instruction further carries first verification information, and after receiving the resource transfer-out instruction sent by the resource receiver, it further includes: The resource transfer instruction is verified based on the first verification information. If the verification passes, the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction is executed.

4. The resource allocation method according to claim 2, further comprising, after receiving the resource transfer instruction sent by the resource recipient: Determine whether the resources in the first resource space are greater than or equal to the second target resource. If so, execute the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction.

5. The resource allocation method according to claim 2, further comprising, after transferring the second target resource from the first resource space to the second resource space: Generate a first resource transfer response message carrying the fifth verification information; Send the first resource transfer response message to the resource manager.

6. The resource allocation method according to claim 1, after generating third verification information based on the resource transfer result and the resource acquisition verification factor, further comprising: A third resource transfer response message is generated based on the third verification information; The third resource transfer response message is sent to the resource recipient.

7. The resource allocation method according to claim 1, further comprising: Receive a virtual card application request for the target application; Upon receiving confirmation information for the virtual card application, the virtual card is created for the target application, and the virtual card is associated with the first resource space.

8. The resource allocation method according to claim 7 further includes: Receive a request to return the virtual card; Upon receiving a refund confirmation message for the virtual card, the virtual card data is deleted, and the association between the virtual card and the first resource space is severed.

9. A resource allocation device, applied to a second terminal device, comprising: The first generation module is configured to generate a resource acquisition verification factor for acquiring resources and generate second verification information when the first resource space of the target application is detected to have been transferred out. The resource acquisition verification factor refers to the identity verification information generated by the resource transferor after transferring out the resources. The second verification information is used to verify whether the identity of the resource manager is legitimate. The second generation module is configured to generate third verification information based on the result of resource transfer and the resource acquisition verification factor. The third verification information is used to verify whether the resource acquisition behavior is legal. The third verification information includes identity verification information generated after resource transfer and the resource transfer certificate. The third generation module is configured to generate a resource acquisition request based on the second verification information and the third verification information, wherein the resource acquisition request refers to a request to add resources in the first resource space; send the resource acquisition request to the resource manager of the target application, and receive a resource allocation instruction returned by the resource manager in response to the resource acquisition request, wherein the resource allocation instruction carries a first target resource to be allocated and fourth verification information, wherein the fourth verification information is generated by the resource manager based on the second verification information and the third verification information; verify the resource allocation instruction according to the fourth verification information carried in the resource allocation instruction, and if the verification passes, transfer the first target resource to the first resource space of the target application.

10. A resource allocation system, the system comprising a first terminal device and a second terminal device configured with a target application, wherein the first terminal device and the second terminal device establish a communication connection; The first terminal device is configured to generate a resource transfer instruction and send the resource transfer instruction to the second terminal device, wherein the resource transfer instruction carries a second target resource to be transferred. The second terminal device is configured to receive the resource transfer instruction, and according to the resource transfer instruction, transfer the second target resource in the first resource space to the second resource space, where the first resource space is the resource space corresponding to the target application, and the second resource space is the resource space corresponding to the first terminal device; based on the result of the resource transfer, generate a resource acquisition verification factor for acquiring the resource, and generate second verification information, where the resource acquisition verification factor refers to the identity verification information generated by the resource transferor after transferring the resource, and the second verification information is used to verify whether the identity of the resource manager is legitimate; based on the result of the resource transfer and the resource acquisition verification factor, generate third verification information, where the third verification information is used to verify whether the resource acquisition behavior is legitimate, wherein... The third verification information includes authentication information generated after resource transfer and a resource transfer credential; based on the second and third verification information, a resource acquisition request is generated, which refers to a request to add resources to the first resource space; the resource acquisition request is sent to the resource manager of the target application, and a resource allocation instruction is received from the resource manager in response to the resource acquisition request, the resource allocation instruction carrying a first target resource to be allocated and fourth verification information, wherein the fourth verification information is generated by the resource manager based on the second and third verification information; the resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction, and if the verification passes, the first target resource is transferred to the first resource space of the target application.

11. The resource allocation system according to claim 10, wherein the resource transfer instruction further carries first verification information, and the second terminal device is further configured to: Upon receiving the resource transfer instruction, the resource transfer instruction is verified according to the first verification information. If the verification passes, the operation step of transferring the second target resource in the first resource space to the second resource space according to the resource transfer instruction is executed.

12. The resource allocation system according to claim 10, wherein the second terminal device is further configured as follows: Upon receiving the resource transfer instruction, determine whether the resources in the first resource space are greater than or equal to the second target resource. If so, execute the operation step of transferring the second target resource from the first resource space to the second resource space.

13. The resource allocation system according to claim 10, wherein the system further includes a server for the resource management business of the target application; the second terminal device is further configured to: When transferring the second target resource in the first resource space to the second resource space, a first resource transfer response message carrying the fifth verification information is generated. Send the first resource transfer response message to the server; Accordingly, the server is further configured as follows: The first resource transfer response message is verified based on the fifth verification information carried in the received first resource transfer response message. If the verification passes, the resources in the first resource space are updated.

14. The resource allocation system according to claim 10, wherein the second terminal device is further configured as follows: A third resource transfer response message is generated based on the third verification information; Send the third resource transfer response message to the first terminal device; Accordingly, the first terminal device is further configured as follows: Based on the received third resource transfer response message, generate and display the result of the resource transfer.

15. The resource allocation system according to claim 10, wherein the first terminal device is further configured as follows: Send an application selection instruction carrying the device identifier of the first terminal device to the second terminal device, and receive an application response message returned by the second terminal device; Upon receiving the application response message, the resource transfer instruction is generated; Accordingly, the second terminal device is further configured as follows: Based on the device identifier carried in the received application selection instruction, the corresponding target application is determined, and the application selection instruction is sent to the target application; Obtain the application response message returned by the target application and send the application response message to the first terminal device.

16. The resource allocation system according to claim 10, wherein the second terminal device is further configured as follows: Receive a virtual card application request for the target application; Upon receiving confirmation information for the virtual card application, the virtual card is allocated to the target application, and the virtual card is associated with the first resource space.

17. The resource allocation system according to claim 16, wherein the second terminal device is further configured as follows: Receive a request to return the virtual card; Upon receiving a refund confirmation message for the virtual card, the virtual card data is deleted, and the association between the virtual card and the first resource space is severed.

18. A resource allocation method, comprising: The first terminal device generates a resource transfer instruction and sends the resource transfer instruction to the second terminal device. The resource transfer instruction carries the second target resource to be transferred. The second terminal device receives the resource transfer instruction and, according to the instruction, transfers the second target resource in the first resource space to the second resource space. The first resource space is the resource space corresponding to the target application, and the second resource space is the resource space corresponding to the first terminal device. Based on the resource transfer result, a resource acquisition verification factor is generated for acquiring the resource, and second verification information is generated. The resource acquisition verification factor refers to the identity verification information generated by the resource transferor after transferring the resource. The second verification information is used to verify whether the identity of the resource manager is legitimate. Based on the resource transfer result and the resource acquisition verification factor, third verification information is generated. The third verification information is used to verify whether the resource acquisition behavior is legitimate, wherein the third verification information includes the verification information generated after the resource transfer. The system generates authentication information and a resource transfer credential; it generates a resource acquisition request based on the second and third verification information, wherein the resource acquisition request refers to a request to add resources to the first resource space; it sends the resource acquisition request to the resource manager of the target application and receives a resource allocation instruction returned by the resource manager in response to the resource acquisition request, wherein the resource allocation instruction carries a first target resource to be allocated and fourth verification information, wherein the fourth verification information is generated by the resource manager based on the second and third verification information; it verifies the resource allocation instruction based on the fourth verification information carried in the resource allocation instruction, and if the verification passes, it transfers the first target resource to the first resource space of the target application.

19. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method: If a resource transfer occurs in the first resource space of the target application, a resource acquisition verification factor is generated to acquire the resource, and second verification information is generated. The resource acquisition verification factor refers to the identity verification information generated by the resource transferor after the resource transfer is completed. The second verification information is used to verify whether the identity of the resource manager is legitimate. Based on the result of the resource transfer and the resource acquisition verification factor, a third verification information is generated. The third verification information is used to verify whether the resource acquisition behavior is legal. The third verification information includes the identity verification information generated after the resource transfer and the resource transfer certificate. Based on the second and third verification information, a resource acquisition request is generated, which refers to a request to add resources to the first resource space; the resource acquisition request is sent to the resource manager of the target application, and a resource allocation instruction is received from the resource manager in response to the resource acquisition request. The resource allocation instruction carries a first target resource to be allocated and fourth verification information, wherein the fourth verification information is generated by the resource manager based on the second and third verification information; the resource allocation instruction is verified according to the fourth verification information carried in the resource allocation instruction, and if the verification passes, the first target resource is transferred to the first resource space of the target application.

20. A computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the resource allocation method according to any one of claims 1 to 8.