Resource conversion method and device

Through the resource conversion request and update mechanism between the terminal device and the server, the problem of inflexible resource storage in the terminal device is solved, flexible resource management in different usage scenarios is realized, and the user experience is improved.

CN118586903APending Publication Date: 2024-09-03SHENZHEN DACHENG COMM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410640005.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the existing technology, the storage method of terminal devices for resources is inflexible and cannot meet the resource usage needs of users in different usage scenarios, resulting in poor user experience.

Method used

The terminal device sends a conversion request to the server, instructing the server to convert the resources stored in the terminal device into the resources stored in the server according to the resource information or vice versa, to update the resources stored in the security module of the server and the terminal device to achieve flexible conversion and update of resources.

Benefits of technology

It improves the flexibility of resource storage, meets users' resource usage needs in different usage scenarios, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586903A
    Figure CN118586903A
Patent Text Reader

Abstract

According to the resource conversion method and device provided by the invention, flexible resource conversion is realized, the flexibility of resource storage is improved, and the user experience is good. The method comprises: a terminal device sends a conversion request to a server, the conversion request comprising to-be-converted resource information, the conversion request being used for instructing the server to convert the to-be-converted resource information according to the to-be-converted resource information; converting at least part of the first resource stored in the terminal equipment into a second resource or converting at least part of the second resource stored in the server into the first resource, wherein the conversion request is also used for instructing the server to update the stored second resource; and updating the first resource stored in the security module of the terminal device based on the target instruction sent by the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource conversion method and device. Background Art

[0002] With the development of terminal technology, users can use terminal devices to bring many conveniences to their lives. For example, they can use terminal devices to obtain, use, and manage various resources needed in life. However, the current storage method for the above resources is not flexible, resulting in the above resources not being able to meet the user's resource usage needs in different usage scenarios, resulting in a poor experience.

[0003] Therefore, there is an urgent need for a method that can improve the flexibility of resource storage. Summary of the invention

[0004] The present application provides a resource conversion method and device, which realizes flexible resource conversion, improves the flexibility of resource storage, and provides a good user experience.

[0005] In a first aspect, a resource conversion method is provided, using a terminal device, the method comprising: sending a conversion request to a server, the conversion request comprising resource information to be converted, the conversion request being used to instruct the server to convert at least part of the first resource stored in the terminal device into a second resource or to convert at least part of the second resource stored in the server into the first resource according to the resource information to be converted, the conversion request being also used to instruct the server to update the stored second resource; and updating the first resource stored in the security module of the terminal device based on the target instruction sent by the server.

[0006] In a second aspect, a resource conversion method is provided, an application server, the method comprising: receiving a conversion request sent by a terminal device, the conversion request comprising resource information to be converted; according to the above-mentioned resource information to be converted, converting at least part of the first resource stored in the terminal device into a second resource or converting at least part of the second resource stored in the server into the first resource, and updating the second resource stored in the server; sending a target instruction to the terminal device, the target instruction is used to instruct the terminal device to update the first resource stored in the security module of the terminal device based on the above-mentioned target instruction.

[0007] In the present application, the terminal device sends a conversion request to the server, the conversion request includes the resource information to be converted, and the conversion request is used to instruct the above-mentioned server to convert at least part of the first resource stored in the terminal device into the second resource or convert at least part of the second resource stored in the above-mentioned server into the first resource according to the above-mentioned resource information to be converted, and update the second resource stored in the server; the terminal device receives the target instruction sent by the above-mentioned server, and based on the target instruction, updates the first resource stored in the security module of the terminal device. In the embodiment of the present application, the first resource stored in the terminal device and the second resource stored in the server can be converted to each other, realizing flexible resource conversion, improving the flexibility of resource storage, meeting the resource usage needs of traffic users in different usage scenarios, and providing good user experience.

[0008] In a third aspect, a terminal device is provided, comprising: a sending module and a processing module. The sending module is used to send a conversion request to a server, wherein the conversion request includes resource information to be converted, and the conversion request is used to instruct the server to convert at least part of the first resource stored in the terminal device into a second resource or convert at least part of the second resource stored in the server into the first resource according to the resource information to be converted, and the conversion request is also used to instruct the server to update the stored second resource; the processing module is used to update the first resource stored in the security module of the terminal device based on the target instruction sent by the server.

[0009] In a fourth aspect, a server is provided, comprising: a receiving module and a processing module. The receiving module is used to receive a conversion request sent by a terminal device, wherein the conversion request includes the resource information to be converted; the processing module is used to convert at least part of the first resource stored in the terminal device into the second resource or convert at least part of the second resource stored in the server into the first resource according to the resource information to be converted, and update the second resource stored in the server; and send the target instruction to the terminal device, wherein the target instruction is used to instruct the terminal device to update the first resource stored in the security module of the terminal device based on the target instruction.

[0010] In a fifth aspect, another resource conversion device is provided, including a processor, the processor is coupled to a memory, and can be used to execute instructions in the memory to implement the method in any possible implementation of the first aspect or the second aspect. Optionally, the resource conversion device also includes a memory. Optionally, the resource conversion device also includes a communication interface, and the processor is coupled to the communication interface.

[0011] In a sixth aspect, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect or the second aspect.

[0012] In the specific implementation process, the processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.

[0013] In a seventh aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect or the second aspect.

[0014] Optionally, there are one or more processors and one or more memories.

[0015] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0016] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0017] It should be understood that the relevant data interaction process, such as sending indication information, can be a process of outputting indication information from a processor, and receiving capability information can be a process of receiving input capability information from a processor. Specifically, the processed output data can be output to a transmitter, and the input data received by the processor can come from a receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.

[0018] The processing device in the seventh aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0019] In an eighth aspect, a computer program product is provided, comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect or the second aspect.

[0020] In the ninth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions). When the computer-readable storage medium is run on a computer, the computer executes a method in any possible implementation of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of the system architecture of a terminal device provided in an embodiment of the present application;

[0023] Figure 3 is a schematic flow chart of a resource conversion method provided in an embodiment of the present application;

[0024] Figure 4 is a schematic flow chart of a first specific example of a resource conversion method provided in an embodiment of the present application;

[0025] Figure 5 is a schematic flow chart of a second specific example of the resource conversion method provided in an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0027] Figure 7 is a schematic flow chart of a third specific example of the resource conversion method provided in an embodiment of the present application;

[0028] Figure 8 is a schematic flow chart of a fourth specific example of the resource conversion method provided in an embodiment of the present application;

[0029] Fig. 9 is a schematic flow chart of a fifth specific example of the resource conversion method provided in an embodiment of the present application;

[0030] Fig.10 is a schematic flow chart of a sixth specific example of the resource conversion method provided in an embodiment of the present application;

[0031] Fig.11 is a schematic flow chart of a seventh specific example of the resource conversion method provided in an embodiment of the present application;

[0032] Fig.12 is a schematic flow chart of an eighth specific example of the resource conversion method provided in an embodiment of the present application;

[0033] Fig.13 It is a schematic diagram of an interface of a terminal device for resource conversion provided in an embodiment of the present application;

[0034] Fig.14 is a schematic diagram of an interface of another terminal device for resource conversion provided in an embodiment of the present application;

[0035] Fig.15 is a schematic flow chart of a ninth specific example of the resource conversion method provided in an embodiment of the present application;

[0036] Fig.16 is a schematic flow chart of a tenth specific example of the resource conversion method provided in an embodiment of the present application;

[0037] Fig.17 is a schematic block diagram of a terminal device provided in an embodiment of the present application;

[0038] Fig.18 is a schematic block diagram of a server provided in an embodiment of the present application;

[0039] Fig.19 It is a schematic block diagram of a resource conversion device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0041] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0042] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0043] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0044] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0045] In order to make the purpose and technical solution of this application clearer and more intuitive, the resource conversion method and device provided by the embodiment of this application will be described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit this application.

[0046] With the development of terminal technology, users can use terminal devices to bring many conveniences to their lives, such as obtaining, using and managing various resources needed in life through terminal devices.

[0047] Figure 1 Schematic diagram of an application scenario 100 provided in an embodiment of the present application. Figure 1 As shown, the application scenario 100 includes a terminal device 101 and a server 102. The above resources can be stored in the terminal device 101, so that the user can use the resources stored in the terminal device 101 offline only through the terminal device 101. Alternatively, the above resources can also be stored in the server 102, so that the user can interact with the server 102 through the terminal device 101 to use the resources in the server 102 online. It should be understood that the use of the above resources can be achieved through the near field communication technology (NFC) evolved from the integration of contactless radio frequency identification (RFID) and interconnection technology.

[0048] For example, taking the above resource as virtual money, in the existing NFC smart card system, the balance of virtual money used for transactions can be stored in an embedded security element (embeddedSE, eSE) through the instructions of the above server 102, or only write the card number and key information in the eSE, and the balance of the above virtual money is placed in the cloud database (i.e., server 102). The eSE is a built-in security chip (referred to as a security module in this application), which can be used for payment security verification, and mobile payment can be realized in conjunction with NFC. Among them, in the case where the balance of virtual money is stored in the eSE, since the stored balance of virtual money can be used to realize transactions without network connection, transaction verification and deduction operations can be performed at the chip level, the response speed is usually faster, and hardware-level security protection can be provided, and the security is also higher. In the case where the balance of virtual money is stored in the cloud, the cloud storage space is larger and can accommodate a large amount of balance information. Compared with storage in the eSE, there is no problem of loss or damage of the smart card affecting normal use and security risks.

[0049] However, the current storage method for the above resources is not flexible, resulting in the above resources may not meet the user's resource usage needs in different usage scenarios, resulting in a poor experience.

[0050] For example, taking the above-mentioned resource as virtual money as an example, when the balance of virtual money exists in eSE, although the terminal device 101 can directly use the balance of virtual money stored in the eSE to realize transactions without the need for a network. However, in real transactions, there may be problems that offline transactions cannot be supported, such as the absence of a payment device that can be used for offline transactions, resulting in the inability to trade and a poor user experience. In addition, the storage capacity corresponding to this method is also limited, and there may be problems that limit the functions and scope of application of smart cards. In addition, if the smart card is lost or damaged, the stored balance may also be permanently lost and cannot be recovered. When the balance of virtual money exists in the cloud, although the terminal device 101 can also realize transactions, this situation requires dependence on the network. If the network is unstable or cannot be connected, it may cause the terminal device 101 and the server 102 to be unable to interact, making the transaction impossible or delayed, and the user experience is poor.

[0051] The embodiment of the present application provides a resource conversion method and device, wherein a terminal device sends a conversion request to a server, the conversion request includes resource information to be converted, and the server 102 receives the conversion request sent by the terminal device 101, and can convert at least part of the first resource stored in the terminal device 101 into a second resource or convert at least part of the second resource stored in the server 102 into a first resource according to the resource information to be converted included in the conversion request, and update the second resource stored in the server 102; and receive the target instruction sent by the server 102, and based on the target instruction, update the first resource stored in the security module of the terminal device 101. In other words, the present application can convert the resources stored in the terminal device 101 and the resources stored in the server 102 to each other, realize flexible resource conversion, improve the flexibility of resource storage, meet the resource usage needs of users in different usage scenarios, and provide good user experience.

[0052] It should be understood that the resources in the present application may include, in addition to the virtual money that can be recharged by the user as shown above, virtual resources for daily use recharged by the user, such as virtual water resources corresponding to domestic water use, virtual electricity resources corresponding to domestic electricity use, virtual electricity resources corresponding to domestic gas use, virtual resources for vehicle use recharged by the user, such as virtual gas resources, virtual oil resources, etc., as well as other service-related virtual resources recharged by the user, such as virtual time resources that can be used for vehicle parking, investment insurance and other virtual service resources. The present application does not limit this.

[0053] The terminal device involved in the embodiments of the present application may be a mobile phone, a watch, a laptop computer, a PDA, a mobile internet device (MID), a personal computer (PC), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in self-driving, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a personal digital assistant (PDA), etc., and the embodiments of the present application are not limited to this.

[0054] For example, Figure 2 A schematic diagram of the system architecture of a terminal device provided in an embodiment of the present application.

[0055] like Figure 2As shown, the terminal device includes a processor 210, a transceiver 220 and a display unit 270. The display unit 270 may include a display screen.

[0056] Optionally, the terminal device may further include a memory 230. The processor 210, the transceiver 220 and the memory 230 may communicate with each other through an internal connection path to transfer data. The memory 230 is used to store a computer program, and the processor 210 is used to call and run the computer program from the memory 230. The processor 210 and the memory 230 may be combined into a processing device, or more commonly, they are independent components. The processor 210 is used to execute the program code stored in the memory 230 to implement the above functions. In specific implementation, the memory 230 may also be integrated into the processor 210, or may be independent of the processor 210.

[0057] In addition, in order to make the functions of the terminal device more complete, the terminal device may further include one or more of an input unit 260 , an audio circuit 280 , and a sensor 201 .

[0058] Optionally, the terminal device may further include a power supply 250 for providing power to various devices or circuits in the terminal device.

[0059] Understandably, Figure 2 The operations and / or functions of each module in the terminal device shown are respectively for implementing the corresponding processes in the following method embodiments. For details, please refer to the description in the following method embodiments. To avoid repetition, detailed description is appropriately omitted here.

[0060] Understandably, Figure 2 The processor 210 in the terminal device shown may include one or more processing units, for example: the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0061] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0062] Understandably, Figure 2The power supply 250 shown is used to power the processor 210, the memory 230, the display unit 270, the input unit 260 and the transceiver 220. The transceiver 220 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to the terminal device. The transceiver 220 can be one or more devices integrating at least one communication processing module. The display unit 270 is used to display images, videos, etc. The display unit 270 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. The memory 230 may be used to store computer executable program codes, and the executable program codes include instructions. The memory 230 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function, etc. The data storage area may store data created during the use of the terminal device, etc. In addition, the memory 230 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functional applications and data processing of the terminal device by running instructions stored in the memory 230 and / or instructions stored in the memory set in the processor. The terminal device can implement audio functions through the audio circuit 280 and the application processor, such as music playback, recording, etc.

[0063] Figure 3is a schematic flow chart of a resource conversion method 300 provided in an embodiment of the present application. The method 300 can be applied to Figure 1 In the application scenario 100 shown in FIG. 1 , the method 300 can also be applied to other application scenarios, which are not limited in the present application.

[0064] like Figure 3 As shown, the method 300 may include the following steps:

[0065] S301, the terminal device sends a conversion request to the server. Correspondingly, the server receives the conversion request sent by the terminal device, and the conversion request includes resource information to be converted.

[0066] It should be understood that the terminal device can send a conversion request to the server, which can be used to instruct the server to convert at least part of the first resource stored in the terminal device into the second resource or convert at least part of the second resource stored in the server into the first resource based on the resource information to be converted, and update the second resource stored in the server.

[0067] It should also be understood that the terminal device may include a security module for storing resources (such as the first resource) that can be used offline (without a network). The above-mentioned server is used to store resources (such as the second resource) that can be used online, that is, the terminal device can use the resources stored in the server when there is a network connection with the server.

[0068] In some embodiments, the conversion request shown above may also include a conversion method, which may include a first conversion method or a second conversion method to enable efficient resource conversion. The first conversion method is used to indicate that the first resource stored in the terminal device is converted into the second resource, and the second conversion method is used to indicate that the second resource stored in the server is converted into the first resource.

[0069] In some embodiments, the resource information to be converted included in the conversion request may also include a resource type corresponding to the resource to be converted, and the resource type may include a first type corresponding to the first resource or a second type corresponding to the second resource, so as to achieve efficient resource conversion. The first type is used to indicate that the first resource stored in the terminal device is converted to the second resource, and the second type is used to indicate that the second resource stored in the server is converted to the first resource.

[0070] In some embodiments, the resource information to be converted also includes a target resource amount corresponding to the resource to be converted, and the conversion request is used to instruct the server to convert the first resource of the target resource amount stored in the terminal device into a second resource or convert the second resource of the target resource amount stored in the server into a first resource, and update the second resource stored in the server. In other words, the present application can realize the conversion of part or all of the first resource stored in the terminal device into the second resource, or the conversion of part or all of the second resource stored in the server into the first resource. It should be understood that the above-mentioned target resource amount can be preset or set by user operation, and the present application does not limit this.

[0071] In one embodiment, the resource information to be converted may be first resource information corresponding to a first resource to be converted, and the first resource to be converted may be at least part of the first resource stored by a security module of a terminal device. Alternatively, the resource information to be converted may also be second resource information corresponding to a second resource to be converted, and the second resource to be converted may be at least part of the second resource stored by a server. Wherein, in the case where the above-mentioned conversion request includes the first resource information corresponding to the first resource to be converted, the conversion request may be used to instruct the server to convert at least part of the first resource stored by the terminal device into the second resource. Alternatively, in the case where the above-mentioned conversion request includes the second resource information corresponding to the second resource to be converted, the conversion request may be used to instruct the terminal device to convert at least part of the second resource stored by the server into the first resource.

[0072] Exemplarily, in the case where the security module of the terminal device stores the first resource, the terminal device can achieve offline use of the first resource. However, in the case where there is no device that can support offline use of resources, the terminal device can send a conversion request to the server to instruct the server to convert at least part of the first resource stored in the security module into a second resource stored in the server to achieve online use of the resource. Alternatively, in the case where the server stores the second resource, the terminal device can achieve online use of the second resource. However, in the case where there is no device that can support online use of resources, the terminal device can send a conversion request to the server to instruct the server to convert at least part of the second resource stored in the server into the first resource stored in the security module of the terminal device to achieve offline use of the resource.

[0073] It should be understood that the above-mentioned resources can be different virtual resources, such as virtual money recharged by users, virtual resources used by users in daily life, such as virtual water resources corresponding to domestic water, virtual electricity resources corresponding to domestic electricity, virtual electricity resources corresponding to domestic gas, virtual resources used by users' vehicles, such as virtual gas resources, virtual oil resources, etc., as well as service-related virtual resources, such as virtual time resources that can be used for vehicle parking, virtual service resources such as investment insurance, etc. This application does not limit this.

[0074] In a possible case, the first resource and the second resource are virtual resources of the same type.

[0075] Exemplarily, in the case where the security module of the terminal device stores the balance of virtual money, the terminal device can realize offline payment of the balance of the virtual money. However, in the case where there is no device that supports offline payment, the terminal device can send a conversion request to the server to instruct the server to convert the balance of the virtual money stored in the security module into the balance of the virtual money stored in the server, so as to realize the online payment of the balance of the virtual money. Alternatively, in the case where the server stores the balance of virtual money, the terminal device can realize the online payment of the balance of the virtual money. However, in the case where there is no device that supports online payment, the terminal device can send a conversion request to the server to instruct the server to convert the balance of the virtual money stored in the server into the balance of the virtual money stored in the security module of the terminal device, so as to complete the transaction by paying the balance of the virtual money offline.

[0076] Exemplarily, offline charging can be achieved when the security module of the terminal device stores virtual electric resources. However, in the absence of equipment that can support offline charging (such as a power outage at home), the terminal device can send a conversion request to the server to instruct the server to convert the virtual electric resources stored in the security module into virtual electric resources stored on the server to achieve network charging. Alternatively, when the user stores the above-mentioned virtual electric resources on the server, the terminal device can be charged online. In the presence of equipment that can achieve offline charging, the user can also convert the virtual electric resources stored on the server into virtual electric resources stored in the security module to achieve more convenient offline charging. It should be understood that the above-mentioned stored virtual electric resources are virtual degrees of usable electric resources, and the corresponding recharge degree is deducted for each recharge.

[0077] Exemplarily, in the case where the security module of the terminal device stores virtual oil resources, after the vehicle is refueled, the terminal device can realize offline refueling based on the stored virtual oil resources, that is, deduct the actual amount of oil added by the vehicle each time from the virtual oil resources stored in the security module. However, in the case where there is no device that can support offline refueling, the terminal device can send a conversion request to the server to instruct the server to convert the virtual oil resources stored in the security module into virtual oil resources stored in the server, so as to refuel through the network, that is, deduct the actual amount of oil added by the vehicle each time from the virtual oil resources stored in the server. Alternatively, in the case where the user stores virtual oil resources in the server, the terminal device can realize online refueling based on the virtual oil resources stored in the server. In the case where there is a device that can realize offline refueling, the user can also convert the virtual oil resources stored in the server into virtual oil resources stored in the security module to realize more convenient offline refueling. It should be understood that the above-mentioned stored virtual oil resources are virtual oil amounts of available oil resources, and the corresponding amount of oil is deducted after each refueling of the vehicle.

[0078] In another possible case, the first resource and the second resource are virtual resources of different types.

[0079] For example, in the case where the security module of the terminal device stores virtual oil resources, after the vehicle is refueled, the terminal device can realize offline refueling based on the stored virtual oil resources, that is, deduct the actual amount of oil added by the vehicle each time from the virtual oil resources stored in the security module. However, in the case where the user wants to realize online balance payment, the terminal device can also send a conversion request to the server to instruct the server to convert the virtual oil resources stored in the security module into the balance of virtual money stored in the server, so as to realize online payment through the balance of virtual money. Alternatively, in the case where the user stores the balance of virtual money in the server, the terminal device can realize online payment based on the balance of virtual money stored in the server. Alternatively, the user can also convert the balance of virtual money stored in the server into the virtual oil resources stored in the security module to realize offline refueling.

[0080] It should be understood that the above conversion request may be sent by the terminal device in response to a resource conversion operation.

[0081] Exemplarily, the terminal device may display a resource conversion interface, and the resource conversion operation may be a user operation on the resource conversion interface, or the resource conversion operation may be a user operation on a physical / virtual key for resource conversion.

[0082] It should be understood that the above conversion request may also be sent by the terminal device when it is determined that the reference information meets the conversion condition.

[0083] Exemplarily, the reference information may include at least one of a current location, a current network quality, a current resource amount, etc., where the current resource amount is the current resource amount of the resource requested to be converted.

[0084] In the case where the reference information is the current location, the conversion condition may be that the current location is the target geographic location. That is, before sending the conversion request, the terminal device may determine whether the current location is the target geographic location, and the target geographic location may be a preset location where resource conversion can be performed, or a location where a historical resource conversion event occurred, so as to avoid the terminal device performing resource conversion in a non-target geographic location, resulting in resource conversion failure or resource loss.

[0085] In the case where the above-mentioned reference information is the current network quality, the above-mentioned conversion condition can be that the current network quality is higher than the network quality threshold. That is, before sending the above-mentioned conversion request, the terminal device can determine whether the current network quality is greater than the network quality threshold, so as to avoid the terminal device performing resource conversion in an environment with poor network quality, resulting in resource conversion failure or error, such as due to network quality problems, the interaction between the server and the terminal device is affected, the terminal device does not receive the target instruction of the server in time, and the first resource to be converted stored in the security module of the terminal device is not updated, so that the resource to be converted is valid on both the terminal device side and the server side.

[0086] In the case where the reference information is the current resource amount, the conversion condition may be that the current resource amount is greater than or equal to the resource amount threshold. That is, the terminal device may determine whether the current resource amount is greater than or equal to the resource amount threshold before sending the conversion request, so as to avoid the converted resource being too low and affecting user use.

[0087] It should be understood that, in the case where the conversion request indicates that the first resource stored in the security module of the terminal device is converted into the second resource, the current resource amount here may be the resource amount of the first resource stored in the security module of the terminal device, so as to avoid the resource amount of the first resource stored in the security module of the terminal device being too low after the conversion, resulting in the user being unable to use the first resource when the resource needs to be used offline, such as insufficient to pay the transaction amount, etc. Alternatively, in the case where the conversion request indicates that the second resource stored in the server is converted into the first resource, the current resource amount here may also be the resource amount of the second resource stored in the server, so as to avoid the resource amount of the first resource stored in the security module of the terminal device being too low after the conversion, resulting in the user being unable to use the second resource when the resource needs to be used online, such as insufficient to pay the transaction amount, etc.

[0088] S302: The server converts at least part of the first resources stored in the terminal device into the second resources or converts at least part of the second resources stored in the server into the first resources according to the resource information to be converted, and updates the second resources stored in the server.

[0089] It should be understood that the server can obtain at least part of the first resource stored in the terminal device according to the received resource information to be converted, and convert the at least part of the first resource into the second resource, and the conversion request is also used to instruct the server to update the stored second resource, that is, the server can store the converted second resource in the server to update the second resource stored in the server. Alternatively, the server can obtain at least part of the second resource stored in the server according to the received resource information to be converted, and the conversion request is also used to instruct the server to update the stored second resource, that is, the server can deduct the part of the second resource stored in the server to update the second resource stored in the server, and then convert the part of the second resource into the first resource.

[0090] S303, the server sends a target instruction to the terminal device. Correspondingly, the terminal device receives the target instruction.

[0091] In some embodiments, when the server completes the resource conversion, a target instruction may be sent to the terminal device, and the target instruction may be used to instruct the terminal device to update the first resource stored in the security module. After receiving the target instruction sent by the server, the terminal device may update the first resource stored in the security module of the terminal device according to the target instruction.

[0092] S304: The terminal device updates the first resource stored in the security module of the terminal device based on the target instruction.

[0093] Optionally, when converting a first resource into a second resource, the target instruction may carry a completion flag, which may be an flag representing the completion of the resource conversion. The terminal device may then, according to the target instruction, deduct the converted first resource from the first resource stored in the security module to update the first resource.

[0094] Optionally, when converting the second resource into the first resource, the target instruction may carry a completion flag, which may be an identifier representing the completion of the resource conversion. The terminal device may then, according to the target instruction, add / write the converted second resource based on the first resource stored in the security module to update the first resource.

[0095] In the present application, the terminal device sends a conversion request to the server, the conversion request includes resource information to be converted, and the conversion request is used to instruct the above-mentioned server to convert at least part of the first resource stored in the terminal device into the second resource or convert at least part of the second resource stored in the above-mentioned server into the first resource according to the above-mentioned resource information to be converted, and update the second resource stored in the server; the terminal device receives the target instruction sent by the above-mentioned server, and updates the first resource stored in the security module of the terminal device based on the target instruction. In the embodiment of the present application, the first resource stored in the terminal device and the second resource stored in the server can be converted to each other, which realizes flexible resource conversion, improves the flexibility of resource storage, meets the resource usage needs of users in different usage scenarios, and provides good user experience.

[0096] It should be understood that, in the case where the above-mentioned terminal device can send a first conversion request to the server, the first conversion request may include the first resource information corresponding to the above-mentioned first resource to be converted. The server can convert the above-mentioned first resource to be converted stored in the terminal device into a second resource according to the first resource information, that is, realize the conversion from the first resource to the second resource, so that the storage location of the first resource to be converted can be converted from the security module to the server, so as to meet the user's demand for online use of resources in a networked scenario. The server also updates the second resource stored in the server according to the second resource obtained by the conversion, and sends a first target instruction to the terminal device, the first target instruction is used to instruct the terminal device to configure the above-mentioned first resource to be converted stored in the security module of the terminal device to an invalid state based on the first target instruction, so as to avoid that after the resource conversion is completed, the above-mentioned first resource to be converted is still valid on the terminal device side in addition to being valid on the server side, resulting in a conversion error.

[0097] Figure 4 4 is a schematic flow chart of a resource conversion method 400 for converting a first resource stored in a security module of a terminal device into a second resource stored in a server, provided in an embodiment of the present application. Figure 4 As shown, the method 400 may include the following steps:

[0098] S401, the terminal device sends a first conversion request to the server. Correspondingly, the server receives the first conversion request sent by the terminal device, where the first conversion request includes first resource information corresponding to the first resource to be converted.

[0099] It should be understood that the first conversion request may be used to instruct to convert the first resource to be converted stored in the security module of the terminal device into the second resource.

[0100] Exemplarily, the above resources may be different virtual resources, such as virtual money recharged by users, virtual resources used by users on a daily basis, virtual resources used by users' vehicles, and service-type virtual resources, which are not limited in the present application.

[0101] S402: The server converts the first resource to be converted into a second resource, updates the second resource stored in the server according to the converted second resource, and generates a first target instruction.

[0102] Exemplarily, the server may convert the resource type (such as the first type) of the first resource to be converted into a second type that is the same as the resource type of the second resource. It should be understood that since at least part of the first resource on the terminal device side is converted into the second resource, the resource amount of the second resource obtained by updating the second resource stored in the server according to the converted second resource is increased compared to the resource amount of the second resource before the update.

[0103] S403: The server generates a first target instruction and sends the first target instruction to the terminal device. Correspondingly, the terminal device receives the first target instruction sent by the server.

[0104] It should be understood that in order to avoid the server converting the first resource to be converted into the second resource, and when it takes effect on the server side, the first resource to be converted is still valid on the terminal device side, resulting in a change in the total amount of resources before and after the resource conversion, the server can send a first target instruction to the terminal device to instruct the terminal device to invalidate the first resource to be converted stored in its security module, so that the first resource to be converted is valid on one side of the device.

[0105] S404: Based on the first target instruction, the terminal device configures the first resource to be converted stored in the security module of the terminal device to an invalid state.

[0106] Exemplarily, the terminal device can configure the above-mentioned first resource to be converted stored in the security module of the terminal device to an invalid state based on the first target instruction. In other words, in order to avoid the first resource to be converted being effective on both sides of the device, resulting in changes in the total resource amount of the first resource stored in the security module of the terminal device and the second resource stored in the server before and after the conversion, in the above-mentioned case where the first resource to be converted is converted into the second resource and the second resource stored in the server is updated according to the second resource obtained by the conversion, the terminal device needs to configure the above-mentioned first resource to be converted stored in its security module to an invalid state, so that the first resource to be converted is effective from the terminal device side to the server side, that is, to realize the conversion of the resource stored in the security module of the terminal device to the resource stored in the server.

[0107] It should be understood that the above-mentioned invalid state can be configured by executing any operation of deletion, freezing and locking.

[0108] Exemplarily, the deletion operation may completely delete the first resource to be converted in the security module to avoid re-conversion or use of the first resource due to equipment failure.

[0109] Exemplarily, the freezing operation can place the first resource to be converted in an unusable state in the security module, that is, the security module can still retain the part of the resource, so as to avoid the situation where the conversion of the part of the resource has problems and needs to be restored to the state before the conversion, and the part of the resource can be unfrozen in time to restore the original state. This can avoid the problem of waiting for the server to issue an instruction to write again before recovery, and also avoid the problem that the user cannot use the first resource (such as the resource amount is too low) during the period of waiting for the server to issue an instruction.

[0110] For example, similar to the freezing operation, the locking operation can also place the first resource to be converted in an unusable state in the security module, that is, the security module can still retain the part of the resource to avoid problems in the subsequent conversion of the part of the resource and restore it to the state before the conversion by timely unlocking the part of the resource. This can avoid the problem of waiting for the server to issue an instruction to write again before recovery, and also avoid the problem that the user may not be able to use the first resource (such as too low resource quantity) during the period of waiting for the server to issue an instruction.

[0111] It should be understood that the above embodiments are mainly combined with Figure 4 A resource conversion method for converting a first resource stored in a security module of a terminal device into a second resource stored in a server is described. Figure 5 , taking the conversion of the second resource stored in the server into the first resource stored in the security module of the terminal device as an example, the resource conversion method provided in the present application is described.

[0112] In the case where the terminal device sends a second conversion request to the server, the second conversion request may include the second resource information corresponding to the second resource to be converted. The server may convert the second resource to be converted stored in the server into the first resource according to the second resource information, that is, realize the conversion from the second resource to the first resource, so that the storage location of the second resource to be converted can be converted from the server to the security module of the terminal device to meet the user's need to use resources offline in a scenario without network connection. The server also configures the second resource to be converted stored in the server to an invalid state, and may send a second target instruction to the terminal device, and the second target instruction may include the third resource information corresponding to the converted first resource. The second target instruction may be used to instruct the terminal device to store the converted first resource in the security module of the terminal device according to the third resource information, so as to update the first resource stored in the security module. In other words, in order to avoid the second resource to be converted being valid on both sides of the device after the resource conversion, resulting in a change in the total resource amount of the first resource stored in the security module of the terminal device and the second resource stored in the server before and after the conversion, the server configures the second resource to be converted to an invalid state, so that the second resource to be converted is only effective on the terminal device side later, that is, the resource stored in the server is converted to the resource stored in the security module of the terminal device.

[0113] Figure 5 1 is a schematic flow chart of a resource conversion method 500 for converting a second resource stored in a server into a first resource stored in a security module of a terminal device, provided in an embodiment of the present application. Figure 5 As shown, the method 500 may include the following steps:

[0114] S501, the terminal device sends a second conversion request to the server. Correspondingly, the server receives the second conversion request sent by the terminal device, where the second conversion request includes second resource information corresponding to the second resource to be converted.

[0115] It should be understood that the second conversion request is used to instruct to convert the second resource stored in the server into the first resource. As above, the above resources can be different virtual resources, such as virtual money recharged by users, virtual resources used by users in daily life, virtual resources used by users' vehicles, and service-type virtual resources, which are not limited in this application.

[0116] S502: The server configures the second resource to be converted stored in the server to an invalid state according to the second resource information included in the conversion request.

[0117] It should be understood that in order to avoid the above-mentioned second resource information to be converted being valid on both the terminal device side and the server side after the resource conversion, resulting in resource conversion errors, the server can configure the character resource to be converted to an invalid state.

[0118] Exemplarily, the server may perform a delete operation on the second resource to be converted, so as to configure the second resource to be converted to an invalid state, so as to avoid the device failure causing the reconversion or use of the part of the first resource. Alternatively, the server may also perform a freeze operation or a lock operation on the second resource to be converted, so as to configure the second resource to be converted to an invalid state. That is, the server may still retain the part of the resource, but it cannot be used, so as to avoid the situation where the conversion of the part of the resource has problems and needs to be restored to the state before the conversion, and the part of the resource may be unfrozen or unlocked in time to restore the original state, so as to avoid the problem that the user cannot use the second resource (such as the resource amount is too low).

[0119] S503: The server converts the second resource to be converted into a first resource and generates a second target instruction.

[0120] It should be understood that here the server converts the second resource to be converted into the first resource, which can be understood as converting the resource type (such as the second type) of the second resource to be converted into the first type which is the same as the resource type of the first resource.

[0121] S504, the server sends a second target instruction to the terminal device. Correspondingly, the terminal device receives the second target instruction sent by the server, and the second target instruction includes the third resource information corresponding to the converted first resource.

[0122] Exemplarily, the second target instruction may be used to instruct the terminal device to store the converted first resource in a security module of the terminal device according to the third resource information, so as to update the first resource stored in the security module.

[0123] S505: The terminal device stores the converted first resource in a security module of the terminal device according to the third resource information included in the second target instruction, so as to update the first resource stored in the security module.

[0124] Exemplarily, the terminal device can store the first resource obtained by the above conversion into the security module of the terminal device based on the third resource information to update the first resource stored in the security module, so that the second resource to be converted takes effect from the server side and becomes effective on the terminal device side, that is, converting the resources stored in the server block into the resources stored in the security module of the terminal device.

[0125] It should be understood that the server of the present application can be one or more, and the present application does not limit this.

[0126] It should also be understood that in the case where there are multiple terminal devices in the present application, the terminal device can send the above conversion request to any server in the multiple servers to implement the resource conversion method provided by the present application. Below, the present application mainly takes two servers as an example to describe the resource conversion method provided by the present application.

[0127] Figure 6 Schematic diagram of another application scenario 600 provided by the present application. Figure 6 As shown, the application scenario 600 includes a terminal device 601, a first server 602 and a second server 603. The first server 602 may also be referred to as a card issuing server 602, and the second server 603 may also be referred to as an online transaction server 603. The first server 602 is used to manage the first resource stored in the security module of the terminal device 601, such as the first server 602 may instruct the terminal device 601 to write a new first resource into the security module, or instruct the terminal device 601 to invalidate the first resource after conversion from the security module. The second server 603 may be used to store and manage the second resource. In the above application scenario 600, the terminal device 601 may send the above conversion request to the first server 602 or the second server 603 to implement resource conversion.

[0128] Exemplarily, the terminal device 601 may send the first conversion request to the first server 602 or the second server 603 to implement resource conversion from the first resource to the second resource. Figures 7 and 8 Description.

[0129] Figure 7 7 is a schematic flow chart of a resource conversion method 700 for converting a first resource stored in a security module of a terminal device into a second resource stored in a server, provided in an embodiment of the present application. Figure 7 As shown, the method 700 may include the following steps:

[0130] S701: The terminal device sends a first conversion request to the first server. Correspondingly, the first server receives the first conversion request sent by the terminal device, where the first conversion request includes first resource information corresponding to the first resource to be converted.

[0131] It should be understood that the first conversion request can be used to instruct the conversion of the first resource to be converted stored in the security module of the terminal device into the second resource. As above, the above resources can be different virtual resources, such as virtual money recharged by the user, virtual resources used by the user in daily life, virtual resources used by the user's vehicle, and service-type virtual resources, which are not limited in this application.

[0132] S702: The first server sends the first resource to be converted to the second server based on the first resource information included in the first conversion request. Correspondingly, the second server receives the first resource to be converted sent by the first server.

[0133] It should be understood that the first server can manage the first resource stored in the security module of the terminal device. In an embodiment, the first server can send the first resource to be converted to the second server based on the first conversion request to convert the first resource to be converted into the second resource.

[0134] S703: The second server converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the second resource obtained by the conversion.

[0135] Exemplarily, the second server may convert the resource type (such as the first type) of the first resource to be converted into a second type that is the same as the resource type of the second resource. It should be understood that since at least part of the first resource on the terminal device side is converted into the second resource, the resource amount of the second resource obtained by updating the second resource stored in the second server according to the converted second resource is increased compared to the resource amount of the second resource before the update.

[0136] S704: The first server generates a first target instruction and sends the first target instruction to the terminal device. Correspondingly, the terminal device receives the first target instruction sent by the first server.

[0137] It should be understood that after the first server sends the above-mentioned first resource to be converted to the second server, in order to avoid the second server converting the first resource to be converted into the second resource and making it effective on the second server side, the first resource to be converted is still valid on the terminal device side, resulting in a change in the total amount of resources before and after the resource conversion, the first server can send a first target instruction to the terminal device to instruct the terminal device to invalidate the above-mentioned first resource to be converted stored in its security module, so that the first resource to be converted is valid on one side of the device.

[0138] S705: Based on the first target instruction, the terminal device configures the first resource to be converted stored in the security module of the terminal device to an invalid state.

[0139] Exemplarily, in order to ensure that the total amount of resources remains unchanged before and after resource conversion, the terminal device can perform any operation including deletion, freezing and locking on the first resource to be converted stored in the security module of the terminal device based on the above-mentioned first target instruction, so as to configure the first resource to be converted to the invalid state shown above.

[0140] Optionally, in addition to the above Figure 7In addition to the terminal device sending the first conversion request to the first server to realize resource conversion, the terminal device can also send the first conversion request to the second server to realize resource conversion, so as to avoid the problem that the terminal device and the first server are temporarily unable to communicate and interact, resulting in the inability to perform resource conversion services. For details, please refer to the following Figure 8 .

[0141] Figure 8 8 is a schematic flow chart of another resource conversion method 800 for converting a first resource stored in a security module of a terminal device into a second resource stored in a server provided by an embodiment of the present application. Figure 8 As shown, the method 800 may include the following steps:

[0142] S801, the terminal device sends a first conversion request to the second server. Correspondingly, the second server receives the first conversion request sent by the terminal device, where the first conversion request includes first resource information corresponding to the first resource to be converted.

[0143] As above, the above resources can be different virtual resources, such as virtual money recharged by users, virtual resources used by users on a daily basis, virtual resources used by users' vehicles, and service-type virtual resources, which are not limited in this application.

[0144] S802: The second server sends the first resource information to the first server based on the first resource information included in the first conversion request. Correspondingly, the first server receives the first resource information sent by the second server.

[0145] It should be understood that the second server can learn, based on the above-mentioned first conversion request, that what the terminal device wants to convert is the first resource stored in its security module. Since the first server can manage the first resource stored in the security module of the terminal device, the second server can send the first resource information of the first resource to be converted to the first server in order to obtain the above-mentioned first resource to be converted, so that the first server sends the first resource to be converted to the second server based on the first resource information.

[0146] S803: The first server sends the first resource to be converted to the second server based on the first resource information. Correspondingly, the second server receives the first resource to be converted sent by the first server.

[0147] S804: The second server converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the second resource obtained by the conversion.

[0148] It should be understood that here the second server converts the above-mentioned first resource to be converted into the second resource, which can be understood as converting the resource type (such as the first type) of the above-mentioned first resource to be converted into the second type which is the same as the resource type of the second resource.

[0149] S805: The first server generates a first target instruction and sends the first target instruction to the terminal device. Correspondingly, the terminal device receives the first target instruction sent by the first server.

[0150] Exemplarily, the first target instruction may be used to instruct the terminal device to invalidate the first resource to be converted stored in its security module, so as to avoid the first resource to be converted being valid on both sides of the device and causing an error in the conversion of inactive resources.

[0151] S806: The terminal device configures the first resource to be converted stored in the security module of the terminal device to an invalid state based on the first target instruction.

[0152] As above, the terminal device can perform any operation including deletion, freezing and locking on the first resource to be converted stored in the security module of the terminal device based on the first target instruction, so as to configure the first resource to be converted into the invalid state shown above.

[0153] For example, in the above Figure 6 In the case of the application scenario 600, the terminal device 601 can send the first conversion request to the first server 602 or the second server 603, and can also send the second conversion request to the first server 602 or the second server 603 to achieve the resource conversion from the second resource to the first resource. For details, please refer to the following Fig. 9 and Fig.10 Description.

[0154] Fig. 9 9 is a schematic flow chart of a resource conversion method 900 for converting a second resource stored in a server into a first resource stored in a security module of a terminal device, provided in an embodiment of the present application. Fig. 9 As shown, the method 900 may include the following steps:

[0155] S901, the terminal device sends a second conversion request to the second server. Correspondingly, the second server receives the second conversion request sent by the terminal device, where the second conversion request includes second resource information corresponding to the second resource to be converted.

[0156] It should be understood that the second conversion request is used to instruct to convert the second resource stored in the server into the first resource. As above, the above resources can be different virtual resources, such as virtual money recharged by users, virtual resources used by users in daily life, virtual resources used by users' vehicles, and service-type virtual resources, which are not limited in this application.

[0157] S902: The second server configures the second resource to be converted stored in the second server to an invalid state according to the second resource information included in the conversion request.

[0158] It should be understood that in order to avoid the above-mentioned second resource information to be converted being valid on both the terminal device side and the second server side after the resource conversion, resulting in resource conversion errors, the second server can configure the word resource to be converted to an invalid state. Exemplarily, the second server can perform any operation of deleting, freezing and locking the second resource to be converted, so as to configure the second resource to be converted to the invalid state shown above.

[0159] S903: The second server sends the second resource to be converted to the first server. Correspondingly, the first server receives the second resource to be converted sent by the second server.

[0160] It should be understood that the first server can be used to manage the first resource stored in the security module of the terminal device, and the second server can directly send the second resource to be converted to the first server so that the first server manages the second resource to be converted.

[0161] S904: The first server converts the second resource to be converted into a first resource.

[0162] It should be understood that here the first server converts the second resource to be converted into the first resource, which can be understood as converting the resource type (such as the second type) of the second resource to be converted into the first type which is the same as the resource type of the first resource.

[0163] S905, the first server generates a second target instruction and sends the second target instruction to the terminal device. Correspondingly, the terminal device receives the second target instruction sent by the first server, and the second target instruction includes the third resource information corresponding to the converted first resource.

[0164] Exemplarily, the second target instruction may be used to instruct the terminal device to store the converted first resource in a security module of the terminal device according to the third resource information, so as to update the first resource stored in the security module.

[0165] S906: The terminal device stores the converted first resource in the security module of the terminal device according to the third resource information included in the second target instruction, so as to update the first resource stored in the security module.

[0166] It should be understood that in the above S904, the first server implements the resource conversion of the above-mentioned second resource to be converted. In order to make the above-mentioned converted resources effective or valid on the terminal device side, the first server can send instructions to the terminal device so that the terminal device performs the above-mentioned storage, update and other operations to realize the resource to be converted on the terminal device side.

[0167] Optionally, in addition to the above Fig. 9 In addition to the terminal device sending the second conversion request to the second server to realize resource conversion, the terminal device can also send the second conversion request to the first server to realize resource conversion, so as to avoid the problem that the terminal device and the second server are temporarily unable to communicate and interact, resulting in the inability to perform resource conversion services. For details, please refer to the following Fig.10 .

[0168] Fig.10 1 is a schematic flow chart of another resource conversion method 1000 for converting a second resource stored in a server into a first resource stored in a security module of a terminal device provided by an embodiment of the present application. Fig.10 As shown, the method 1000 may include the following steps:

[0169] S1001: The terminal device sends a second conversion request to the first server. Correspondingly, the first server receives the second conversion request sent by the terminal device, where the second conversion request includes second resource information corresponding to the second resource to be converted.

[0170] As above, the above resources can be different virtual resources, such as virtual money recharged by users, virtual resources used by users on a daily basis, virtual resources used by users' vehicles, and service-type virtual resources, which are not limited in this application.

[0171] S1002: The first server sends the second resource information included in the conversion request to the second server. Correspondingly, the second server receives the second resource information sent by the first server.

[0172] It should be understood that the second resource is stored in the second server, that is, the second resource is managed by the second server. Therefore, when receiving a request to convert the second resource, the first server can send the second resource information to the second server, so that the second server can send the second resource to the first server based on the second resource information.

[0173] S1003: The second server configures the second resource to be converted stored in the second server to an invalid state based on the second resource information.

[0174] Exemplarily, the second server can perform any operation including deletion, freezing and locking on the second resource to be converted, so as to configure the second resource to be converted into the invalid state shown above, so as to avoid the second resource information to be converted being valid on both the terminal device side and the second server side after the resource conversion, resulting in resource conversion errors.

[0175] S1004: The second server sends the second resource to be converted to the first server. Correspondingly, the first server receives the second resource to be converted sent by the second server.

[0176] It should be understood that the first server can be used to manage the first resource stored in the security module of the terminal device, and the second server can directly send the second resource to be converted to the first server so that the first server manages the second resource to be converted.

[0177] S1005: The first server converts the second resource to be converted into a first resource.

[0178] It should be understood that the first server may convert the resource type (such as the second type) of the second resource to be converted into a first type which is the same as the resource type of the first resource.

[0179] S1006, the first server generates a second target instruction, and sends the second target instruction to the terminal device. Correspondingly, the terminal device receives the second target instruction sent by the first server, and the second target instruction includes the third resource information corresponding to the converted first resource.

[0180] Exemplarily, the second target instruction may be used to instruct the terminal device to store the converted first resource in a security module of the terminal device according to the third resource information, so as to update the first resource stored in the security module.

[0181] S1007: The terminal device stores the converted first resource in the security module of the terminal device according to the third resource information included in the second target instruction, so as to update the first resource stored in the security module.

[0182] Similarly, in order to make the resources converted in the above S1005 effective on the terminal device side, the terminal device can perform the above storage, update and other operations based on the second target instruction sent by the first server to make the resources to be converted effective on the terminal device side.

[0183] It should be understood that, in order to ensure the safety of the operation, the resource conversion of the present application is performed after confirming that the identity information of the terminal device has been authenticated. That is, the above conversion request is also used to instruct the server to convert the first resource stored in the terminal device into the second resource or convert the second resource stored in the server into the first resource according to the resource information to be converted included in the conversion request, and update the second resource stored in the server, after confirming that the identity information of the terminal device has been authenticated.

[0184] Exemplarily, in order to improve resource conversion efficiency, the identity information of the terminal device can be actively sent to the server by the terminal device. For example, the conversion request carries the identity information of the terminal device, and the conversion request is also used to instruct the server to obtain the identity information of the terminal device from the conversion request and authenticate the identity information. For details, please refer to the following Fig.11 Description.

[0185] Fig.11 1 is a schematic flow chart of a resource conversion method 1100 provided in an embodiment of the present application. Fig.11 As shown, the method 1100 may include the following steps:

[0186] S1101, the terminal device sends a conversion request to the server. Correspondingly, the server receives the conversion request sent by the terminal device, and the conversion request includes resource information to be converted.

[0187] S1102, the server obtains the identity information of the terminal device from the conversion request and authenticates the identity information.

[0188] Exemplarily, the identity information of the terminal device may be a user ID, a security module ID, etc.

[0189] S1103, when the identity information of the terminal device is authenticated, the server converts at least part of the first resources stored in the terminal device into the second resources or converts at least part of the second resources stored in the server into the first resources according to the above-mentioned resource information to be converted, and updates the second resources stored in the server.

[0190] S1104, the server sends a target instruction to the terminal device. Correspondingly, the terminal device receives the target instruction sent by the server.

[0191] S1105: The terminal device updates the first resource stored in the security module of the terminal device based on the above target instruction.

[0192] Exemplarily, the identity information of the terminal device can also be passively sent by the terminal device to the server. For example, the conversion request can also be used to instruct the server to send an identity authentication request to the terminal device. When the terminal device receives the identity authentication request sent by the server, it can send the identity information of the terminal device to the server based on the identity authentication request, so that the server can authenticate the identity information. For details, please refer to the following Fig.12 Description.

[0193] Fig.12 1 is a schematic flow chart of a resource conversion method 1200 provided in an embodiment of the present application. Fig.12 As shown, the method 1200 may include the following steps:

[0194] S1201, the terminal device sends a conversion request to the server. Correspondingly, the server receives the conversion request sent by the terminal device, and the conversion request includes resource information to be converted.

[0195] S1202: The server sends an identity authentication request to the terminal device based on the forwarding request. Correspondingly, the terminal device receives the identity authentication request sent by the server.

[0196] S1203, the terminal device sends the identity information of the terminal device to the server based on the identity authentication request. Correspondingly, the server receives the identity information of the terminal device sent by the terminal device.

[0197] Optionally, after receiving the conversion request, the terminal device may also directly send the identity authentication request to the server without the server sending the identity authentication request.

[0198] S1204: The server authenticates the above identity information.

[0199] S1205, when the identity information authentication of the terminal device is passed, the server converts at least part of the first resources stored in the terminal device into the second resources or converts at least part of the second resources stored in the server into the first resources according to the above-mentioned resource information to be converted, and updates the second resources stored in the server.

[0200] S1206, the server sends a target instruction to the terminal device. Correspondingly, the terminal device receives the target instruction sent by the server.

[0201] S1207: The terminal device updates the first resource stored in the security module of the terminal device based on the above target instruction.

[0202] Optionally, after receiving S1102 or S1204, if the identity information authentication of the terminal device fails, the server may also end or suspend the related operations of this resource conversion.

[0203] Optionally, after receiving S1102 or S1204 above, if the identity information authentication of the terminal device fails, the server can, in addition to pausing or ending the related operations of resource conversion, also send a prompt message to the terminal device so that the user can learn about the current status of resource conversion through the prompt message, and re-initiate the conversion request or resend the identity authentication information through the terminal device to achieve resource conversion.

[0204] Exemplarily, if the identity information authentication of the terminal device fails, the server can suspend related operations of resource conversion and send a first prompt message to the terminal device. The user can learn through the first prompt message that the current resource conversion is in a suspended state because the identity information fails to pass the authentication. The user can resend the identity information to the server through the terminal device to continue the above-mentioned suspended resource conversion task if the identity information can pass the authentication, thereby achieving more efficient resource conversion.

[0205] Fig.13 Schematic diagram of the interface 1300 of the terminal device provided in the embodiment of the present application. Fig.13 As shown, the interface 1300 displays a first prompt message of "Identity authentication failed, do you want to re-authenticate?" Through the first prompt message, the user can learn that the resource conversion is currently suspended because the identity information of the terminal device has not passed the authentication. As shown in the interface 1300, the interface also displays an option of "re-authentication" (such as the first option). The user can click on the first option, and when the terminal device detects the click operation on the first option, it can generate a re-authentication instruction and execute the operation corresponding to the instruction.

[0206] Exemplarily, the terminal device can obtain the new identity information of the terminal device and send it to the server so that the server can authenticate the new identity information to realize resource conversion when the identity information passes the authentication. It should be understood that the new identity information here can be a user ID stored in the terminal device, a security module ID, etc.

[0207] Exemplarily, the terminal device may also display an identity information acquisition interface, and acquire the new identity information input by the user through the identity information acquisition interface, and send the new identity information to the server so that the server can authenticate the new identity information, so as to realize resource conversion when the identity information passes the authentication. It should be understood that the new identity information here can be relevant information about the user collected by the terminal device in real time, such as biometric information such as a password, fingerprint, and facial information input by the user.

[0208] Optionally, the above interface 1300 may also display options such as "No re-authentication" or "End" (such as the second option). The user may also click on the second option, and when the terminal device detects the click operation on the second option, it may generate an instruction to end this resource conversion, and send an instruction to end the resource conversion to the server, so that the server receives the currently suspended resource conversion task.

[0209] It should be understood that the first prompt information shown above is only exemplary, and in addition, other prompt information with specific contents may also be displayed. For example, if a prompt message "Authentication failed, re-authentication is about to be performed", the terminal device may also display options such as "Do not re-authenticate" or "End" correspondingly, so that the terminal device performs the corresponding operation of re-authentication without detecting any user operation. Alternatively, when a user operation of the above-mentioned "Do not re-authenticate" or "End" options is detected, the resource conversion task is terminated, and this application does not limit this.

[0210] Exemplarily, if the identity information authentication of the terminal device fails, the server can terminate the related operations of resource conversion and send a second prompt message to the terminal device. The user can learn through the second prompt message that the current resource conversion is in a terminated state because the identity information authentication fails. The user can re-initiate a new conversion request to the server through the terminal device and re-execute the resource conversion task to achieve accurate resource conversion.

[0211] Fig.14 Schematic diagram of the interface 1400 of the terminal device provided in the embodiment of the present application. Fig.14 As shown, the interface 1400 displays a second prompt message of "Identity authentication failed, do you want to re-request conversion?" Through the second prompt message, the user can learn that the resource conversion task is terminated because the identity information of the terminal device has not passed the authentication. As shown in the interface 1400, the interface also displays an option of "re-request conversion" (such as the third option). The user can click on the third option, and when the terminal device detects the click operation on the third option, it can generate a re-request conversion instruction and execute the operation corresponding to the instruction.

[0212] Exemplarily, the terminal device can send a new conversion request to the server. To avoid identity authentication failure again, the terminal device can make the new conversion request carry new identity information, or, upon receiving a new identity authentication request sent by the server based on the new conversion request, send new identity information to the server so that the server authenticates the new identity information and implements resource conversion when the identity information passes the authentication. It should be understood that the new identity information here is identity information different from the identity information that failed the last identity authentication. Among them, the new identity information can be identity information stored in the terminal device, or it can also be biometric information such as a password, fingerprint, facial information, etc. input by the user that is re-acquired by the terminal device through the identity information acquisition interface. This application does not limit this.

[0213] Optionally, the terminal device may generate an end instruction if no user operation on the "re-request conversion" option is detected within a preset time period, i.e., no option or instruction is sent to the server, and the resource conversion task remains in the ended state.

[0214] Optionally, the interface 1400 may also display options such as "Do not re-request conversion" (such as the fourth option). The user may also click on the fourth option, and when the terminal device detects the click operation on the fourth option, it may also generate an end instruction, that is, do not perform any operation and keep the resource conversion task in the state of completion.

[0215] It should be understood that the second prompt information shown above is only exemplary, and in addition, other prompt information may be displayed. For example, if the prompt information "Authentication failed, re-requesting conversion" is displayed, the terminal device may also display options such as "Do not re-request conversion" so that the terminal device performs the operation corresponding to re-requesting conversion when no user operation on the "Do not re-request conversion" option is detected. Alternatively, the terminal device ends when a user operation on the above-mentioned "Do not re-authenticate conversion" option is detected, and this application does not limit this.

[0216] It should be understood that in order to achieve quick authentication under multiple servers and to achieve efficient resource conversion, the server that performs the identity information authentication of the terminal device can be the server that receives the conversion request. In the following scenario of two servers, the resource conversion method provided by the present application is described in detail by taking the passive transmission of the identity information of the terminal device by the terminal device as an example.

[0217] Fig.15 1 is a schematic flow chart of a resource conversion method 1500 for converting a first resource stored in a security module of a terminal device into a second resource stored in a server, provided in an embodiment of the present application. Fig.15As shown, the method 1500 may include the following steps:

[0218] S1501: The terminal device sends a first conversion request to the first server. Correspondingly, the first server receives the first conversion request sent by the terminal device, where the first conversion request includes first resource information corresponding to the first resource to be converted.

[0219] S1502: The first server sends an identity authentication request to the terminal device. Correspondingly, the terminal device receives the identity authentication request from the first server.

[0220] S1503: The terminal device sends the identity information of the terminal device to the first server based on the identity authentication request. Correspondingly, the first server receives the identity information of the terminal device sent by the terminal device.

[0221] S1504: The first server authenticates the identity information.

[0222] S1505, when the identity information is authenticated, the first server sends the first resource to be converted to the second server based on the first resource information included in the first conversion request. Correspondingly, the second server receives the first resource to be converted sent by the first server.

[0223] S1506: The second server converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the second resource obtained by the conversion.

[0224] S1507: The first server generates a first target instruction and sends the first target instruction to the terminal device. Correspondingly, the terminal device receives the first target instruction sent by the first server.

[0225] S1508: Based on the first target instruction, the terminal device configures the first resource to be converted stored in the security module of the terminal device to an invalid state.

[0226] Optionally, in the scenario of converting the first resource stored in the security module of the terminal device into the second resource stored in the server, if the conversion request in the above S1501 is sent to the second server, the second server can send an identity authentication request to the terminal device and authenticate the identity information of the terminal device. And in the case where the above identity information is authenticated, the second server sends the first resource information to the first server based on the first resource information included in the above first conversion request, so that the first server receives the above first resource information sent by the second server, sends the first resource to be converted to the second server, and sends the generated first target instruction to the terminal device. Correspondingly, the second server converts the first resource to be converted into the second resource, and updates the second resource stored in the second server according to the second resource obtained by the conversion. Based on the above first target instruction, the terminal device configures the first resource to be converted stored in the security module of the terminal device to an invalid state. To avoid repetition, it will not be repeated here.

[0227] Fig.16 1 is a schematic flow chart of a resource conversion method 1600 for converting a second resource stored in a server into a first resource stored in a security module of a terminal device, provided in an embodiment of the present application. Fig.16 As shown, the method 1600 may include the following steps:

[0228] S1601: The terminal device sends a second conversion request to the second server. Correspondingly, the second server receives the second conversion request sent by the terminal device, where the second conversion request includes second resource information corresponding to the second resource to be converted.

[0229] S1602: The second server sends an identity authentication request to the terminal device. Correspondingly, the terminal device receives the identity authentication request from the second server.

[0230] S1603: The terminal device sends the identity information of the terminal device to the second server based on the identity authentication request. Correspondingly, the second server receives the identity information of the terminal device sent by the terminal device.

[0231] S1604: The second server authenticates the identity information.

[0232] S1605: When the identity information passes the authentication, the second server configures the second resource to be converted stored in the second server to an invalid state according to the second resource information included in the conversion request.

[0233] S1606: The second server sends the second resource to be converted to the first server. Correspondingly, the first server receives the second resource to be converted sent by the second server.

[0234] S1607: The first server converts the second resource to be converted into a first resource.

[0235] S1608, the first server generates a second target instruction and sends the second target instruction to the terminal device. Correspondingly, the terminal device receives the second target instruction sent by the first server, and the second target instruction includes the third resource information corresponding to the converted first resource.

[0236] S1609: The terminal device stores the converted first resource in the security module of the terminal device according to the third resource information included in the second target instruction, so as to update the first resource stored in the security module.

[0237] Optionally, in the scenario of converting the second resource stored in the server into the first resource stored in the security module of the terminal device, if the conversion request in S1601 is sent to the first server, the first server can send an identity authentication request to the terminal device and authenticate the identity information of the terminal device. And in the case where the above identity information is authenticated, the first server can send the second resource information to the second server according to the second resource information included in the above conversion request, so that the second server configures the above second resource to be converted stored in the second server to an invalid state, and sends the above second resource to be converted to the first server. Correspondingly, the first server converts the above second resource to be converted into a first resource, and sends the generated second target instruction to the terminal device, so that the terminal device stores the converted first resource in the security module of the terminal device according to the third resource information included in the above second target instruction, so as to update the first resource stored in the security module. To avoid repetition, it will not be repeated here.

[0238] It should be understood that in order to improve the accuracy of resource conversion, the terminal device can also synchronize the first resource amount of the first resource currently stored in the security module of the terminal device to the server, so that the server can verify the above-mentioned first resource amount. For example, if there is a network problem, the target instruction is not sent to the terminal device in a timely or unsuccessful manner, resulting in the terminal device not updating the first resource stored in the security module, resulting in an abnormal first resource amount. If an abnormality is found, a synchronization instruction is sent to the terminal device in a timely manner, and the synchronization instruction is used to instruct the terminal device to update the first resource currently stored in the security module to eliminate the problem of abnormal first resource amount.

[0239] In a possible implementation, when the resource that has completed the conversion the most recently is the second resource, the server can determine whether the first resource amount is abnormal based at least on the resource amount of the second resource that has completed the conversion the most recently (referred to as the conversion resource amount). Exemplarily, the server can determine that the resource that has completed the conversion the most recently is the second resource and the corresponding conversion resource amount based on the resource conversion record, and when the first resource amount is less than the conversion resource amount, it can be determined that the probability that the terminal device has not successfully written the second resource that has completed the conversion into the security module is high, and it can be determined that the first resource amount is abnormal, and the synchronization instruction is sent.

[0240] In another possible implementation, the server may determine whether the first resource amount of the first resource currently stored in the security module is abnormal based on the first resource amount of the first resource currently stored in the security module synchronized with the terminal device and the historical resource amount of the first resource. It should be understood that the historical resource amount of the first resource here may be the resource amount of the first resource stored in the security module before the most recently completed resource conversion task. Exemplarily, the server may determine the historical resource amount of the first resource based on the recharge record of the first resource before the most recently completed resource conversion task, the usage record of the first resource, and the resource conversion record, and when the first resource amount of the first resource currently stored in the security module is different from the historical resource amount, determine that the first resource amount is abnormal and send the above-mentioned synchronization instruction.

[0241] In another possible implementation, the server can determine the current total amount of resources based on the first resource amount of the first resource currently stored in the security module synchronized by the terminal device and the second resource amount of the second resource currently stored in the server, and determine whether the above-mentioned first resource amount is abnormal by judging the current total amount of resources and the historical total amount of resources. It should be understood that the historical total amount of resources here can be the total amount of resources before the most recently completed resource conversion task. Exemplarily, the server can determine the above-mentioned historical total amount of resources based on the recharge record of the first resource before the most recently completed resource conversion task, the resource (first resource and second resource) usage record, and the resource (first resource and second resource) conversion record, and when the above-mentioned current total amount of resources is different from the above-mentioned historical total amount of resources, determine that the above-mentioned first resource amount is abnormal, and send a synchronization instruction.

[0242] It should also be understood that, in the case of the above-mentioned first resource quantity abnormality, the synchronization instruction sent by the server to the terminal device may be the same instruction as the target instruction sent by the server to the terminal device in the above-mentioned embodiment, that is, the server may reissue or resend the target instruction to the terminal device when determining that the first resource quantity is abnormal. Alternatively, the synchronization instruction may also be an instruction including the above-mentioned target instruction, such as the synchronization instruction may carry respective related information including indication information indicating that the first resource quantity is abnormal in addition to instructing the terminal device to update the first resource, and the present application does not limit this.

[0243] Exemplarily, the terminal device may synchronize the first resource amount to the server periodically, within a preset time period, or upon receiving a synchronization notification from the server. The synchronization notification may also be sent by the server to the terminal device within a preset time period, and the preset time period may be a preset time period after resource conversion or a time period with high network quality, which is not limited in this application.

[0244] Exemplarily, the terminal device may also synchronize the first resource amount to the server when a user synchronization operation is detected. The user may perform the synchronization operation according to his / her own needs, or may perform the synchronization operation when receiving a synchronization notification from the server, so that the terminal device synchronizes the first resource amount to the server, and this application does not limit this.

[0245] It should also be understood that the above embodiments may be coupled to each other, and this application does not limit this. Moreover, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0246] Combined with the above Figures 1 to 16 , describes in detail the resource conversion method of the embodiment of the present application, and will be combined with Figures 17 to 19 , describe in detail the resource conversion device of the embodiment of the present application.

[0247] Fig.17A terminal device 1700 provided in an embodiment of the present application is shown. The terminal device 1700 includes: a sending module 1701 and a processing module 1702. The sending module 1701 is used to: send a conversion request to a server, the conversion request includes resource information to be converted, the conversion request is used to instruct the server to convert at least part of the first resource stored in the terminal device into a second resource or convert at least part of the second resource stored in the server into the first resource according to the resource information to be converted, and the conversion request is also used to instruct the server to update the stored second resource; the processing module 1702 is used to: update the first resource stored in the security module of the terminal device based on the target instruction sent by the server.

[0248] Optionally, the resource information to be converted includes the target resource quantity corresponding to the resource to be converted, and the conversion request is used to instruct the server to convert the first resource of the target resource quantity stored in the terminal device into a second resource or to convert the second resource of the target resource quantity stored in the server into a first resource, and update the second resource stored in the server.

[0249] Optionally, the conversion request also includes a conversion method, which includes a first conversion method or a second conversion method. The first conversion method is used to indicate that the first resource stored in the terminal device is converted into a second resource, and the second conversion method is used to indicate that the second resource stored in the server is converted into a first resource; or, the resource information to be converted includes a resource type corresponding to the resource to be converted, and the resource type includes a first type corresponding to the first resource or a second type corresponding to the second resource. The first type is used to indicate that the first resource stored in the terminal device is converted into a second resource, and the second type is used to indicate that the second resource stored in the server is converted into a first resource.

[0250] Optionally, the sending module 1701 is used to: send a first conversion request to the above-mentioned server, the above-mentioned first conversion request includes first resource information corresponding to the first resource to be converted; the above-mentioned first conversion request is used to instruct the above-mentioned server to convert the above-mentioned first resource to be converted stored in the above-mentioned terminal device into a second resource according to the above-mentioned first resource information, and update the second resource stored in the above-mentioned server according to the converted second resource; the processing module 1702 is used to: based on the first target instruction sent by the above-mentioned server, configure the above-mentioned first resource to be converted stored in the security module of the above-mentioned terminal device to an invalid state.

[0251] Optionally, the server includes a first server and a second server; the sending module 1701 is used to: send the first conversion request to the first server, the first conversion request is used to instruct the first server to send the first resource to be converted to the second server according to the first resource information, and generate a first target instruction so that the second server converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the converted second resource.

[0252] Optionally, the server includes a first server and a second server; the sending module 1701 is used to: send the first conversion request to the second server, the first conversion request is used to instruct the second server to send the first resource information to the first server, so that the first server sends the first resource to be converted to the second server based on the first resource information, and generates a first target instruction, the second server converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the converted second resource.

[0253] Optionally, the sending module 1701 is used to: send a second conversion request to the above-mentioned server, the above-mentioned second conversion request includes second resource information corresponding to the second resource to be converted; the above-mentioned second conversion request is used to instruct the above-mentioned server to convert the above-mentioned second resource to be converted stored in the above-mentioned server into a first resource according to the above-mentioned second resource information, and configure the above-mentioned second resource to be converted stored in the above-mentioned server to an invalid state; the processing module 1702 is used for: the above-mentioned second target instruction includes third resource information corresponding to the converted first resource; according to the above-mentioned third resource information, the above-mentioned converted first resource is stored in the security module of the above-mentioned terminal device to update the first resource stored in the above-mentioned security module.

[0254] Optionally, the server includes a first server and a second server; the sending module 1701 is used to: send the second conversion request to the second server, the second conversion request is used to instruct the second server to configure the second resource to be converted stored in the second server to an invalid state according to the second resource information, and send the second resource to be converted to the first server, so that the first server converts the second resource to be converted into a first resource and generates a second target instruction.

[0255] Optionally, the server includes a first server and a second server, and the sending module 1701 is used to: send the second conversion request to the first server, and the second conversion request is used to instruct the first server to send the second resource information to the second server, so that the second server configures the second resource to be converted stored in the second server as an invalid state based on the second resource information, and sends the second resource to be converted to the first server, and the first server converts the second resource to be converted into a first resource and generates a second target instruction.

[0256] Optionally, the invalid state is configured by performing any one of the operations of deletion, freezing and locking.

[0257] Optionally, the above-mentioned conversion request is also used to instruct the above-mentioned server to convert the first resource stored in the above-mentioned terminal device into the second resource or convert the second resource stored in the above-mentioned server into the first resource according to the above-mentioned resource information to be converted, and update the second resource stored in the above-mentioned server after confirming that the identity information of the above-mentioned terminal device has passed authentication.

[0258] Optionally, the conversion request carries the identity information of the terminal device, and the conversion request is further used to instruct the server to obtain the identity information of the terminal device from the conversion request and authenticate the identity information.

[0259] Optionally, the above-mentioned conversion request is also used to instruct the above-mentioned server to send an identity authentication request to the above-mentioned terminal device; the processing module 1702 is used to: when receiving the above-mentioned identity authentication request sent by the above-mentioned server, send the identity information of the above-mentioned terminal device to the above-mentioned server based on the above-mentioned identity authentication request, so that the above-mentioned server authenticates the above-mentioned identity information.

[0260] Optionally, the processing module 1702 is used to: synchronize a first resource amount of a first resource currently stored in a security module of the terminal device to the server, where the first resource amount is used for verification.

[0261] Optionally, the sending module 1701 is used to: in response to a resource conversion operation, send the conversion request to the server; or, when the reference information meets a conversion condition, send the conversion request to the server.

[0262] Optionally, the reference information includes at least one of the current location, current network quality and current resource quantity, and the current resource quantity is the current resource quantity of the resource requested for conversion; wherein, when the reference information is the current location, the conversion condition is that the current location is the target geographic location; when the reference information is the current network quality, the conversion condition is that the current network quality is higher than a network quality threshold; when the reference information is the current resource quantity, the conversion condition is that the current resource quantity is greater than or equal to a resource quantity threshold.

[0263] It should be understood that the terminal device 1700 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the terminal device 1700 may be specifically the terminal device in the above-mentioned embodiment, or the functions of the terminal device in the above-mentioned embodiment may be integrated in the terminal device 1700, and the terminal device 1700 may be used to execute the various processes and / or steps corresponding to the terminal device in the above-mentioned method embodiment. To avoid repetition, they will not be repeated here. The above-mentioned terminal device 1700 has the function of implementing the corresponding steps executed by the terminal device in the above-mentioned method; the above-mentioned functions can be implemented by hardware, or can be implemented by hardware executing the corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions. In an embodiment of the present application, Fig.17 The terminal device 1700 may also be a chip or a chip system, for example, a system on chip (SoC).

[0264] Fig.18 A server 1800 provided in an embodiment of the present application is shown. The server 1800 includes: a receiving module 1801 and a processing module 1802. The receiving module 1801 is used to: receive a conversion request sent by a terminal device, the conversion request includes the resource information to be converted; the processing module 1802 is used to: convert at least part of the first resource stored in the terminal device into the second resource or convert at least part of the second resource stored in the server into the first resource according to the resource information to be converted, and update the second resource stored in the server; and send the target instruction to the terminal device, the target instruction is used to instruct the terminal device to update the first resource stored in the security module of the terminal device based on the target instruction.

[0265] Optionally, the above-mentioned resource information to be converted includes the target resource quantity corresponding to the resource to be converted; the processing module 1802 is used to: according to the above-mentioned resource information to be converted, convert the first resource of the target resource quantity stored in the terminal device into the second resource or convert the second resource of the target resource quantity stored in the server into the first resource, and update the second resource stored in the server.

[0266] Optionally, the above-mentioned conversion request also includes a conversion method; the processing module 1802 is used to: if the conversion method included in the resource information to be converted is a first conversion method, then the first resource stored in the terminal device is converted into a second resource; if the conversion method included in the resource information to be converted is a second conversion method, then the second conversion method is used to indicate that the second resource stored in the server is converted into the first resource; or, the resource information to be converted includes a resource type corresponding to the resource to be converted, and the processing module 1802 is used to: if the resource type included in the resource information to be converted is a first type corresponding to the first resource, then the first resource stored in the terminal device is converted into a second resource; if the resource type included in the resource information to be converted is a second type corresponding to the second resource, then the second resource stored in the server is converted into the first resource.

[0267] Optionally, the receiving module 1801 is used to: receive a first conversion request sent by the above-mentioned terminal device, the above-mentioned first conversion request includes first resource information corresponding to the first resource to be converted; the processing module 1802 is used to: convert the above-mentioned first resource to be converted stored in the above-mentioned terminal device into a second resource according to the above-mentioned first resource information, and update the second resource stored in the above-mentioned server according to the second resource obtained by the conversion; and, send a first target instruction to the above-mentioned terminal device, the above-mentioned first target instruction is used to instruct the above-mentioned terminal device to configure the above-mentioned first resource to be converted stored in the security module of the above-mentioned terminal device to an invalid state.

[0268] Optionally, the server includes a first server and a second server; the receiving module 1801 is used for: the first server receives the first conversion request; the processing module 1802 is used for: the first server sends the first resource to be converted to the second server according to the first resource information, and generates a first target instruction; the second server receives the first resource to be converted sent by the first server, converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the converted second resource; and the first server sends the first target instruction to the terminal device.

[0269] Optionally, the server includes a first server and a second server; the receiving module 1801 is used for: the second server receives the first conversion request; the processing module 1802 is used for: the second server sends the first resource information to the first server; the first server receives the first resource information, sends the first resource to be converted to the second server based on the first resource information, and generates a first target instruction; the second server receives the first resource to be converted, converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the converted second resource; and the first server sends the first target instruction to the terminal device.

[0270] Optionally, the receiving module 1801 is used to: receive a second conversion request sent by the above-mentioned terminal device, the above-mentioned second conversion request includes second resource information corresponding to the second resource to be converted; the processing module 1802 is used to: convert the above-mentioned second resource to be converted stored in the above-mentioned server into a first resource according to the above-mentioned second resource information, and configure the above-mentioned second resource to be converted stored in the above-mentioned server to an invalid state; and, send a second target instruction to the above-mentioned terminal device, the above-mentioned second target instruction includes third resource information corresponding to the converted first resource; the above-mentioned second target instruction is used to instruct the above-mentioned terminal device to store the above-mentioned converted first resource in the security module of the above-mentioned terminal device according to the above-mentioned third resource information, so as to update the first resource stored in the above-mentioned security module.

[0271] Optionally, the server includes a first server and a second server; the receiving module 1801 is used for: the second server receives the second conversion request; the processing module 1802 is used for: the second server configures the second resource to be converted stored in the second server as an invalid state according to the second resource information, and sends the second resource to be converted to the first server; the first server receives the second resource to be converted sent by the second server, converts the second resource to be converted into a first resource, and generates a second target instruction; and the first server sends the first target instruction to the terminal device.

[0272] Optionally, the server includes a first server and a second server; the receiving module 1801 is used for: the first server receives the second conversion request; the processing module 1802 is used for: the first server sends the second resource information to the second server; the second server receives the second resource information, configures the second resource to be converted stored in the second server as an invalid state based on the second resource information, and sends the second resource to be converted to the first server; the first server receives the second resource to be converted, converts the second resource to be converted into a first resource, and generates a second target instruction; and the first server sends the first target instruction to the terminal device.

[0273] Optionally, the processing module 1802 is used to: when confirming that the identity information of the terminal device has passed authentication, convert at least part of the first resources stored in the terminal device into the second resources or convert at least part of the second resources stored in the server into the first resources according to the resource information to be converted.

[0274] Optionally, the conversion request carries the identity information of the terminal device; the processing module 1802 is used to obtain the identity information of the terminal device from the conversion request and authenticate the identity information.

[0275] Optionally, the conversion request is also used to instruct the server to send an identity authentication request to the terminal device; the processing module 1802 is used to: send an identity authentication request to the terminal device so that the terminal device sends the identity information of the terminal device to the server; and authenticate the identity information.

[0276] Optionally, the receiving module 1801 is used to: receive a first resource amount of a first resource currently stored in a security module of the terminal device synchronized with the terminal device; and the processing module 1802 is used to: verify the first resource amount.

[0277] It should be understood that the server 1800 here is embodied in the form of a functional module. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art may understand that the server 1800 may be specifically the server in the above-mentioned embodiment, or the functions of the server in the above-mentioned embodiment may be integrated in the server 1800, and the server 1800 may be used to execute the various processes and / or steps corresponding to the server in the above-mentioned method embodiment. To avoid repetition, they will not be repeated here. The above-mentioned server 1800 has the function of implementing the corresponding steps executed by the server in the above-mentioned method; the above-mentioned functions may be implemented by hardware, or may be implemented by hardware executing the corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions. In an embodiment of the present application, Fig.18 The server 1800 may also be a chip or a chip system, such as a system on chip (SoC).

[0278] Fig.19 The resource conversion device 1900 provided in an embodiment of the present application is shown. The resource conversion device 1900 includes: a processor 1901 and a memory 1902, a communication interface 1903 and a bus 1904. The memory 1902 is used to store instructions, and the processor 1901 is used to execute the instructions stored in the memory 1902. The processor 1901, the memory 1902 and the communication interface 1903 are connected to each other through the bus 1904.

[0279] In a first implementation, the resource conversion device 1900 may be specifically the terminal device in the above embodiment. The processor 1901 is used to: send a conversion request to the server, the conversion request includes resource information to be converted, the conversion request is used to instruct the server to convert at least part of the first resource stored in the terminal device into the second resource or convert at least part of the second resource stored in the server into the first resource according to the resource information to be converted, and the conversion request is also used to instruct the server to update the stored second resource; based on the target instruction sent by the server, update the first resource stored in the security module of the terminal device.

[0280] In a second implementation, the resource conversion device 1900 may be specifically the server in the above embodiment. The processor 1901 is used to: receive a conversion request sent by a terminal device, the conversion request including the resource information to be converted; according to the resource information to be converted, convert at least part of the first resource stored in the terminal device into the second resource or convert at least part of the second resource stored in the server into the first resource, and update the second resource stored in the server; send the target instruction to the terminal device, the target instruction is used to instruct the terminal device to update the first resource stored in the security module of the terminal device based on the target instruction.

[0281] It should be understood that the resource conversion device 1900 can be specifically a terminal device or a server in the above embodiment, or the functions of the terminal device or the server in the above embodiment can be integrated in the resource conversion device 1900, and the resource conversion device 1900 can be used to execute the various steps and / or processes corresponding to the terminal device or the server in the above method embodiment. Optionally, the memory 1902 may include a read-only memory and a random access memory, and provide instructions and data to the processor 1901. A part of the memory 1902 may also include a non-volatile random access memory. For example, the memory 1902 may also store information about the device type. The processor 1901 can be used to execute the instructions stored in the memory, and when the processor executes the instruction, the processor 1901 can execute the various steps and / or processes corresponding to the terminal device or the server in the above method embodiment. It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here. A person of ordinary skill in the art may realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented in electronic hardware, or in combination with computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways.For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present application may be integrated in a processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A resource conversion method, characterized in that: Applied to a terminal device, the method comprises: Sending a conversion request to a server, the conversion request including resource information to be converted, the conversion request being used to instruct the server to convert at least part of the first resource stored in the terminal device into the second resource or to convert at least part of the second resource stored in the server into the first resource according to the resource information to be converted, and the conversion request being used to instruct the server to update the stored second resource; Based on the target instruction sent by the server, the first resource stored in the security module of the terminal device is updated.

2. The method according to claim 1, characterized in that The conversion request includes a conversion mode, and the conversion mode includes a first conversion mode or a second conversion mode, the first conversion mode is used to indicate that the first resource stored in the terminal device is converted into the second resource, and the second conversion mode is used to indicate that the second resource stored in the server is converted into the first resource; or The resource information to be converted includes the resource type corresponding to the resource to be converted, and the resource type includes a first type corresponding to a first resource or a second type corresponding to a second resource. The first type is used to indicate that the first resource stored in the terminal device is converted into a second resource, and the second type is used to indicate that the second resource stored in the server is converted into a first resource.

3. The method according to claim 1, characterized in that The sending of the conversion request to the server comprises: Sending a first conversion request to the server, the first conversion request including first resource information corresponding to the first resource to be converted; the first conversion request is used to instruct the server to convert the first resource to be converted stored in the terminal device into a second resource according to the first resource information, and to update the second resource stored in the server according to the converted second resource; The updating of the first resource stored in the security module of the terminal device based on the target instruction sent by the server includes: Based on the first target instruction sent by the server, the first resource to be converted stored in the security module of the terminal device is configured to be in an invalid state.

4. The method according to claim 3, characterized in that The server includes a first server and a second server; sending a first conversion request to the server includes: The first conversion request is sent to the first server, where the first conversion request is used to instruct the first server to send the first resource to be converted to the second server according to the first resource information, and to generate the first target instruction so that the second server converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the converted second resource.

5. The method according to claim 3, characterized in that: The server includes a first server and a second server; sending a first conversion request to the server includes: The first conversion request is sent to the second server, where the first conversion request is used to instruct the second server to send the first resource information to the first server, so that the first server sends the first resource to be converted to the second server based on the first resource information and generates the first target instruction, and the second server converts the first resource to be converted into a second resource, and updates the second resource stored in the second server according to the converted second resource.

6. The method according to claim 1, characterized in that The sending of the conversion request to the server comprises: Sending a second conversion request to the server, the second conversion request including second resource information corresponding to the second resource to be converted; the second conversion request is used to instruct the server to convert the second resource to be converted stored in the server into a first resource according to the second resource information, and to configure the second resource to be converted stored in the server to an invalid state; The updating of the first resource stored in the security module of the terminal device based on the target instruction sent by the server includes: The second target instruction includes third resource information corresponding to the converted first resource; According to the third resource information, the converted first resource is stored in the security module of the terminal device to update the first resource stored in the security module.

7. The method according to claim 6, characterized in that The server includes a first server and a second server; sending the second conversion request to the server includes: The second conversion request is sent to the second server, where the second conversion request is used to instruct the second server to configure the second resource to be converted stored by the second server to an invalid state according to the second resource information, and to send the second resource to be converted to the first server, so that the first server converts the second resource to be converted into a first resource and generates a second target instruction.

8. The method according to claim 6, characterized in that The server includes a first server and a second server, and sending the second conversion request to the server includes: The second conversion request is sent to the first server, and the second conversion request is used to instruct the first server to send the second resource information to the second server, so that the second server configures the second resource to be converted stored in the second server to an invalid state based on the second resource information, and sends the second resource to be converted to the first server, the first server converts the second resource to be converted into a first resource, and generates a second target instruction.

9. The method according to claim 1, characterized in that: The conversion request is also used to instruct the server to convert the first resource stored in the terminal device into the second resource or convert the second resource stored in the server into the first resource according to the resource information to be converted, and update the second resource stored in the server, when confirming that the identity information of the terminal device has passed authentication.

10. The method according to claim 1, characterized in that The method further comprises: A first resource amount of a first resource currently stored in a security module of the terminal device is synchronized to the server, where the first resource amount is used for verification.

11. The method according to claim 1, characterized in that The sending of the conversion request to the server comprises: In response to the resource conversion operation, sending the conversion request to the server; or, When the reference information meets the conversion condition, the conversion request is sent to the server.

12. The method according to claim 11, characterized in that The reference information includes at least one of a current location, a current network quality, and a current resource amount, wherein the current resource amount is a current resource amount of a resource requested to be converted; Among them, when the reference information is the current location, the conversion condition is that the current location is the target geographic location; when the reference information is the current network quality, the conversion condition is that the current network quality is higher than the network quality threshold; when the reference information is the current resource amount, the conversion condition is that the current resource amount is greater than or equal to the resource amount threshold.

13. A resource conversion device, characterized in that: The system comprises a processor and a memory, wherein the memory is used to store code instructions; the processor is used to run the code instructions to execute the method according to any one of claims 1 to 12.

14. A computer program product, comprising computer program code, characterized in that: When the computer program code is executed on a computer, the computer is caused to implement the method according to any one of claims 1 to 12.