Resource interaction processing method and device, electronic equipment, medium and product

By determining and optimizing the first parameter and the second parameter in the resource interaction server, the resource interaction processing in the resource pool is optimized, the problem of high resource interaction processing overhead is solved, and the optimization and reasonable selection of resource configuration are realized.

CN118535314APending Publication Date: 2024-08-23TENPAY PAID TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310159777.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-16
Publication Date
2024-08-23

Smart Images

  • Figure CN118535314A
    Figure CN118535314A
Patent Text Reader

Abstract

The invention provides a resource interaction processing method and device, electronic equipment, a medium and a product. The resource interaction processing method is characterized by comprising the following steps: determining that a first parameter and a second parameter meet a first condition; determining that the first resource in the first resource pool meets a second condition; initiating a first request to the first resource server to perform first resource interaction with the first resource server by using the first parameter based on the first resource in the first resource pool; and initiating a second request to the second resource server to perform second resource interaction with the second resource server by using the second parameter. The embodiment of the invention can be applied to various scenes such as block chains, big data processing, security technologies and the like. According to the embodiment of the invention, the overhead of resource interaction processing can be optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information processing, and in particular to a resource interaction processing method, device, electronic device, medium and product. Background Art

[0002] With the development of the Internet, more resource interaction needs have been generated on the Internet. These resource interaction needs are carried out through resource interaction servers. Resource interaction servers need to interact with resources between objects and resource servers. Resource interaction generates processing overhead. How to optimize resource interaction processing overhead and achieve optimal resource configuration has become a problem. Summary of the invention

[0003] The embodiments of the present disclosure provide a resource interaction processing method, device, electronic device, medium and product, which can optimize resource interaction processing overhead and optimize resource configuration.

[0004] According to one aspect of the present disclosure, a resource interaction processing method is provided, comprising:

[0005] Determining that a first parameter and a second parameter satisfy a first condition, wherein the first parameter is a parameter used in the first resource server for interaction between the second resource and the first resource, and the second parameter is a parameter used in the second resource server for interaction between the second resource and the first resource;

[0006] Determining that a first resource in the first resource pool satisfies a second condition;

[0007] Initiate a first request to the first resource server to perform a first resource interaction with the first resource server based on the first resource in the first resource pool by using the first parameter;

[0008] A second request is initiated to the second resource server to perform a second resource interaction with the second resource server using the second parameter, wherein, for the first resource in the first resource pool, the operation direction of the first resource interaction is opposite to that of the second resource interaction.

[0009] According to one aspect of the present disclosure, a resource interaction processing device is provided, comprising:

[0010] A first determining unit, configured to determine whether a first parameter and a second parameter satisfy a first condition, wherein the first parameter is a parameter used in the first resource server for interaction between the second resource and the first resource, and the second parameter is a parameter used in the second resource server for interaction between the second resource and the first resource;

[0011] A second determining unit, configured to determine whether a first resource in the first resource pool satisfies a second condition;

[0012] A first request unit, configured to initiate a first request to the first resource server, so as to perform a first resource interaction with the first resource server based on the first resource in the first resource pool and using the first parameter;

[0013] The second request unit is configured to initiate a second request to the second resource server, so as to perform a second resource interaction with the second resource server by using the second parameter, wherein, for the first resource in the first resource pool, the operation direction of the first resource interaction is opposite to that of the second resource interaction.

[0014] Optionally, the first resource value is positive, and the resource interaction processing device further includes:

[0015] a first interaction processing unit, configured to store the first resource from the object into the first resource pool and take out the second resource from the first resource pool and send it to the object whenever receiving a third request from the object to obtain the second resource, wherein the first resource from the object is obtained by converting the second resource according to a fifth parameter, and the fifth parameter is a parameter used for the interaction between the second resource and the first resource of the resource interaction server when receiving the third request;

[0016] a second interaction processing unit, configured to, if the first resource server is available and the third parameter is not greater than the fourth parameter, receive the second resource from the first resource server, store the second resource in the first resource pool, take out the first resource converted by the second resource from the first resource pool according to the third parameter, and send the first resource to the first resource server, wherein the third parameter is a parameter used in the first resource server for interaction between the second resource and the first resource when the third request is received, and the fourth parameter is a parameter used in the second resource server for interaction between the second resource and the first resource when the third request is received;

[0017] The third interaction processing unit is configured to receive the second resource from the second resource server and store it in the second resource pool if the first resource server is unavailable or the first resource server is available but the third parameter is greater than the fourth parameter, retrieve the second resource from the second resource pool, convert it into a first resource according to the fourth parameter, and send it to the second resource server.

[0018] Optionally, the using the first parameter to interact with the first resource server for the first resource includes: receiving the second resource from the first resource server, storing it in the first resource pool, taking out the second resource from the first resource pool, converting it into the first resource according to the first parameter, and sending it to the first resource server; the using the second parameter to interact with the second resource server for the second resource includes: taking out the second resource from the second resource pool, sending it to the second resource server, receiving the first resource converted by the second resource from the second resource server according to the second parameter, and storing it in the second resource pool.

[0019] Optionally, the first determining unit is specifically configured to:

[0020] subtracting the first parameter from the second parameter to obtain a first difference;

[0021] Subtracting the fifth parameter from the fourth parameter to obtain a second difference;

[0022] Based on the first difference and the second difference, it is determined that the first parameter and the second parameter satisfy a first condition.

[0023] Optionally, the first determining unit is specifically configured to:

[0024] subtracting the second difference from the first difference to obtain a third difference;

[0025] According to the resource type of the second resource, obtaining a first curve of a parameter changing over time for interaction between the second resource corresponding to the resource type and the first resource;

[0026] determining a variance of a parameter in the first curve for interaction of the second resource with the first resource;

[0027] Based on the variance, determining a first threshold;

[0028] If the third difference is greater than the first threshold, it is determined that the first parameter and the second parameter satisfy a first condition.

[0029] Optionally, the first determining unit is specifically configured to:

[0030] Acquire, from the first resource server, according to the resource type of the second resource, a first sub-curve of parameter changes over time for interaction between the second resource corresponding to the resource type and the first resource;

[0031] According to the resource type of the second resource, obtaining from the second resource server a second sub-curve of parameter changes over time for interaction between the second resource corresponding to the resource type and the first resource;

[0032] The first curve is generated according to the first sub-curve and the second sub-curve.

[0033] Optionally, the first determining unit is specifically configured to:

[0034] According to the resource type of the second resource, obtaining the number of interactions between the second resource of the resource type and the first resource in a unit period;

[0035] Based on the number of interactions, determining a first duration;

[0036] A first curve showing the time-varying parameters of the interaction between the second resource corresponding to the resource type and the first resource within the first time period before the current time is obtained.

[0037] Optionally, the first determining unit is specifically configured to:

[0038] Get the second duration;

[0039] It is determined that the first parameter and the second parameter always satisfy the first condition within the second time period.

[0040] Optionally, the first determining unit is specifically configured to:

[0041] Acquire the first parameter and the second parameter every third time period;

[0042] It is determined that the first parameter and the second parameter acquired for a predetermined number of consecutive times both satisfy the first condition.

[0043] Optionally, the second determining unit is specifically configured to:

[0044] Determining an interaction operation cost of the first resource interaction and the second resource interaction;

[0045] If the first resource value is greater than the interaction operation cost, it is determined that the first resource meets the second condition.

[0046] Optionally, the second determining unit is specifically configured to:

[0047] Determining atomic operations included in the first resource interaction and the second resource interaction;

[0048] According to the atomic operation, searching the atomic operation and operation cost correspondence table to obtain the operation cost corresponding to the atomic operation;

[0049] The operation costs corresponding to the atomic operations included in the first resource interaction and the second resource interaction are summed up to obtain the interaction operation cost.

[0050] Optionally, the second determining unit is specifically configured to:

[0051] Determine the resource value consumed by non-resource interaction transactions per unit period;

[0052] Determining a reserved resource value based on the resource consumption value of the non-resource interaction transaction in the unit period;

[0053] If the first resource value is greater than the reserved resource value, it is determined that the first resource meets the second condition.

[0054] Optionally, the resource interaction processing device further includes:

[0055] a fourth interaction processing unit, configured to store the second resource from the object in the first resource pool and take out the first resource from the first resource pool and send it to the object whenever receiving a fourth request from the object to obtain the first resource, wherein the taken out first resource is obtained by converting the second resource according to a fifth parameter, and the fifth parameter is a parameter used for interaction between the second resource and the first resource in the resource interaction server when receiving the fourth request;

[0056] a fifth interaction processing unit, configured to, if the first resource server is available and the third parameter is not less than the fourth parameter, take out the second resource from the first resource pool and send it to the first resource server, receive the first resource converted from the second resource according to the third parameter from the first resource server, and store it in the first resource pool, wherein the third parameter is a parameter used in the first resource server for interaction between the second resource and the first resource when the third request is received, and the fourth parameter is a parameter used in the second resource server for interaction between the second resource and the first resource when the third request is received;

[0057] and a sixth interaction processing unit, configured to, if the first resource server is unavailable, or although the first resource server is available but the third parameter is less than the fourth parameter, take out the second resource from the second resource pool and send it to the second resource server, receive from the second resource server the first resource converted from the second resource according to the fourth parameter, and store it in the second resource pool.

[0058] Optionally, the using the first parameter to interact with the first resource server for the first resource includes: taking out the second resource from the first resource pool, sending it to the first resource server, receiving from the first resource server a first resource converted from the second resource according to the first parameter, and storing it in the first resource pool; the using the second parameter to interact with the second resource server for the second resource includes: receiving the second resource from the second resource server, storing it in the second resource pool, taking out from the second resource pool a first resource converted from the second resource according to the second parameter, and sending it to the second resource server.

[0059] Optionally, the first determining unit is specifically configured to:

[0060] subtracting the second parameter from the first parameter to obtain a fourth difference;

[0061] subtracting the fourth parameter from the fifth parameter to obtain a fifth difference;

[0062] Based on the fourth difference and the fifth difference, it is determined that the first parameter and the second parameter satisfy a first condition.

[0063] According to one aspect of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the resource interaction processing method as described above when executing the computer program.

[0064] According to one aspect of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the resource interaction processing method as described above is implemented.

[0065] According to one aspect of the present disclosure, a computer program product is provided. The computer program product includes a computer program. The computer program is read and executed by a processor of a computer device, so that the computer device executes the resource interaction processing method as described above.

[0066] In the disclosed embodiment, after the resource interaction server interacts with the object through the first resource and the second resource, it often needs to perform a reverse operation with the first resource server or the second resource server on one of the resources, such as the second resource, to maintain the internal resource balance of the resource interaction server. This reverse operation sometimes has too much processing overhead. In the disclosed embodiment, once it is determined that the first parameter for resource interaction with the first resource server and the second parameter for resource interaction with the second resource server meet the first condition, and the value of the first resource in the first resource pool meets the second condition, the resource interaction can be performed again with the first resource server according to the first parameter to perform a reverse operation on the second resource again, and the resource interaction can be performed again with the second resource server according to the second parameter to offset the result of the first reverse operation with the second resource server. The first parameter and the second parameter meet the first condition, so that the processing overhead after the above two resource interactions becomes smaller. At the same time, after the above two resource interactions, the selection of the resource server for resource interaction is more reasonable, and the resource configuration is optimized.

[0067] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The accompanying drawings are used to provide further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure.

[0069] Figure 1 It is a system architecture diagram of a system to which the resource interaction processing method provided in an embodiment of the present disclosure is applied;

[0070] Figure 2A -F is a schematic diagram of an interface in which the resource interaction processing method provided by an embodiment of the present disclosure is applied to a scenario in which an object uses a first resource to interact with a second resource;

[0071] Figure 3A -F is a schematic diagram of an interface in which the resource interaction processing method provided by an embodiment of the present disclosure is applied to a scenario in which an object uses a second resource to interact with a first resource;

[0072] Figure 4 is a flow chart of a resource interaction processing method according to an embodiment of the present disclosure;

[0073] Figure 5A is a schematic diagram of first parameters of different resource types in the resource interaction processing method provided by an embodiment of the present disclosure;

[0074] Figure 5B is a schematic diagram of second parameters of different resource types in the resource interaction processing method provided in an embodiment of the present disclosure;

[0075] Figure 6 It is a full process flow chart of a resource interaction processing method in a scenario where an object uses a first resource to interact with a second resource;

[0076] Figure 7 yes Figure 6 A schematic diagram of a resource interaction process in which steps 601-603 are performed in a scenario in which an object uses a first resource to interact with a second resource;

[0077] Figure 8 yes Figure 6 A schematic diagram of a resource interaction process in which steps 401-404 are performed in a scenario in which an object uses a first resource to interact with a second resource;

[0078] Fig. 9 In the scenario where an object uses a first resource to interact with a second resource Figure 4 A flow chart of step 401;

[0079] Fig.10 yes Fig. 9 A flow chart of step 903;

[0080] Fig.11 yes Fig.10 A schematic diagram of a first curve of step 1002;

[0081] Fig.12 yes Fig.10 A schematic diagram of a generation process of the first curve of step 1002;

[0082] Fig.13 yes Fig.10 A schematic diagram of another generation process of the first curve in step 1002;

[0083] Fig.14 In the scenario where an object uses a first resource to interact with a second resource Figure 4 A flow chart of step 401;

[0084] Fig.15 is a schematic diagram of a second curve in an embodiment of the present disclosure;

[0085] Fig.16 In the scenario where an object uses a first resource to interact with a second resource Figure 4 A flow chart of step 401;

[0086] Fig.17In the scenario where an object uses a first resource to interact with a second resource Figure 4 A flow chart of step 402;

[0087] Fig.18 In the scenario where an object uses a first resource to interact with a second resource Figure 4 A flow chart of step 402;

[0088] Fig.19 It is a full process flow chart of a resource interaction processing method in a scenario where an object uses a second resource to interact with a first resource;

[0089] Fig. 20 yes Fig.19 A schematic diagram of a resource interaction process in which steps 1701-1703 are performed in a scenario in which an object interacts with a first resource using a second resource;

[0090] Fig.21 yes Fig.19 A schematic diagram of a resource interaction process in which steps 401-404 are performed in a scenario in which an object interacts with a first resource using a second resource;

[0091] Fig. 22 In the scenario where the object uses the second resource to interact with the first resource Figure 4 A flow chart of step 401;

[0092] Fig.23 yes Fig. 22 A flow chart of step 2203;

[0093] Fig.24 In the scenario where the object uses the second resource to interact with the first resource Figure 4 A flow chart of step 402;

[0094] Fig.25 In the scenario where the object uses the second resource to interact with the first resource Figure 4 A flow chart of step 402;

[0095] Fig.26 is a block diagram of a resource interaction processing device according to an embodiment of the present disclosure;

[0096] Fig. 27 According to the embodiment of the present disclosure Figure 4 The terminal structure diagram of the resource interaction processing method shown;

[0097] Fig.28 According to the embodiment of the present disclosure Figure 4 The server structure diagram of the resource interaction processing method shown. DETAILED DESCRIPTION

[0098] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.

[0099] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations:

[0100] Blockchain: Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of transaction information, which is used to verify the validity of its information (anti-counterfeiting) and associate with the previous block.

[0101] Resource interaction parameters: parameters used in resource interaction. For example, in the process of resource interaction, each unit of one resource is equivalent to the quantity of another resource, which is a resource interaction parameter. Of course, there can also be other resource interaction parameters. It changes over time, and the resource interaction parameters of the resource interaction server, the first resource server, and the second resource server are also different.

[0102] In the existing resource interaction technology, a resource interaction server is added to improve the convenience of resource interaction. The resource interaction server has the first resource and the second resource required by the object. Therefore, the resource interaction server provides the object with the interaction service of the first resource and the second resource.

[0103] In the related art, after the resource interaction server completes the resource interaction with the object using a certain parameter of the interaction between the second resource and the first resource, in order to maintain sufficient first resources or second resources, it is necessary to perform a reverse operation with the first resource server or the second resource server to maintain the balance of the first resource or the second resource. The first resource server or the second resource server is a server of an organization that centrally owns the first resource or the second resource, and it has a large number of first resources and second resources to meet the reverse operation requirements. However, when the resource interaction service performs a reverse operation with the resource server, the interaction is performed using the parameters used by the resource server for the interaction between the second resource and the first resource during the reverse operation. In some cases, because the parameters in the resource interaction server when performing resource interaction with the object are different from the parameters when performing a reverse operation to the resource server, additional overhead is caused to the resource interaction server.

[0104] For example, an object has some first resources and needs to obtain the corresponding second resources from a resource interaction server. The resource interaction server sends the second resources to the object according to the parameters used by the resource interaction server at that time for the interaction between the second resources and the first resources, and receives the first resources of the object. At this time, the second resources of the resource interaction server are insufficient. If many objects use the first resources to obtain the second resources from the resource interaction server, the resource interaction server will have no second resources. Therefore, it is necessary to request a reverse operation from the resource server for the second resource in a timely manner, obtain the second resource of the resource server, and provide the first resource to the resource server according to the parameters used by the resource server at that time for the interaction between the second resource and the first resource. At this time, if the parameters used for resource interaction when the resource interaction server interacts with the object are less than the parameters used for resource interaction when performing a reverse operation to the resource server, it will cause additional overhead to the resource interaction server.

[0105] Therefore, how to optimize resource interaction processing overhead and achieve optimal resource interaction configuration is a problem that needs to be solved urgently.

[0106] System architecture and scenario description of the application of the embodiments of the present disclosure

[0107] See also Figure 1 The system architecture to which the resource interaction processing method of the embodiment of the present disclosure is applied includes a terminal 110 , a resource interaction server 120 , a first resource server 130 , and a second resource server 140 .

[0108] The terminal 110 is a device for initiating a resource interaction request. The terminal 110 can be embodied in various forms such as a desktop computer, a laptop computer, a mobile phone, a personal digital assistant (PDA), a vehicle-mounted terminal, a dedicated terminal, a server, etc. The terminal 110 is a device used by the object, and the object sends a resource interaction request to the resource interaction server 120 through the terminal 110 to interact with the resource interaction server 120. Among them, the resource interaction request is used to request to interact with the resource interaction server 120 for the first resource or the second resource.

[0109] The resource interaction server 120 is a server that provides resource interaction services for the object. After the resource interaction server 120 interacts with the terminal 110 of the object, it needs to perform reverse operations on the insufficient part of a certain resource to the first resource server 130 or the second resource server 140 to maintain the balance of the resource.

[0110] The first resource server 130 and the second resource server 140 are institutional servers that have a large number of first resources and second resources, thereby providing the above reverse operation for the resource interaction server 120. For example, the first resource server 130 may be located in China, and the second resource server 140 may be located abroad, or vice versa.

[0111] The second resource server 140 and the first resource server 130 may have different interaction parameters for the same resource type pair (eg, resource type A interacting with resource type B).

[0112] The embodiments of the present disclosure can be applied in various scenarios, such as Figure 2A - The scene in which the object A shown in F interacts with the second resource using the first resource, Figure 3A -A scenario in which object A shown in F interacts with the first resource using the second resource, etc.

[0113] (I) Scenario where object A interacts with the second resource using the first resource

[0114] like Figure 2A As shown, object A initiates a request to the resource interaction server 120, requesting to use the first resource to interact with the second resource. When the resource interaction server 120 receives the request, it obtains and displays the second resource value of the second resource to be interacted and the parameters used for the interaction between the second resource and the first resource. At the same time, the first resource value of the first resource is converted according to the second resource value of the second resource to be interacted and the parameters used for the interaction between the second resource and the first resource, and the converted first resource value is displayed. For example, if the value of the second resource to be interacted is 10,000 second resources, the current parameter used for the interaction between the second resource and the first resource is 7.17, and the second resource is converted into the first resource value of 71,700 first resources. If it is agreed that object A interacts with the second resource with the first resource, the 10,000 second resources to be interacted are sent to object A, 71,700 first resources of object A are received, and the "OK" button is clicked to interact.

[0115] like Figure 2BAs shown, after determining to interact with object A with the first resource for the second resource, 10,000 second resources to be interacted are sent to object A, and 71,700 first resources sent by object A are received. At the same time, a rectangular pop-up window is displayed saying "71,700 first resources of object A have been received, and 10,000 second resources have been sent to object A". In order to distinguish the status of the first resources and the second resources in each resource pool of the resource interaction server 120, the status of the first resources and the second resources in each resource pool is updated according to the situation of receiving 71,700 first resources of object A and sending 10,000 second resources to object A. Among them, the first resource pool and the second resource pool of the resource interaction server 120 are two different libraries for storing resources. The first resource pool stores the first resource and the second resource, and the resources stored therein are usually used to interact with the object or the first resource server. The second resource pool stores the first resource and the second resource, and the resources stored therein are usually used to interact with the second resource server. The total resource pool is a collection of the first resource pool and the second resource pool. Therefore, after completing the resource interaction with object A, a table is displayed through a pop-up window, and the table content is: there are 71,700 first resources in the first resource pool (71,700 first resources of the object were received), -10,000 second resources (10,000 second resources were sent to the object), the first resources and second resources of the second resource pool remain at 0 (no interaction with the second resource server), and the total resource pool has -10,000 second resources and 71,700 first resources.

[0116] like Figure 2C to Figure 2D As shown, after the resource interaction server 120 determines the first resource and the second resource of each resource pool, due to the shortage of the second resource, it is necessary to perform a reverse operation with the first resource server 130 or the second resource server 140 to offset the shortage of the second resource and maintain the resource balance within the resource interaction server 120. When it is found that the current first resource server 130 is unavailable, it is necessary to initiate a resource interaction with the second resource server 140 to perform a reverse operation on the -10000 second resources. Figure 2C In the dialog box, the object is asked whether it is sure to perform a reverse operation with the second resource server 140. At this time, a rectangular pop-up window is displayed to prompt "Since the first resource server 130 is unavailable, do you want to initiate resource interaction with the second resource server 140 to perform a reverse operation on the second resource-10000?". At the same time, the parameters used for the interaction between the second resource and the first resource in the current second resource server 140 are obtained and displayed, such as 7.18. If it is determined that the second resource-10000 is to be reversely operated with the second resource server 140 based on the parameters of 7.18, the object clicks the "OK" button to perform a reverse operation on the second resource-10000 with the second resource server 140. The interface jumps to the following figure: Figure 2D The interface shown in the figure. Figure 2DAs shown, a rectangular pop-up window is displayed, and the content of the pop-up window is "Interaction completed, reverse operation completed". At the same time, after the reverse operation is completed with the second resource -10000 and the second resource server 140, the first resource and the second resource of each resource pool in the resource interaction server 120 are updated. Due to the resource interaction with the second resource server 140, the first resource and the second resource of the first resource pool remain unchanged. The second resource of the first resource pool remains at -10000, and the first resource remains at 71700. The second resource of the second resource pool is 10000, and the first resource is -71800, so the first resource of the total resource pool is -100, and the second resource is 0. Through Figure 2D It can be seen that after the resource interaction server 120 interacts with the object A and then performs a reverse operation, an overhead of 100 first resources will be generated.

[0117] like FIG. 2E to FIG. 2F As shown, due to the overhead generated, the resource interaction processing overhead needs to be optimized. The first parameter and the second parameter used for the interaction between the second resource and the first resource in the first resource server 130 and the second resource server 140 are constantly observed. If the first parameter is 7.19 and the second parameter is 7.21, it is determined that the first parameter and the second parameter meet the first condition (the determination method will be described later), and the value of the first resource in the first resource pool meets the second condition (the determination method will be described later), and a pop-up window is displayed to ask whether to re-interact with the resources. The content of the pop-up window is "It is observed that the first parameter used for the interaction between the second resource and the first resource in the first resource server 130 is 7.19, and the second parameter used for the interaction between the second resource and the first resource in the second resource server 140 is 7.21, and the first resource pool has 71,700 first resources. Do you want to re-interact with the resources?". If the object clicks the "OK" button, it interacts with the first resource server 130 with the first parameter 7.19, and then interacts with the second resource server 140 with the second parameter 7.21. When the interaction is completed, the interface changes from Figure 2E Jump to Figure 2F, a rectangular pop-up window is displayed, and the content of the pop-up window is "Interaction completed". The resource interaction server 120 updates the status of the first resource and the second resource of each resource pool. The first resource pool adds 10,000 second resources and reduces 71,900 first resources. The first resource of the first resource pool is 71,700-71,900=-200, and the second resource is -10,000+10,000=0. The second resource pool adds 72,100 first resources and reduces 10,000 second resources, so the first resource of the second resource pool is -71,800+72,100=300, and the second resource is 10,000-10,000=0. The first resource of the total resource pool is -200+300=100, and the second resource is 0. At this time, the overhead is -100, indicating that after the above-mentioned re-resource interaction, the resource interaction server 120 not only did not lose resources, but also increased resources.

[0118] It is obvious from the above scenario that before the re-resource interaction, the cost of the first resource is 100, and after the re-resource interaction, the cost is -100. The cost is reduced.

[0119] (II) Scenario where object A interacts with the first resource using the second resource

[0120] like Figure 3A As shown, the resource interaction server 120 receives a request sent by object A, which is used to interact with the first resource with the second resource. The current value of the first resource to be interacted and the parameters used for the interaction between the second resource and the first resource are obtained and displayed, so as to convert the value of the second resource according to the parameters and the value of the first resource. For example, the value of the first resource to be interacted is 71,700 first resources. The current parameter used for the interaction between the second resource and the first resource is 7.17, and it is determined that the value of the first resource converted into the value of the second resource is 10,000 second resources. At this time, a rectangular pop-up window "First resource to be interacted: 71,700; current parameters used for the interaction between the second resource and the first resource: 7.17; converted second resource: 10,000 second resources" is displayed. If the object clicks the "OK" button, resource interaction is performed with object A.

[0121] like Figure 3B As shown, when the object clicks the "OK" button, 71,700 first resources are sent to object A, and 10,000 second resources from object A are received. At the same time, a rectangular pop-up window "10,000 second resources from object A have been received, and 71,700 first resources have been sent to object A" is displayed, and the status of the first resources and second resources of each resource pool of the resource interaction server 120 is updated. Figure 3BAs shown, 10,000 second resources are received and 71,700 first resources are sent, so the first resource pool is reduced by 71,700 first resources and increased by 10,000 second resources, and the first resources and second resources of the second resource pool remain unchanged, so the first resources of the total resource pool are -71,700 and the second resources are 10,000.

[0122] like FIG. 3C to FIG. 3D , after the resource interaction server 120 interacts with object A, the first resource pool has a shortage of 71700. In order to maintain resource balance, a reverse operation is required. If it is identified that the current first resource server 130 is unavailable, a resource interaction is initiated to the second resource server 140, and the parameters used for the interaction between the second resource and the first resource in the current second resource server 140 are obtained, so as to perform a reverse operation on the second resource according to the current parameters. Figure 3C As shown, if a reverse operation is required for the 10,000 second resources, a pop-up window will be displayed to ask whether to perform a reverse operation with the current parameters. The content of the pop-up window is "Since the current first resource server is unavailable, a resource interaction is initiated to the second resource server to perform a reverse operation on the second resource 10000". At the same time, the parameters 7.18 for the interaction between the second resource and the first resource in the current resource server are displayed. If the object determines to perform a reverse operation on the 10,000 second resources with the second resource server 140 with the current parameters, the object clicks the "OK" button. After completing the reverse operation with the second resource server 140, the interface of the resource interaction server 120 changes from Figure 3C Jump to Figure 3D , a pop-up window prompts that the reverse operation is completed, and the pop-up window content is "Interaction completed, reverse operation completed". At this time, the second resource pool reduces 10,000 second resources and increases 71,800 second resources. The first resource and the second resource of the first resource pool remain unchanged, and Figure 3B The same. Therefore, the first resource of the total resource pool is -71700+71800=100, and the second resource is 10000-10000=0. At this time, the overhead is -100, that is, when performing the reverse operation, the resource interaction server 120 adds an additional first resource 100, but in order to optimize the additional resources generated by the resource interaction, it is necessary to further reduce the overhead to increase the additional resources generated.

[0123] like FIG. 3E to FIG. 3F When it is observed that the parameters for the interaction between the second resource and the first resource in the second resource server 140 and the first resource server 130 have changed, and the first resource in the first resource pool meets the requirements, it is inquired whether to re-interact with the resources. Figure 2EAs shown, it is observed that the first parameter used for the interaction between the second resource and the first resource in the first resource server 130 is 7.21, the second parameter used for the interaction between the second resource and the first resource in the second resource server 140 is 7.19, and the first resource pool has -71700 first resources. Therefore, it is determined that the first parameter and the second parameter meet the first condition, and the first resource in the first resource pool meets the second condition. At this time, a pop-up window is displayed asking whether to re-interact with the resources. If the object clicks the "OK" button, resource interaction is first performed with the first resource server 130 using the first parameter 7.21, and then resource interaction is performed with the second resource server 140 using the second parameter 7.19. When the resource interaction is completed, the interface of the resource interaction server 120 is changed to Figure 3E Jump to Figure 3F .like Figure 3F As shown, a pop-up window of "Interaction Completed" is displayed, and the status of the first resource and the second resource of each resource pool in the interface is updated. Since 72100 first resources are received from the first resource server 130, the first resource of the first resource pool is -71700+72100=400, and the second resource is 10000-10000=0. Since 10000 first resources are received from the second resource server 140, the first resource of the second resource pool is 71800-71900=-100, and the second resource is -10000+10000=0, so the first resource of the total resource pool is 400-100=300, and the second resource is 0. At this time, the overhead is -300, which is further reduced compared with the previous overhead of -100.

[0124] It is obvious from the above scenario that after observing that the first parameter and the second parameter satisfy the first condition and the second resource value in the first resource pool satisfies the second condition, resource interaction is performed with the first resource server 130 and then with the second resource server 140, which can reduce the overhead of the resource interaction server 120.

[0125] General description of the disclosed embodiments

[0126] According to an embodiment of the present disclosure, a resource interaction processing method is provided. The resource interaction processing method is applied to a resource interaction server 120 to perform resource interaction between an object, a first resource server 130 , and a second resource server 140 .

[0127] like Figure 4 As shown, a resource interaction processing method according to an embodiment of the present disclosure includes:

[0128] Step 401, determining whether the first parameter and the second parameter satisfy a first condition;

[0129] Step 402, determining whether the value of the first resource in the first resource pool satisfies the second condition;

[0130] Step 403, initiating a first request to the first resource server 130, so as to perform first resource interaction with the first resource server 130 based on the first resource in the first resource pool using the first parameter;

[0131] Step 404: Initiate a second request to the second resource server 140 to interact with the second resource with the second resource server 140 using the second parameter.

[0132] Steps 401-403 are briefly described below.

[0133] In step 401, the first parameter is the current parameter used for the interaction between the second resource and the first resource in the first resource server 130, which may refer to the number of first resources converted from the unit number of the second resource in the first resource server 130. For example, the first parameter is 7.21, which means that one second resource is equivalent to 7.21 first resources. The second parameter is the current parameter used for the interaction between the second resource and the first resource in the second resource server 140, which may refer to the number of first resources converted from the unit number of the second resource in the second resource server 140. For example, the second parameter is 7.19, which means that one second resource is equivalent to 7.19 first resources.

[0134] How to determine whether the first parameter and the second parameter satisfy the first condition will be described in detail in the detailed description of each step below. The first parameter and the second parameter satisfy the first condition, and after re-interacting resources with the first resource server 130 and the second resource server 140 in the following steps 403-404, the overhead of the resource interaction server 120 can be reduced.

[0135] After determining that the first parameter and the second parameter meet the first condition, in step 402, it is determined whether the value of the first resource in the first resource pool meets the second condition. The size of the interaction overhead is usually determined by the balance of the first resource after the reverse operation or the re-resource interaction. Therefore, it is determined whether the value of the first resource in the first resource pool meets the second condition. When the value of the first resource in the first resource pool meets the second condition, the re-resource interaction of steps 403-404 is performed once, thereby reducing the waste of computing power caused by endless re-resource interaction of steps 403-404.

[0136] After determining that the first parameter and the second parameter satisfy the first condition, and determining that the first resource value in the first resource pool satisfies the second condition, in step 403, resource interaction may be re-performed with the first resource server 130 and the second resource server 140 to optimize the overhead generated by resource interaction. Therefore, the resource interaction server 120 initiates a first request to the first resource server 130 to perform a first resource interaction with the first resource server 130 in the first resource pool using the first parameter. The standard for the first resource interaction may be to operate the second resource value corresponding to the first resource value in the first resource pool in the direction of 0. For example, if the second resource value is positive, the second resource value is reduced; if the second resource value is negative, the second resource value is increased. The second resource value is selected instead of the first resource value for the above operation because the balance of the first resource is usually used as a standard for measuring the interaction overhead, so the second resource value is operated in the direction of 0. When the second resource value is operated in the direction of 0, the first resource in the first resource pool may need to perform an operation opposite to the second resource value. For example Figure 2F As shown, the second resource of the first resource pool is -10000. To change -10000 to 0, 10000 needs to be increased, and the corresponding first resource value needs to be reduced by 71900 according to the first parameter 7.19.

[0137] After the resource interaction server 120 completes the resource interaction with the first resource server 130, in step 404, a second request is initiated to the second resource server 140 to interact with the second resource server 140 in the second resource pool using the second parameter. Since after the re-resource interaction in steps 403-404, the first resource value and the second resource value in the total resource pool must maintain a balance, and in step 403, the second resource value corresponding to the first resource value has been operated in the direction of 0 in the first resource pool, therefore, in step 404, the second resource value corresponding to the first resource value can only be changed in the second resource pool in the opposite direction to the above-mentioned direction of 0 to maintain the balance of the second resource value in the total resource pool. Since the operation direction of the first resource is opposite to the operation direction of the second resource in the same resource pool, the operation direction of the first resource in the second resource pool in step 404 is also opposite to the operation direction of the first resource in the first resource pool in step 403, and therefore the balance of the first resource value in the total resource pool can also be maintained. Figure 3FAs shown, in step 403, the second resource -10000 in the first resource pool is operated in the direction of 0, and an operation of increasing 10000 is required. Therefore, in step 404, the second resource 10000 in the second resource pool needs to be reduced by 10000, and the second resource in the second resource pool becomes 10000-10000=0. At the same time, the first resource in the second resource pool needs to be increased by 72100 according to the second parameter 7.21, and the first resource in the second resource pool becomes -71800+72100=300. The second resource in the total resource pool is 0, the first resource is -200+300=100, and the overhead changes from 100 to -100, reducing the resource interaction overhead of the resource interaction server 120.

[0138] Through the above process, once it is determined that the first parameter for the interaction between the second resource and the first resource in the first resource server and the second parameter for the interaction between the second resource and the first resource in the second resource server meet the first condition, and the value of the first resource in the first resource pool meets the second condition, the first resource interaction can be performed to the first resource server according to the first parameter to perform a reverse operation on the second resource again, and the second resource interaction can be performed to the second resource server according to the second parameter to offset the result of the first reverse operation with the second resource server. The first parameter and the second parameter meet the first condition, so that the processing overhead after the above two resource interactions is reduced. At the same time, after the above two resource interactions, the selection of the resource server for resource interaction is more reasonable, and the resource configuration is optimized.

[0139] In one embodiment, the first resource is fixed, and the second resource has various resource types. In this case, each second resource and the first resource will have an interaction parameter. The current parameter for the interaction between the second resource of the resource type to be interacted with and the first resource in the first resource server is used as the first parameter, and the current parameter for the interaction between the second resource of the resource type to be interacted with and the first resource in the second resource server is used as the second parameter. Figure 5A The diagram shows parameters for the interaction between the second resource and the first resource of various resource types in the first resource server, wherein the resource type to be interacted is resource type 3, and the first parameter is 7.19. Figure 5B The diagram shows parameters used in the second resource server for interaction between the second resource of various resource types and the first resource, wherein the resource type to be interacted is resource type 3, and the first parameter is 7.21.

[0140] The advantage of the above embodiment is that different types of second resources are distinguished, and each second resource has different parameters for interacting with the first resource. In step 403 and step 404, only the second resource of the resource type to be interacted with is operated, and other types of second resources are not operated. This embodiment can adopt separate interaction implementation methods for different types of second resources, so it has greater flexibility and scenario transplantation capability.

[0141] The above is a brief description of steps 401 to 404, and these steps will be described in detail below. Since the specific implementation methods of these steps in the above-mentioned scenario of interaction between the first resource and the second resource and the scenario of interaction between the second resource and the first resource are different, the process of steps 401-404 will be described in detail below by distinguishing the two scenarios.

[0142] Implementation process of each step in the scenario of interaction between the first resource and the second resource

[0143] (I) Pre-process before step 401

[0144] In the scenario of using the first resource to interact with the second resource, the resource interaction server 120 receives the first resource of the object and sends the second resource to the object. Therefore, the value of the first resource in the first resource pool is positive.

[0145] In one embodiment, Figure 6 As shown, before step 401, the following pre-process may be included:

[0146] Step 601: whenever a third request for obtaining a second resource from an object is received, a first resource from the object is stored in a first resource pool, and a second resource is taken out from the first resource pool and sent to the object, wherein the first resource from the object is obtained by converting the second resource according to a fifth parameter, and the fifth parameter is a parameter used in the resource interaction server 120 for interaction between the second resource and the first resource when the third request is received;

[0147] Step 602: If the first resource server 130 is available and the third parameter is not greater than the fourth parameter, the second resource is received from the first resource server 130 and stored in the first resource pool, the second resource is taken out from the first resource pool and converted into the first resource according to the third parameter, and sent to the first resource server 130, wherein the third parameter is a parameter used in the first resource server 130 for interaction between the second resource and the first resource when the third request is received, and the fourth parameter is a parameter used in the second resource server 140 for interaction between the second resource and the first resource when the third request is received;

[0148] Step 603: If the first resource server 130 is not available, or although the first resource server 130 is available but the third parameter is greater than the fourth parameter, the second resource is received from the second resource server 140, stored in the second resource pool, the second resource is taken out from the second resource pool, converted into the first resource according to the fourth parameter, and sent to the second resource server 140.

[0149] Steps 601-603 are described in detail below.

[0150] In step 601, a third request is sent by the object to the resource interaction server 120, and the third request indicates that the object needs to interact with the second resource with the first resource. After receiving the third request, the resource interaction server 120 calculates the first resource value based on the second resource value and the fifth parameter, receives the first resource of the first resource value of the object, and sends the second resource corresponding to the second resource value to the object. Among them, the parameters used for the interaction between the second resource and the first resource in the resource interaction server 120 will float in real time, so when the resource interaction server 120 receives the third request from the object, the current parameters of the resource interaction server 120 used for the interaction between the second resource and the first resource are directly obtained as the fifth parameter. Since the first resource pool is the resource pool used by the resource interaction server 120 to interact with the object or the first resource server 130 for resources, the second resource is taken out of the first resource pool and sent to the object, and the first resource sent by the object is stored in the first resource pool. Figure 2B As shown, if the fifth parameter is 7.17, the original first resource and second resource of the first resource pool in the resource interaction server 120 are both 0, 10,000 second resources are sent to the object, and the second resource in the first resource pool becomes -10,000. At the same time, the resource interaction server 120 calculates the first resource value as 71,700 based on the fifth parameter and the second resource value, receives 71,700 first resources from the object, and puts them in the first resource pool. The first resource in the first resource pool becomes 71,700.

[0151] The resource interaction server 120 may be provided with a request discovery port, through which the third request initiated by the object is discovered. The resource interaction server 120 starts the request discovery port regularly according to a preset time period, and discovers the third request sent by the object in real time through the request discovery port. Since the resource interaction server 120 can be connected to a large number of objects to interact with a large number of objects, the frequency at which the resource interaction server 120 starts the request discovery port needs to be higher than or equal to the frequency at which the object sends the third request, so that the third request of each object can be received, so as to interact with the object in real time. For example, the preset time period is 0.001 seconds, and the request discovery port is started once every 0.001 seconds, and the third request sent by 1000 objects can be received within 1 second.

[0152] In step 602, after completing the resource interaction with the object, the resource interaction server 120 needs to balance the internal resources, so it needs to perform a reverse operation with the first resource server 130 or the second resource server 140. First, the service status of the first resource server 130 is obtained. If the service status is available, it means that both the first resource server 130 and the second resource server 140 can be used for reverse operation (the second resource server 140 generally remains available). At this time, it is necessary to compare whether it is more advantageous to perform a reverse operation with the first resource server 130 or to perform a reverse operation with the second resource server 140. At this time, the current parameter of the first resource server 130 for the interaction between the second resource and the first resource is obtained as the third parameter, and the current parameter of the second resource server 140 for the interaction between the second resource and the first resource is obtained as the fourth parameter. The third parameter and the fourth parameter are compared. If the third parameter is not greater than the fourth parameter, it is more advantageous for the resource interaction server 120 to perform a reverse operation with the first resource server 130. At this time, the resource interaction server 120 takes out the first resource corresponding to the first resource value from the first resource pool and sends it to the first resource server 130 according to the second resource value required and the first resource value converted from the third parameter, and receives the second resource corresponding to the second resource value sent by the first resource server 130, and stores the second resource in the first resource pool. For example, if the third parameter is 7.18 and the fourth parameter is 7.19, the third parameter is not greater than the fourth parameter, and it is determined to perform resource interaction with the first resource server 130 with the third parameter. The resource interaction server 120 converts the 10,000 second resources that need to be reversed into the first resource value of 71,900 according to the third parameter, first deducts 71,900 first resources from the first resource pool, sends them to the first resource server 130, receives 10,000 second resources sent by the first resource server 130, and stores the 10,000 second resources in the first resource pool to complete the operation.

[0153] In step 603, if the service status of the first resource server 130 is unavailable (it is impossible to interact with the first resource server 130), or the service status is available, but the third parameter is greater than the fourth parameter (resource interaction with the first resource server 130 is not as good as resource interaction with the second resource server 140, which can leave more first resources), it is determined to interact with the second resource server 140. The second resource pool is a resource pool for resource interaction between the resource interaction server 120 and the second resource server 140, so the resource interaction server 120 determines the second resource value that needs to be compensated based on the second resource value sent to the object, and calculates the converted first resource value based on the second resource value and the fourth parameter. The first resource corresponding to the first resource value is taken out from the second resource pool and sent to the second resource server 140, and the second resource corresponding to the second resource value is received from the second resource server 140, and the second resource is stored in the second resource pool. Figure 2D As shown, if the service status of the first resource server 130 is unavailable, or the third parameter is 7.20 and the fourth parameter is 7.18, it is determined to perform resource interaction with the second resource server 140, and the resource interaction server 120 needs 10,000 second resources. The first resource value calculated based on the second resource value and the fourth parameter is 71,800. 71,800 first resources are taken out from the second resource pool and sent to the second resource server 140, and 10,000 second resources sent by the second resource server 140 are received, and the second resources are stored in the second resource pool.

[0154] In actual operation, it is not necessarily the case that each time a third request is received from an object to interact with a second resource using a first resource and a reverse operation is performed with the second resource server 140, a re-resource interaction will be immediately performed with the first resource server 130 and the second resource server 140. Often, after a sufficient number of such object resource interactions and reverse operations, the value of the first resource in the first resource pool accumulates to a certain level (i.e., the second condition of step 402 is met), and then a re-resource interaction will be performed to reduce the consumption caused by resource interaction. The reason for paying attention to the accumulation of the value of the first resource in the first resource pool is that re-resource interaction with the first resource server 130 and the second resource server 140 often requires a certain amount of first resources in the resource interaction server 120 to start. Figure 7As shown, the object initiates an interaction request for interacting with the second resource using the first resource, that is, the third request. The resource interaction server 120 collects the third request. Then, the first resource of the object is received and stored in the first resource pool. Then, it is determined whether the first resource server 130 is available. If it is not available, or it is available but the third parameter of the first resource server 130 is greater than the fourth parameter of the second resource server 140, then the reverse operation is selected with the second resource server 140. At this time, the reverse operation affects the first resource and the second resource of the second resource pool, so the first resource of the first resource pool does not change. However, if the first resource server 130 is available and the third parameter of the first resource server 130 is not greater than the fourth parameter of the second resource server 140, then the reverse operation is selected with the first resource server 130. At this time, the reverse operation affects the first resource and the second resource of the first resource pool, so the first resource of the first resource pool will be reduced. The resource interaction server 120 repeatedly receives the resource interaction request of the object, and after multiple interactions with the object resources and reverse operations with the first resource server 130 or the second resource server 140, the first resource in the first resource pool is increased or decreased several times until the accumulation meets the second condition, and then re-resource interaction is triggered. The advantage of this is that it can reduce the waste of computing power for starting re-resource interaction every time resource interaction and reverse operations are performed with the object.

[0155] Next, the process of steps 401-404 as described above is performed. Figure 8 As shown, after completing the reverse operation with the first resource server 130 or the second resource server 140, start to observe the first parameter used for the interaction between the second resource and the first resource in the first resource server 130 in real time, and observe the second parameter used for the interaction between the second resource and the first resource in the second resource server 140 in real time. Determine whether the first parameter and the second parameter meet the first condition. If the first parameter and the second parameter do not meet the first condition, re-observe the first parameter used for the interaction between the second resource and the first resource in the first resource server 130, and observe the second parameter used for the interaction between the second resource and the first resource in the second resource server 140 until the first parameter and the second parameter meet the first condition. When the first condition is met, further determine whether the value of the first resource in the first resource pool meets the second condition. If the second condition is met, re-resource interaction is performed with the first resource server 130 and the second resource server 140. When re-resource interaction is performed with the first resource server, the first resource in the first resource pool will be deducted. Therefore, after the re-resource interaction is completed, the first resource in the first resource pool will not meet the first condition. At this time, the accumulation of resource interaction and reverse operation with the object is performed again until the first condition is met again. The following is a detailed description of main steps 401-404 in a scenario where a first resource interacts with a second resource.

[0156] (II) Detailed Description of Step 401

[0157] In step 401, it is necessary to determine whether the first parameter and the second parameter satisfy the first condition, so that in the subsequent process, the resource interaction server 120 can perform two resource interactions with the first resource server 130 and the second resource server 140, thereby reducing resource interaction overhead.

[0158] In one embodiment, Fig. 9 As shown, step 401 includes:

[0159] Step 901: Subtract the first parameter from the second parameter to obtain a first difference;

[0160] Step 902: Subtract the fifth parameter from the fourth parameter to obtain a second difference;

[0161] Step 903: Based on the first difference and the second difference, determine that the first parameter and the second parameter satisfy a first condition.

[0162] Steps 901-903 are described in detail below.

[0163] The first parameter is a parameter used for the interaction between the second resource and the first resource when the first resource server 130 receives the first request, and the second parameter is a parameter used for the interaction between the second resource and the first resource when the second resource server 140 receives the second request. The fourth parameter is a parameter used for the interaction between the second resource and the first resource of the second resource server 140 when the resource interaction server 120 receives the third request, and the fifth parameter is a parameter used for the interaction between the second resource and the first resource when the resource interaction server 120 receives the third request. Through the first difference, the increase of the first resource brought about by the re-resource interaction with the first resource server 130 and the second resource server 140 is determined. Through the second difference, the loss of the first resource generated by the process of performing the reverse operation after interacting with the object resource is determined. Generally speaking, if the first difference is greater than the second difference, it means that the increase of the first resource can make up for the loss of the first resource, and it is beneficial to re-interact with the resources. However, sometimes according to actual needs, the first difference and the second difference need to meet more complex conditions to determine whether to start the re-resource interaction.

[0164] For example, if the first parameter is 7.19, the second parameter is 7.21, the fourth parameter is 7.18, and the fifth parameter is 7.17, then the first difference is 7.21-7.19=0.02, and the second difference is 7.18-7.17=0.01. Therefore, if the condition that the first difference and the second difference need to satisfy in step 903 is that the first difference is greater than the second difference, and 0.02 is greater than 0.01, it is determined that the first resource server 130 and the second resource server 140 can be re-interacted with resources to optimize the overhead of resource interaction processing.

[0165] The advantage of the embodiment of steps 901-903 is that the first difference is first calculated to represent the first resource that can be increased through the above-mentioned re-resource interaction, and then the second difference is calculated to represent the resource overhead of the first resource generated by the reverse operation, and then based on the first difference and the second difference, it is determined whether to perform re-resource interaction. Through sophisticated calculations, it is ensured that the increase in the first resource can make up for the overhead of the first resource, thereby improving the accuracy of starting the re-resource interaction. In addition, this implementation method is more flexible and convenient for setting conditions according to actual needs.

[0166] For step 903, one implementation method may be as described above, if the first difference is greater than the second difference, it is determined that the first parameter and the second parameter meet the first condition, and at this time, the increase of the first resource can fully compensate for the loss of the first resource. In other implementations, the first difference is greater than the sum of the second difference and another threshold value, so as to ensure that the increase of the first resource not only compensates for the loss of the first resource, but also has an appropriate surplus of the first resource, thereby optimizing the re-resource interaction cost. In other words, the difference between the first difference and the second difference is greater than a first threshold. When setting the first threshold, if the parameter curve of the interaction between the second resource and the first resource fluctuates greatly, it means that the parameter often undergoes relatively large changes, and accordingly, the set first threshold should be large. Conversely, a relatively small first threshold can be set.

[0167] In the latter embodiment, if Fig.10 As shown, step 903 includes:

[0168] Step 1001, subtract the second difference from the first difference to obtain a third difference;

[0169] Step 1002: According to the resource type of the second resource, obtain a first curve of the change of a parameter of the interaction between the second resource corresponding to the resource type and the first resource over time;

[0170] Step 1003: determining the variance of the parameter used for the interaction between the second resource and the first resource in the first curve;

[0171] Step 1004: Determine a first threshold based on the variance;

[0172] Step 1005: If the third difference is greater than the first threshold, determine that the first parameter and the second parameter satisfy the first condition.

[0173] Steps 1001-1005 are described in detail below.

[0174] In step 1001, the third difference is obtained by subtracting the second difference from the first difference. The third difference can be used to determine the remaining first resources after the first resources added by the re-resource interaction with the first resource server 130 and the second resource server 140 compensate for the first resource overhead of the reverse operation. The third difference can be a positive number or a negative number. If the third difference is a positive number, it means that the first resources added by the re-resource interaction are greater than the first resource overhead after the reverse operation. If the third difference is a negative number, it means that the first resources added by the re-resource interaction are less than the first resource overhead after the reverse operation.

[0175] In step 1002, the parameters for the interaction between the second resource and the first resource corresponding to each resource type will change in real time. The parameters for the interaction between the second resource and the first resource corresponding to each resource type are collected in real time, and a first curve of the change of the parameter over time for each resource type is constructed based on the collected parameters. For example, if the resource type of the second resource is resource type 3, the first curve corresponding to resource type 3 is obtained.

[0176] In step 1003, after obtaining the first curve, the variance of the parameter used for the interaction between the second resource and the first resource in the first curve needs to be calculated to reflect the degree of real-time change of the resource interaction parameter. The larger the variance, the more drastic the real-time change of the resource interaction parameter. The smaller the variance, the smoother the real-time change of the resource interaction parameter.

[0177] like Fig.11 As shown, a first curve l1 of the interaction parameters of the second resource corresponding to the resource type and the first resource over time is obtained, and the variance is calculated from the first curve as

[0178] After the variance is determined, in step 1004, a first threshold is determined based on the variance. In one embodiment, the variance can be directly used as the first threshold. In another embodiment, the variance can be multiplied by a coefficient as the first threshold. For example, the coefficient is 1.2. In the latter embodiment, the coefficient can be flexibly adjusted according to actual needs to adapt it to the specific needs of different scenarios. The latter embodiment improves the flexibility of triggering re-resource interaction.

[0179] After determining the first threshold, in step 1005, the third difference is compared with the first threshold. If the third difference is greater than the first threshold, it is determined that the first parameter and the second parameter meet the first condition, and then it is determined that re-resource interaction with the first resource server 130 and the second resource server 140 can optimize the overhead generated by resource interaction, and the degree of optimization meets the requirements. For example, if the first threshold is 0.02 and the third difference is 0.01, it means that the third difference is not greater than the first threshold. Although re-resource interaction with the first resource server 130 and the second resource server 140 based on the current first parameter and the second parameter can optimize the overhead generated by resource interaction, the degree of optimization does not meet the requirements. If the third difference is 0.03, then the third difference is greater than the first threshold, and it is determined that the first parameter and the second parameter meet the first condition. At this time, re-resource interaction with the first resource server 130 and the second resource server 140 based on the current first parameter and the second parameter can optimize the overhead generated by resource interaction, and the degree of optimization meets the requirements.

[0180] The advantage of steps 1001-1005 is that the determination of the first threshold is associated with the severity of real-time changes in parameters used for the interaction between the second resource and the first resource. When the real-time changes in parameters used for the interaction between the second resource and the first resource are relatively drastic, a relatively large first threshold is used. When the real-time changes in parameters used for the interaction between the second resource and the first resource are relatively slow, a relatively small first threshold is used, thereby improving the accuracy of triggering the timing of re-resource interaction.

[0181] When implementing the above step 1002, the first curve of the time-varying parameters of the interaction between the second resource corresponding to the resource type and the first resource can be directly obtained from the first resource server 130 (the first resource server 130 maintains the parameters for the interaction between the second resource and the first resource in real time, and the first curve can be obtained according to the parameters). The first curve can also be directly obtained from the second resource server 140. In another more complex embodiment, step 1002 includes:

[0182] According to the resource type of the second resource, obtaining from the first resource server 130 a first sub-curve of a parameter change over time for an interaction between the second resource corresponding to the resource type and the first resource;

[0183] According to the resource type of the second resource, obtaining from the second resource server 140 a second sub-curve of parameter changes over time for interaction between the second resource corresponding to the resource type and the first resource;

[0184] A first curve is generated according to the first sub-curve and the second sub-curve.

[0185] The first resource server 130 maintains in real time the parameters for the interaction between the second resource and the first resource of each resource type, and obtains the first sub-curve of the parameters of each resource type according to the real-time parameters. Therefore, according to the resource type of the second resource, the first sub-curve of the parameters of the interaction between the second resource corresponding to the resource type and the first resource over time can be obtained from the first resource server 130. Similarly, according to the resource type of the second resource, the second sub-curve of the parameters of the interaction between the second resource corresponding to the resource type and the first resource over time can also be obtained from the second resource server 140. Fig.12 As shown, the first sub-curve is Fig.12 As shown in l 11 in FIG. 1 , the change of the parameter of the interaction between the second resource corresponding to the resource type and the first resource in the first resource server 130 can be intuitively known through l 11. The second sub-curve is as follows: Fig.12 As shown in Figure 112, changes in parameters of the interaction between the second resource corresponding to the resource type and the first resource in the second resource server 140 can be intuitively known through Figure 112.

[0186] After obtaining the first sub-curve and the second sub-curve, the average curve of the first sub-curve and the second sub-curve can be used as the first curve. The method for obtaining the average curve can be, for a certain moment, averaging the parameter value of the first sub-curve and the parameter value of the second sub-curve at the moment to obtain the average parameter value at the moment. The average parameter values ​​obtained at each moment are plotted as a curve, namely the first curve. Fig.12 As shown, the first curve l1 is obtained by averaging the first sub-curve l11 and the second sub-curve l12, wherein H1 on the first sub-curve l11 and H3 on the second sub-curve l12 are averaged to obtain H2 of the first curve l1.

[0187] The above embodiment first obtains a first sub-curve of the parameter changes over time corresponding to a certain resource type in the first resource server 130, then obtains a second sub-curve of the parameter changes over time corresponding to the resource type in the second resource server 140, and then obtains the first curve by averaging the first sub-curve and the second sub-curve. This embodiment simultaneously considers the data from the first resource server 130 and the second resource server 140, so that the determination of the first curve is more accurate, and the accuracy of triggering the timing of re-resource interaction is improved.

[0188] In the above embodiment, the first curve is a curve of the parameters used for the interaction between the second resource and the first resource at all times in the past changing with time. In another embodiment, since the parameters used for the interaction between the second resource and the first resource in the recent period can better reflect the latest dynamics of the parameters, only the parameters used for the interaction between the second resource and the first resource corresponding to a certain resource type in the first time period before the current time are obtained, and the first curve is made accordingly. When determining the first time period, consider whether the interaction between the first resource and the second resource is frequent in history. If the interaction between the first resource and the second resource is very rare in history, the first time period should be longer at this time, because if the first resource and the second resource do not interact frequently, fewer parameters are obtained in a short time period, making the representativeness of the first curve worse. If the interaction between the first resource and the second resource is very frequent in history, the first time period can be shorter at this time.

[0189] Therefore, in this embodiment, step 1002 may also include:

[0190] According to the resource type of the second resource, obtaining the number of interactions between the second resource of the resource type and the first resource in a unit period;

[0191] Based on the number of interactions, determine the first duration;

[0192] A first curve showing the time-varying parameters of the interaction between the second resource corresponding to the resource type and the first resource within a first time period before the current time is obtained.

[0193] The number of interactions per unit period is the number of resource interactions performed by the resource interaction server 120 with the first resource server 130 or the second resource server 140 within a period. The period may be a day, a week, a month, etc. The number of interactions for different resource types may be the same or different. The method for obtaining the number of interactions per unit period may be: obtaining the number of interactions within a preset time range (e.g., 5 days), wherein the preset time range includes multiple unit periods; dividing the number of interactions within the preset time range by the number of unit periods (e.g., 5 days), to obtain the number of interactions per unit period.

[0194] After calculating the number of interactions, the number of interactions is inversely proportional to the first duration. The more interactions, the denser the samples of resource interactions are, and the shorter the first duration is. The fewer interactions, the sparser the samples of resource interactions are, and the longer the first duration is. After determining the first duration, obtain the parameters of the interaction between the second resource corresponding to the resource type and the first resource for the first duration before the current time, and construct the first curve based on the parameters that change over time. Fig.13As shown, the first time length is determined to be t, the parameters for the interaction between the second resource corresponding to a certain resource type and the first resource within t before the current time are obtained, and the first curve is constructed according to the parameters that change with time within the time range, so that the first curve is more in line with the latest trend and the accuracy of triggering the timing of re-resource interaction is improved.

[0195] In one embodiment, since the first parameter and the second parameter change too frequently, it will affect the stability of the resource interaction server 120 and the first resource server 130 and the second resource server 140 in re-resource interaction, so it is necessary to ensure that the first parameter and the second parameter meet the first condition for a period of time, rather than only meeting the first condition at one time point.

[0196] like Fig.14 As shown, in this embodiment, step 401 may include:

[0197] Step 1401: Obtain a second duration;

[0198] Step 1402: Determine whether the first parameter and the second parameter always satisfy the first condition within the second time period.

[0199] In step 1401, in one embodiment, the second duration may be a duration predefined by the object. However, in another embodiment, the second duration may be automatically determined. In the latter embodiment, obtaining the second duration includes:

[0200] Obtain a second curve of a first difference obtained by subtracting the first parameter from the second parameter over time;

[0201] Determine the number of zero crossings within a unit period of the second curve;

[0202] Based on the number of zero crossings, a second duration is determined.

[0203] The length of the second duration is related to the intensity of the fluctuation of the first parameter and the second parameter. The more intense the fluctuation of the first parameter and the second parameter within the unit period, the shorter the second duration can be selected, because a relatively short second duration is sufficient to reflect the characteristics of various changes in the first parameter and the second parameter. The smaller the fluctuation of the first parameter and the second parameter within the unit period, the longer the second duration needs to be selected, because when the fluctuation of the first parameter and the second parameter is relatively small, a longer time is needed to examine whether the relationship between the first parameter and the second parameter always meets the first condition to reduce misjudgment.

[0204] Therefore, the above embodiment first obtains the first difference of the second parameter minus the first parameter. Since the first parameter and the second parameter change with time, the first difference also changes with time. The change of the first difference with time is plotted into a second curve. Then the number of zero crossings of the second curve per unit time is determined, and the number of zero crossings is the number of times the first difference on the second curve changes from a positive number to a negative number, or from a negative number to a positive number. Fig.15 is a schematic diagram of the second curve. Fig.15 It can be seen that the first difference can be positive or negative as time changes, and the number of zero crossing points can be determined by determining the intersection of the second curve and the horizontal axis within a unit period. Fig.15 As shown, there are 11 zero crossing points. Assuming Fig.15 What is drawn is the second curve of 2 cycles, so the number of zero-crossing points in a unit cycle is 11 / 2=5.5.

[0205] The number of zero crossings is inversely proportional to the second duration. The more zero crossings there are, the more violent the fluctuations of the first parameter and the second parameter are, and a relatively short second duration is sufficient to reflect the characteristics of sufficient changes in the first parameter and the second parameter. The smaller the number of zero crossings, the more gradual the fluctuations of the first parameter and the second parameter are, and a relatively long second duration is required to absorb sufficient changes in the first parameter and the second parameter.

[0206] The advantage of determining the second duration based on the number of zero-crossing points is that the determination of the second duration is associated with the severity of the fluctuations of the first parameter and the second parameter, thereby making the determination of the second duration more in line with objective reality and improving the accuracy of triggering the timing of re-resource interaction.

[0207] The advantage of the above steps 1401-1402 is that by determining that the first parameter and the second parameter within the second time period both satisfy the first condition, re-resource interaction is triggered, thereby reducing the situation where the first parameter and the second parameter satisfy the first condition due to accidental fluctuations and thus trigger re-resource interaction, thereby improving the accuracy of the timing of triggering re-resource interaction.

[0208] In the above embodiment, the first parameter and the second parameter must continuously satisfy the first condition within the second time period. In another embodiment, it is also possible to consider whether the first parameter and the second parameter satisfy the first condition at discrete points.

[0209] like Fig.16 As shown, in this embodiment, step 401 may also include:

[0210] Step 1601, obtaining a first parameter and a second parameter every third time period;

[0211] Step 1602: Determine whether the first parameter and the second parameter obtained for a predetermined number of consecutive times satisfy the first condition.

[0212] In step 1601, the first parameter and the second parameter are acquired once at intervals of a third time period. The third time period is a preset time period, for example, once every minute, and the third time period is 1 minute.

[0213] In step 1602, the range of the predetermined number affects the stability judgment of the first parameter and the second parameter satisfying the first condition. In one embodiment, the predetermined number is determined by:

[0214] Obtain a second curve of a first difference obtained by subtracting the first parameter from the second parameter over time;

[0215] Determine the number of zero crossings within a unit period of the second curve;

[0216] Based on the number of zero crossings, the predetermined number is determined.

[0217] Similar to the above situation where the first parameter and the second parameter continuously satisfy the first condition within the second time period, the number of the first parameter and the second parameter that need to continuously satisfy the first condition, i.e., the predetermined number, is also related to the severity of the fluctuation of the first parameter and the second parameter. The more severe the fluctuation of the first parameter and the second parameter within the unit period, the smaller the predetermined number can be selected. Conversely, the predetermined number should be larger.

[0218] Therefore, the above embodiment first obtains the first difference of the second parameter minus the first parameter. The change of this first difference over time is plotted into a second curve. Then the number of zero crossings of the second curve within a unit period is determined, for example, the number of zero crossings within 1 second. The number of zero crossings is inversely proportional to the predetermined number. The more the number of zero crossings, the more violent the fluctuations of the first parameter and the second parameter are, and a relatively small predetermined number is sufficient to reflect the characteristics of sufficient changes in the first parameter and the second parameter. The smaller the number of zero crossings, the more gentle the fluctuations of the first parameter and the second parameter are, and a relatively large predetermined number must be used to reflect the characteristics of sufficient changes in the first parameter and the second parameter.

[0219] The advantage of determining the predetermined number based on the number of zero crossings is that the determination of the predetermined number is associated with the severity of fluctuations of the first parameter and the second parameter, thereby making the determination of the predetermined number that requires continuous satisfaction of the first condition more in line with objective reality and improving the accuracy of triggering the timing of re-resource interaction.

[0220] The advantage of the above steps 1601-1602 is that by obtaining multiple discrete first parameters and second parameters and then ensuring that the first parameters and second parameters satisfy the first condition for a predetermined number of consecutive times, the processing load is reduced compared with continuously determining whether the first parameters and second parameters satisfy the first condition.

[0221] (III) Detailed Description of Step 402

[0222] In a basic embodiment, step 402 includes: as long as the first resource value of the first resource pool is positive, it is determined that the first resource value satisfies the second condition. This is because, if the first resource value of the first resource pool is positive, it means that there is an initial first resource to start the subsequent re-resource interaction process. However, frequent triggering of the re-resource interaction process increases the processing load. In addition, any processing has a certain price, such as the cost of the processing unit and memory consumed for the processing, that is, the interaction operation cost. If the first resource value is positive, but the first resource value cannot even make up for the interaction operation cost, it is unwise to start the re-resource interaction.

[0223] Therefore, in one embodiment, if Fig.17 As shown, step 402 includes:

[0224] Step 1701: Determine the interactive operation cost;

[0225] Step 1702: If the first resource value is greater than the interaction operation cost, determine that the first resource value satisfies the second condition.

[0226] In step 1701, the interaction operation cost is the cost consumed by the resource interaction, such as the cost of the processing unit and memory consumed for the processing.

[0227] In one embodiment, determining the interoperation cost includes:

[0228] Determine the atomic operations involved in resource interactions;

[0229] According to the atomic operation, find the corresponding relationship table between the atomic operation and the operation cost, and obtain the operation cost corresponding to the atomic operation;

[0230] The operation costs corresponding to the atomic operations included in the resource interaction are added up to obtain the interaction operation cost.

[0231] An atomic operation is each basic operation that needs to be performed in the resource interaction process. For example, sending the second resource in the first resource pool to the object is an atomic operation, and determining the number of the first resource according to the parameters of the interaction between the second resource and the first resource is another atomic operation, and so on. Each atomic operation consumes the computing power of the processing unit and occupies storage space, so there will be a corresponding operation cost. The same atomic operation has the same operation cost. In this way, the operation cost corresponding to each atomic operation can be set in advance in the atomic operation and operation cost correspondence table. After determining the atomic operations included in the resource interaction, the atomic operation can be searched in the correspondence table to obtain the operation cost corresponding to the atomic operation. Finally, the operation costs corresponding to the atomic operations required for the entire resource interaction are summed up to obtain the interaction operation cost, so that the determination of the interaction operation cost is more accurate. For example, if the resource interaction requires 5 atomic operations, the operation costs of the 5 atomic operations are determined to be 2, 3, 1, 0, and 4 first resources according to the correspondence table. The operation costs of the 5 atomic operations are added up to obtain 10 first resources, that is, the interaction operation cost.

[0232] This embodiment decomposes resource interaction into atomic operations, which have fixed operation costs. The interaction operation costs are obtained by summing up the decomposition, thereby improving the accuracy of determining the interaction operation costs.

[0233] After determining the interaction operation cost, in step 1702, the value of the first resource in the first resource pool is compared with the interaction operation cost. If the value of the first resource is greater than the interaction operation cost, it can be determined that the first resource in the first resource pool can compensate for the cost generated by the interaction operation, and the interaction is beneficial.

[0234] The advantage of steps 1701-1702 is that the first resource in the first resource pool can compensate for the cost generated by the interactive operation, thereby improving the cost-effectiveness of the operation.

[0235] Operation costs (occupancy of processing unit computing power, storage space, etc.) are generated during resource interaction, and operation costs are also generated when there is no resource interaction (for example, the resource interaction server 120 also processes some statistical and analytical tasks, which also occupy processing unit computing power, storage space, etc.). Therefore, in one embodiment, after the first resource in the first resource pool interacts with the resource, it is also necessary to leave costs that can offset the costs required for non-resource interaction.

[0236] In this embodiment, if Fig.18 As shown, step 402 may also include:

[0237] Step 1801, determining the resource consumption value of non-resource interaction transactions per unit period;

[0238] Step 1802: Determine the reserved resource value based on the resource consumption value of the non-resource interaction transaction in the unit period;

[0239] Step 1803: If the first resource value is greater than the reserved resource value, determine that the first resource value satisfies the second condition.

[0240] In step 1801, the resource value consumed by the non-resource interaction transaction is the resource value consumed by the transaction that does not belong to resource interaction, such as the resource value converted from the processing unit computing power, storage space, etc. consumed by the statistics, analysis, etc. The resource value consumed by the non-resource interaction transaction within a preset time period is collected, wherein the preset time period includes D unit cycles. The resource value consumed by the non-resource interaction transaction within the preset time period is divided by D to obtain the resource value consumed by the non-resource interaction transaction in each unit cycle.

[0241] After determining the resource consumption value of the non-resource interaction transaction in the unit period, in step 1802, the resource consumption value of the non-resource interaction transaction in the unit period is used to determine how much resources need to be reserved as the operation cost of the non-resource interaction transaction, so as to determine the reserved resource value. The reserved resource value is used to offset the operation cost generated by the non-resource interaction transaction.

[0242] In one embodiment, step 1802 includes:

[0243] Obtain a second curve of a first difference obtained by subtracting the first parameter from the second parameter over time;

[0244] Determine the number of zero crossings within a unit period of the second curve;

[0245] The reserved resource value is obtained by dividing the resource consumption value of the non-resource interaction transaction per unit period by the number of zero crossing points.

[0246] The reserved resource value needs to meet the operational cost requirements of non-resource interaction transactions from starting one resource re-interaction to starting the next resource re-interaction. The time from starting one resource re-interaction to starting the next resource re-interaction is not a unit period. The unit period may include multiple times from starting one resource re-interaction to starting the next resource re-interaction. In order to determine the number of times between the above two starts included in the unit period, the number of zero crossings in the unit period of the second curve can be used for estimation. The second curve can be obtained first, where the second curve is a curve of the first difference of the first parameter minus the first parameter changing with time, such as Fig.15As shown. Then, the number of points where the second curve intersects the abscissa axis in a unit time is obtained as the number of zero-crossing points. The number of zero-crossing points is taken as the number of times between the above two starts included in a unit cycle. The resource value consumed by the non-resource interaction transaction in a unit cycle is divided by the number of zero-crossing points to obtain the estimated operation cost of the non-resource interaction transaction from starting one resource re-interaction to starting the next resource re-interaction, that is, the reserved resource value.

[0247] This embodiment determines the number of zero-crossing points within the unit period of the second curve and divides the resource consumption value of the non-resource interaction transaction per unit period by the number of zero-crossing points, thereby more accurately determining the estimated operating cost of the non-resource interaction transaction from initiating one resource re-interaction to initiating the next resource re-interaction, thereby improving the accuracy of determining the reserved resource value.

[0248] After determining the reserved resource value, in step 1803, the first resource value is compared with the reserved resource value to determine whether the first resource in the first resource pool can offset the operating costs generated by non-resource interaction transactions. If the first resource value is less than or equal to the reserved resource value, it means that the first resource value in the first resource pool is not sufficient to offset the operating costs generated by non-resource interaction transactions. If the first resource value is greater than the reserved resource value, it means that the first resource value in the first resource pool can offset the operating costs required for non-resource interaction transactions. If it is determined that the first resource value of the first resource pool meets the second condition at this time, it can reproduce resource interaction with the domestic resource interaction server 120 and the second resource server 140.

[0249] (IV) Detailed Description of Step 403

[0250] In one embodiment, using the first parameter to perform the first resource interaction with the first resource server 130 in step 403 includes: receiving the second resource from the first resource server 130, storing it in the first resource pool, taking out the second resource from the first resource pool, converting it into the first resource according to the first parameter, and sending it to the first resource server 130.

[0251] like Figure 8As shown, after determining that the first parameter and the second parameter meet the first condition, and the value of the first resource in the first resource pool meets the second condition, the resource interaction server 120 first interacts with the first resource server 130, wherein the second resource sent from the second resource server 140 is received, the second resource is stored in the first resource pool, and the first resource is taken out from the first resource pool and sent to the first resource server 130, so as to complete the resource interaction with the first resource server 130. For example, if the first parameter is 7.19, the second parameter is 7.21, and the value of the second resource is 10000, the first resource value is converted into 71900 according to the first parameter and the second resource value. The resource interaction server 120 receives 10000 second resources and stores them in the first resource pool, and then takes out 71900 first resources from the first resource pool and sends them to the first resource server 130.

[0252] (V) Detailed Description of Step 404

[0253] After completing the resource interaction with the first resource server 130, the resource interaction server 120 needs to interact with the second resource server 140. The second resource interaction with the second resource server 140 using the second parameter in step 404 includes: taking out the second resource from the second resource pool, sending it to the second resource server 140, receiving the first resource converted from the second resource server 140 according to the second parameter, and storing it in the second resource pool.

[0254] like Figure 8 As shown, after the resource interaction server 120 completes the resource interaction with the first resource server 130, it interacts with the second resource server 140. The resource interaction server 120 receives the first resource sent by the second resource server 140, stores the first resource in the second resource pool, and then extracts the corresponding second resource from the second resource pool and sends it to the second resource server 140. For example, the first parameter is 7.19, the second parameter is 7.21, and the second resource value is 10000. According to the second parameter and the second resource value, the first resource value is converted to 72100. Therefore, the resource interaction server 120 receives 72100 first resources from the second resource server 140, stores 72100 first resources in the second resource pool, and then extracts 10000 second resources from the second resource pool and sends them to the second resource server 140.

[0255] In summary, after the first parameter and the second parameter meet the first condition and the first resource value in the first resource pool meets the second condition, re-resource interaction with the first resource server 130 and the second resource server 140 can reduce resource interaction processing overhead and optimize resource configuration.

[0256] Implementation of each step in the scenario of using the second resource to interact with the first resource

[0257] (I) Pre-process before step 401

[0258] In the scenario where the second resource is used to interact with the first resource, the resource interaction server 120 receives the second resource of the object and sends the first resource to the object. Therefore, the value of the first resource in the first resource pool is negative.

[0259] In one embodiment, Fig.19 As shown, before step 401, the resource interaction processing method of the embodiment of the present disclosure includes the following pre-process:

[0260] Step 1901: whenever a fourth request for obtaining a first resource from an object is received, a second resource from the object is stored in a first resource pool, and a first resource is taken out from the first resource pool and sent to the object, wherein the taken out first resource is obtained by converting the second resource according to a fifth parameter, and the fifth parameter is a parameter used for interaction between the second resource and the first resource in the resource interaction server 120 when the fourth request is received;

[0261] Step 1902: If the first resource server 130 is available and the third parameter is not less than the fourth parameter, the second resource is taken out from the first resource pool and sent to the first resource server 130; the first resource converted from the second resource according to the third parameter is received from the first resource server 130 and stored in the first resource pool, wherein the third parameter is a parameter used in the first resource server 130 for interaction between the second resource and the first resource when the third request is received, and the fourth parameter is a parameter used in the second resource server 140 for interaction between the second resource and the first resource when the third request is received;

[0262] Step 1903: If the first resource server 130 is not available, or although the first resource server 130 is available but the third parameter is less than the fourth parameter, the second resource is taken out from the second resource pool and sent to the second resource server 140, and the first resource converted from the second resource server 140 according to the fourth parameter is received and stored in the second resource pool.

[0263] These steps are described in detail below.

[0264] In step 1901, the resource interaction server 120 receives a fourth request from the object, and the fourth request is a request for interacting with the first resource with the second resource. The resource interaction server 120 receives the second resource sent by the object and stores the second resource in the first resource pool. The resource interaction server 120 simultaneously obtains the parameter used for the interaction between the second resource and the first resource in the current resource interaction server 120 as the fifth parameter, calculates the first resource value according to the second resource value and the fifth parameter, and takes out the corresponding first resource from the first resource pool according to the first resource value and sends it to the object, so as to realize resource interaction with the object.

[0265] like Fig. 20 As shown, when the object initiates a resource receiving request, i.e., the fourth request, the resource interaction server 120 records the request and interacts with the object. The second resource sent by the object is stored in the first resource pool to increase the second resource of the first resource pool. For example, if the second resource value of the second resource sent by the object is 10000, and the current fifth parameter is 7.17, 10000 second resources are received and stored in the first resource pool, and 71700 first resources are taken out of the first resource pool and sent to the object, as shown in FIG. Figure 3B shown.

[0266] After completing the resource interaction with the object, a reverse operation needs to be performed on the first resource. The reverse operation can be performed with the first resource server 130 or the second resource server 140. In order to determine whether to select the first resource server 130 or the second resource server 140 for the reverse operation, the service status of the first resource server 130 is first obtained to determine whether the first resource server 130 can perform resource interaction according to the service status. In step 1902, if the service status of the first resource server 130 is available, the third parameter of the first resource server 130 is obtained, and the fourth parameter of the second resource server 140 is obtained. The third parameter is compared with the fourth parameter. If the third parameter is not greater than the fourth parameter, it is determined that the overhead caused by the reverse operation with the first resource server 130 is lower than the overhead caused by the reverse operation with the second resource server 140. Therefore, the resource interaction server 120 obtains the first resource from the first resource server 130. After acquiring the first resource, the first resource is stored in the first resource pool, and the second resource in the first resource pool is sent to the first resource server 130 to change the second resource in the first resource pool to 0, thereby realizing the reverse operation and balancing the internal resources of the resource interaction server 120.

[0267] In step 1903, if the service status of the first resource server 130 is unavailable, or the service status of the first resource server 130 is available, but the third parameter is less than the fourth parameter, it means that the overhead caused by the reverse operation with the second resource server 140 is less than the overhead caused by the reverse operation with the first resource server 130. At this time, the resource interaction server 120 takes out the second resource sent by the object from the second resource pool and sends it to the second resource server 140. The second resource server 140 determines the corresponding first resource value according to the second resource value and the fourth parameter, and then the resource interaction server 120 receives the first resource of the determined first resource value from the second resource server 140 and stores it in the second resource pool. For example, if the object interacts with the first resource with 10,000 second resources, the resource interaction server 120 receives 10,000 second resources sent by the object, and the reverse operation is to be performed on these 10,000 second resources. The third parameter is 7.18, the fourth parameter is 7.19, the third parameter is less than the fourth parameter, and the second resource server 140 should be selected for the reverse operation. Therefore, 10,000 second resources are taken out from the second resource pool and sent to the second resource server 140 , and 71,900 first resources sent by the second resource server 140 are received and stored in the second resource pool to balance the internal resources of the resource interaction server 120 .

[0268] The advantage of the above steps 1901-1903 is that the resource server for the reverse operation is selected based on whether the service status of the first resource server 130 is available and the relationship between the third parameter and the fourth parameter, which can reduce the overhead of the resource interaction server 120 after the reverse operation and take into account the efficiency of the reverse operation.

[0269] In steps 1901-1903, the resource interaction server 120 generates overhead in the process of performing reverse operations with the first resource server 130 or the second resource server 140. In order to optimize the overhead, it may be necessary to re-interact with the first resource server 130 and the second resource server 140 to reduce the overhead generated by the reverse operation.

[0270] (II) Detailed Description of Step 401

[0271] like Fig. 22 As shown, after steps 1901-1903, step 401 includes

[0272] Step 2201, subtract the second parameter from the first parameter to obtain a fourth difference;

[0273] Step 2202, subtract the fourth parameter from the fifth parameter to obtain a fifth difference;

[0274] Step 2203: Based on the fourth difference and the fifth difference, determine whether the first parameter and the second parameter satisfy the first condition.

[0275] The above process and Fig. 9 The embodiments are similar to those of , so they are not described in detail. Fig. 9 The difference of the embodiment is that Fig. 9 In the embodiment of the present invention, the first parameter is subtracted from the second parameter, and in the present embodiment, the second parameter is subtracted from the first parameter, and Fig. 9 In the embodiment of the present invention, the fifth parameter is subtracted from the fourth parameter, and in the present embodiment, the fourth parameter is subtracted from the fifth parameter. The reason for such a change is inseparable from the scenario of using the second resource to interact with the first resource. The advantages of steps 2201-2203 are also related to Fig. 9 The embodiments are similar and will not be described in detail.

[0276] like Fig.23 As shown, step 2203 includes:

[0277] Step 2301, subtract the fifth difference from the fourth difference to obtain the sixth difference;

[0278] Step 2302: According to the resource type of the second resource, obtain a first curve of the change of a parameter of the interaction between the second resource corresponding to the resource type and the first resource over time;

[0279] Step 2303: determine the variance of the parameter used for the interaction between the second resource and the first resource in the first curve;

[0280] Step 2304: Determine a first threshold based on the variance;

[0281] Step 2305: If the sixth difference is greater than the first threshold, determine that the first parameter and the second parameter satisfy the first condition.

[0282] The above process and Fig.10 The embodiments are similar to those of , so they are not described in detail. Fig.10 The difference between the embodiments is that the sixth difference obtained by subtracting the fifth difference from the fourth difference replaces the third difference obtained by subtracting the second difference from the first difference. This is because Fig. 22 The advantages of steps 2301-2305 are also similar to Fig.10 The embodiments are similar and will not be described in detail.

[0283] In one embodiment, step 2302 includes:

[0284] According to the resource type of the second resource, obtaining from the first resource server 130 a first sub-curve of a parameter change over time for an interaction between the second resource corresponding to the resource type and the first resource;

[0285] According to the resource type of the second resource, obtaining from the second resource server 140 a second sub-curve of parameter changes over time for interaction between the second resource corresponding to the resource type and the first resource;

[0286] A first curve is generated according to the first sub-curve and the second sub-curve.

[0287] The above process is similar to the process of generating the first curve according to the first sub-curve and the second sub-curve in a specific implementation of the above step 1002 . The details and beneficial effects thereof may refer to the above related description.

[0288] In one embodiment, step 2302 includes:

[0289] According to the resource type of the second resource, obtaining the number of interactions between the second resource of the resource type and the first resource in a unit period;

[0290] Based on the number of interactions, determine the first duration;

[0291] A first curve showing the time-varying parameters of the interaction between the second resource corresponding to the resource type and the first resource within a first time period before the current time is obtained.

[0292] The above process is similar to the process of obtaining a first curve of the time variation of parameters of the interaction between a second resource corresponding to a certain resource type and a first resource within a first time period before the current time in a specific implementation of the previous step 1002. Its details and beneficial effects can be referred to the previous related description.

[0293] In one embodiment, step 401 further includes:

[0294] Get the second duration;

[0295] It is determined that the first parameter and the second parameter always satisfy the first condition within the second time period.

[0296] The above process is similar to the previous Fig.14 The contents described are similar, and the details and beneficial effects thereof can refer to the previous related descriptions.

[0297] In one embodiment, obtaining the second duration includes:

[0298] Obtaining a third curve of a fourth difference obtained by subtracting the second parameter from the first parameter varying with time;

[0299] Determine the number of zero crossings within a unit period of the third curve;

[0300] Based on the number of zero crossings, a second duration is determined.

[0301] The above process is similar to the implementation process of obtaining the second duration in the scenario of using the first resource to interact with the second resource. The difference is that here, a third curve of the fourth difference obtained by subtracting the second parameter from the first parameter over time is obtained, while in the previous embodiment, a second curve of the first difference obtained by subtracting the first parameter from the second parameter over time is obtained, and the change is caused by the scenario of using the second resource to interact with the first resource. For details and beneficial effects, please refer to the previous related description.

[0302] In one embodiment, step 401 includes:

[0303] Obtain the first parameter and the second parameter every third time period;

[0304] It is determined that the first parameter and the second parameter acquired for a predetermined number of consecutive times both satisfy the first condition.

[0305] The above process is similar to the previous Fig.16 The contents described are similar, and the details and beneficial effects can be referred to in the previous Fig.16 Description.

[0306] In one embodiment, the predetermined number is determined by:

[0307] Obtaining a third curve of a fourth difference obtained by subtracting the second parameter from the first parameter varying with time;

[0308] Determine the number of zero crossings within a unit period of the third curve;

[0309] Based on the number of zero crossings, the predetermined number is determined.

[0310] The above process is similar to the implementation process of obtaining a predetermined number in the scenario of using the first resource to interact with the second resource. The difference is that here, a third curve of the fourth difference obtained by subtracting the second parameter from the first parameter over time is obtained, while in the previous embodiment, a second curve of the first difference obtained by subtracting the first parameter from the second parameter over time is obtained, and the change is caused by the scenario of using the second resource to interact with the first resource. For details and beneficial effects, please refer to the previous related description.

[0311] (III) Detailed Description of Step 402

[0312] In one embodiment, Fig.24 As shown, step 402 includes:

[0313] Step 2401: Determine the interactive operation cost;

[0314] Step 2402: If the absolute value of the first resource value is greater than the interaction operation cost, it is determined that the first resource value satisfies the second condition.

[0315] The above process is similar to the process of determining that the first resource value meets the second condition based on the interaction operation cost in the scenario of using the first resource to interact with the second resource. The difference is that the absolute value of the first resource value is compared with the interaction operation cost instead of comparing the first resource value with the interaction operation cost. This change is caused by the scenario of using the second resource to interact with the first resource. For details and beneficial effects, please refer to the previous related description.

[0316] In one embodiment, step 2401 includes:

[0317] Determine the atomic operations involved in resource interactions;

[0318] According to the atomic operation, the corresponding relationship table between the atomic operation and the overhead resource value is searched to obtain the overhead resource value corresponding to the atomic operation;

[0319] The overhead resource values ​​corresponding to the atomic operations included in the resource interaction are added up to obtain the interaction operation cost.

[0320] The above process is similar to the content described in step 1701. For details and beneficial effects, please refer to the description contained in the previous step 1701.

[0321] In one embodiment, Fig.25 As shown, step 402 also includes:

[0322] Step 2501, determining the resource consumption value of non-resource interaction transactions per unit period;

[0323] Step 2502: Determine the reserved resource value based on the resource consumption value of the non-resource interaction transaction in the unit period;

[0324] Step 2503: If the absolute value of the first resource value is greater than the reserved resource value, it is determined that the first resource value satisfies the second condition.

[0325] The above process and Fig.18 The description is similar, except that the absolute value of the first resource value is greater than the reserved resource value instead of the first resource value being greater than the reserved resource value, and the change is caused by the scenario of the interaction of the first resource with the second resource. For details and beneficial effects, please refer to the previous related description.

[0326] In one embodiment, step 2502 includes:

[0327] Obtaining a third curve of a fourth difference obtained by subtracting the second parameter from the first parameter varying with time;

[0328] Determine the number of zero crossings within a unit period of the third curve;

[0329] The reserved resource value is obtained by dividing the resource consumption value of the non-resource interaction transaction per unit period by the number of zero crossing points.

[0330] The above process is similar to the content described in step 1802, except that the second curve of the first difference obtained by subtracting the first parameter from the second parameter over time is replaced by the third curve of the fourth difference obtained by subtracting the second parameter from the first parameter over time, and the change is caused by the scenario of the interaction of the first resource with the second resource. For details and beneficial effects, please refer to the above related description.

[0331] (IV) Detailed Description of Step 403

[0332] In one embodiment, using the first parameter to perform the first resource interaction with the first resource server 130 in step 403 may include: taking out the second resource from the first resource pool, sending it to the first resource server 130, receiving the first resource converted from the second resource according to the first parameter from the first resource server 130, and storing it in the first resource pool.

[0333] like Fig.21 As shown, after determining that the first parameter and the second parameter meet the first condition and the value of the first resource in the first resource pool meets the second condition, the resource interaction server 120 first interacts with the first resource server 130. The resource interaction server 120 receives the first resource from the first resource server 130 and stores the first resource in the first resource pool. The second resource is taken out from the first resource pool and sent to the first resource server 130. Figure 3F As shown, if the first parameter is 7.21, the second parameter is 7.19, and the second resource value is 10000, the first resource value converted into 72100 according to the first parameter and the second resource value, so 72100 first resources are received from the first resource server 130 and stored in the first resource pool, and then 10000 second resources are taken out from the first resource pool and sent to the first resource server 130.

[0334] (V) Detailed Description of Step 404

[0335] After completing the resource interaction with the first resource server 130, the resource interaction server 120 needs to interact with the second resource server 140. The second resource interaction with the second resource server 140 using the second parameter in step 404 includes: receiving the second resource from the second resource server 140, storing it in the second resource pool, taking out the second resource from the second resource pool, converting it into the first resource according to the second parameter, and sending it to the second resource server 140.

[0336] like Fig.21As shown, after the resource interaction server 120 completes the resource interaction with the first resource server 130, it interacts with the second resource server 140. The resource interaction server 120 receives the second resource from the second resource server 140, stores the second resource in the second resource pool, and then extracts the corresponding first resource from the second resource pool and sends it to the second resource server 140. Figure 3F As shown, the first parameter is 7.21, the second parameter is 7.19, the second resource value is 10000, and the first resource value converted into 71900 according to the second parameter and the second resource value. The resource interaction server 120 receives 10000 second resources from the second resource server 140, stores the 10000 second resources into the second resource pool, and then takes out 71900 first resources from the second resource pool and sends them to the second resource server 140.

[0337] Description of the apparatus and device of the present disclosure

[0338] It is to be understood that, although the steps in the above-mentioned flowcharts are sequentially displayed according to the characterization of arrows, these steps are not necessarily executed in sequence according to the order of arrow characterization. Unless there is a clear description in the present embodiment, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0339] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on the data related to the object image, video, voice, and text, the permission or consent of the target object will be obtained first, and the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the attribute information of the target object, the separate permission or separate consent of the target object will be obtained through a pop-up window or jump to a confirmation page. After clearly obtaining the separate permission or separate consent of the target object, the necessary target object-related data for enabling the normal operation of the embodiment of the present application will be obtained.

[0340] Reference Fig.26 , Fig.26 This is a schematic diagram of the structure of a resource interaction processing device 2600 provided in an embodiment of the present disclosure. The resource interaction processing device 2600 is applied to a resource interaction server 120, and the resource interaction processing device 2600 includes:

[0341] A first determining unit 2601 is configured to determine whether a first parameter and a second parameter satisfy a first condition, wherein the first parameter is a parameter used in the first resource server 130 for interaction between the second resource and the first resource, and the second parameter is a parameter used in the second resource server 140 for interaction between the second resource and the first resource;

[0342] The second determining unit 2602 is configured to determine whether a first resource in the first resource pool satisfies a second condition;

[0343] The first request unit 2603 is used to initiate a first request to the first resource server 130 to perform a first resource interaction with the first resource server 130 based on the first resource in the first resource pool using the first parameter;

[0344] The second request unit 2604 is used to initiate a second request to the second resource server 140 to perform a second resource interaction with the second resource server 140 using a second parameter, wherein for the first resource in the first resource pool, the operation direction of the first resource interaction is opposite to that of the second resource interaction.

[0345] Optionally, the first resource value is positive, and the resource interaction processing device 2600 further includes:

[0346] a first interaction processing unit (not shown), configured to store the first resource from the object into the first resource pool and take out the second resource from the first resource pool and send it to the object whenever receiving a third request from the object to obtain the second resource, wherein the first resource from the object is obtained by converting the second resource according to the fifth parameter, and the fifth parameter is a parameter used for the interaction between the second resource and the first resource of the resource interaction server when the third request is received;

[0347] a second interaction processing unit (not shown), configured to, if the first resource server is available and the third parameter is not greater than the fourth parameter, receive the second resource from the first resource server, store the second resource in the first resource pool, take out the second resource from the first resource pool, convert the second resource into the first resource according to the third parameter, and send the first resource to the first resource server, wherein the third parameter is a parameter used in the first resource server for interaction between the second resource and the first resource when the third request is received, and the fourth parameter is a parameter used in the second resource server for interaction between the second resource and the first resource when the third request is received;

[0348] The third interaction processing unit (not shown) is configured to receive the second resource from the second resource server and store it in the second resource pool if the first resource server is unavailable or if the first resource server is available but the third parameter is greater than the fourth parameter, retrieve the second resource from the second resource pool, convert it into the first resource according to the fourth parameter, and send it to the second resource server.

[0349] Optionally, using the first parameter to interact with the first resource server for the first resource includes: receiving the second resource from the first resource server, storing it in the first resource pool, taking out the second resource from the first resource pool, converting it into the first resource according to the first parameter, and sending it to the first resource server; using the second parameter to interact with the second resource server for the second resource includes: taking out the second resource from the second resource pool, sending it to the second resource server, receiving the second resource from the second resource server, converting it into the first resource according to the second parameter, and storing it in the second resource pool.

[0350] Optionally, the first determining unit 2601 is specifically configured to:

[0351] Subtract the first parameter from the second parameter to obtain the first difference;

[0352] Subtract the fifth parameter from the fourth parameter to obtain the second difference;

[0353] Based on the first difference and the second difference, it is determined that the first parameter and the second parameter satisfy a first condition.

[0354] Optionally, the first determining unit 2601 is specifically configured to:

[0355] Subtract the second difference from the first difference to get the third difference;

[0356] According to the resource type of the second resource, a first curve of the change over time of a parameter of the interaction between the second resource corresponding to the resource type and the first resource is obtained;

[0357] determining a variance of a parameter in the first curve for an interaction of the second resource with the first resource;

[0358] Based on the variance, determining a first threshold;

[0359] If the third difference is greater than the first threshold, it is determined that the first parameter and the second parameter satisfy the first condition.

[0360] Optionally, the first determining unit 2601 is specifically configured to:

[0361] Acquire, from the first resource server according to the resource type of the second resource, a first sub-curve of a parameter change over time for interaction between the second resource corresponding to the resource type and the first resource;

[0362] According to the resource type of the second resource, obtaining from the second resource server a second sub-curve of a parameter change over time for interaction between the second resource corresponding to the resource type and the first resource;

[0363] A first curve is generated according to the first sub-curve and the second sub-curve.

[0364] Optionally, the first determining unit 2601 is specifically configured to:

[0365] According to the resource type of the second resource, obtaining the number of interactions between the second resource of the resource type and the first resource in a unit period;

[0366] Based on the number of interactions, determine the first duration;

[0367] A first curve showing the change of a parameter of an interaction between a second resource corresponding to the resource type and the first resource over time within a first time period before a current time is obtained.

[0368] Optionally, the first determining unit 2601 is specifically configured to:

[0369] Get the second duration;

[0370] It is determined that the first parameter and the second parameter always satisfy the first condition within the second time period.

[0371] Optionally, the first determining unit is specifically configured to:

[0372] Obtain the first parameter and the second parameter every third time period;

[0373] It is determined that the first parameter and the second parameter acquired for a predetermined number of consecutive times both satisfy the first condition.

[0374] Optionally, the second determining unit 2602 is specifically configured to:

[0375] Determining an interaction operation cost of the first resource interaction and the second resource interaction;

[0376] If the first resource value is greater than the interaction operation cost, it is determined that the first resource meets the second condition.

[0377] Optionally, the second determining unit 2602 is specifically configured to:

[0378] Determine the atomic operations included in the first resource interaction and the second resource interaction;

[0379] According to the atomic operation, find the corresponding relationship table between the atomic operation and the operation cost, and obtain the operation cost corresponding to the atomic operation;

[0380] The operation costs corresponding to the atomic operations included in the first resource interaction and the second resource interaction are added up to obtain the interaction operation cost.

[0381] Optionally, the second determining unit 2602 is specifically configured to:

[0382] Determine the resource value consumed by non-resource interaction transactions per unit period;

[0383] Determine the reserved resource value based on the resource consumption value of the non-resource interaction transaction in a unit period;

[0384] If the first resource value is greater than the reserved resource value, it is determined that the first resource meets the second condition.

[0385] Optionally, the resource interaction processing device 2600 further includes:

[0386] a fourth interaction processing unit (not shown), configured to store the second resource from the object in the first resource pool whenever receiving a fourth request from the object to obtain the first resource, and to retrieve the first resource from the first resource pool and send it to the object, wherein the retrieved first resource is obtained by converting the second resource according to the fifth parameter, and the fifth parameter is a parameter used in the resource interaction server for interaction between the second resource and the first resource when the fourth request is received;

[0387] a fifth interaction processing unit (not shown), configured to, if the first resource server is available and the third parameter is not less than the fourth parameter, take out the second resource from the first resource pool and send it to the first resource server, receive the first resource converted from the second resource according to the third parameter from the first resource server, and store it in the first resource pool, wherein the third parameter is a parameter used in the first resource server for interaction between the second resource and the first resource when the third request is received, and the fourth parameter is a parameter used in the second resource server for interaction between the second resource and the first resource when the third request is received;

[0388] The sixth interaction processing unit (not shown) is used to take out the second resource from the second resource pool and send it to the second resource server if the first resource server is not available, or although the first resource server is available but the third parameter is less than the fourth parameter, receive the first resource converted from the second resource server according to the fourth parameter and store it in the second resource pool.

[0389] Optionally, using the first parameter to interact with the first resource server for the first resource includes: taking out the second resource from the first resource pool, sending it to the first resource server, receiving the second resource from the first resource server, converting the first resource into the first resource according to the first parameter, and storing it in the first resource pool; using the second parameter to interact with the second resource server for the second resource includes: receiving the second resource from the second resource server, storing it in the second resource pool, taking out the second resource from the second resource pool, converting the first resource into the second parameter, and sending it to the second resource server.

[0390] Optionally, the first determining unit 2601 is specifically configured to:

[0391] Subtract the second parameter from the first parameter to obtain the fourth difference;

[0392] Subtract the fourth parameter from the fifth parameter to obtain the fifth difference;

[0393] Based on the fourth difference and the fifth difference, it is determined that the first parameter and the second parameter satisfy the first condition.

[0394] Reference Fig. 27 , Fig. 27 The structural block diagram of the terminal 110 for implementing the resource interaction processing method of the embodiment of the present disclosure includes: a radio frequency (RF) circuit 2710, a memory 2715, an input unit 2730, a display unit 2740, a sensor 2750, an audio circuit 2760, a wireless fidelity (WiFi) module 2770, a processor 2780, and a power supply 2790. Those skilled in the art can understand that Fig.24 The terminal structure shown does not constitute a limitation on the mobile phone or computer, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0395] RF circuit 2710 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information from the base station, it is sent to processor 2780 for processing; in addition, the designed uplink data is sent to the base station.

[0396] The memory 2715 may be used to store software programs and modules. The processor 2780 executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory 2715 .

[0397] The input unit 2730 may be used to receive input digital or character information and generate key signal input related to the terminal's settings and function control. Specifically, the input unit 2730 may include a touch panel 2731 and other input devices 2732 .

[0398] The display unit 2740 may be used to display input information or provided information and various menus of the terminal. The display unit 2740 may include a display panel 2741.

[0399] The audio circuit 2760, the speaker 2761, and the microphone 2762 may provide an audio interface.

[0400] In this embodiment, the processor 2780 included in the terminal can execute the resource interaction processing method of the previous embodiment.

[0401] The terminals of the embodiments of the present disclosure include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.

[0402] Fig.28A block diagram of the structure of a portion of a server 2800 for implementing the resource interaction processing method of an embodiment of the present disclosure. The server 2800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 2822 (e.g., one or more processors) and a memory 2832, and one or more storage media 2830 (e.g., one or more mass storage devices) storing application programs 2842 or data 2844. Among them, the memory 2832 and the storage medium 2830 may be temporary storage or permanent storage. The program stored in the storage medium 2830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server 2800. Furthermore, the central processing unit 2822 may be configured to communicate with the storage medium 2830 and execute a series of instruction operations in the storage medium 2830 on the server 2800.

[0403] The server 2800 may also include one or more power supplies 2826, one or more wired or wireless network interfaces 2850, one or more input and output interfaces 2858, and / or one or more operating systems 2841, such as Wi ndows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0404] The central processor 2822 in the server 2800 can be used to execute the resource interaction processing method of the embodiment of the present disclosure.

[0405] The embodiment of the present disclosure further provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the resource interaction processing methods of the aforementioned embodiments.

[0406] The embodiment of the present disclosure also provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes and implements the resource interaction processing method.

[0407] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0408] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after 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 or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0409] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.

[0410] In the several embodiments provided in the present disclosure, 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 units is only a logical function division. There may be other division methods in actual implementation. For example, 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0411] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0412] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0413] If the integrated unit 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 this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable 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 various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0414] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.

[0415] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.

Claims

1. A resource interaction processing method, characterized in that: include: Determining that a first parameter and a second parameter satisfy a first condition, wherein the first parameter is a parameter used in the first resource server for interaction between the second resource and the first resource, and the second parameter is a parameter used in the second resource server for interaction between the second resource and the first resource; Determining that a first resource in the first resource pool satisfies a second condition; Initiate a first request to the first resource server to perform a first resource interaction with the first resource server based on the first resource in the first resource pool by using the first parameter; A second request is initiated to the second resource server to perform a second resource interaction with the second resource server using the second parameter, wherein, for the first resource in the first resource pool, the operation direction of the first resource interaction is opposite to that of the second resource interaction.

2. The resource interaction processing method according to claim 1, characterized in that: The first resource value is positive, and before determining that the first parameter and the second parameter satisfy the first condition, the resource interaction processing method further includes: Whenever a third request for obtaining the second resource from an object is received, the first resource from the object is stored in the first resource pool, and the second resource is taken out from the first resource pool and sent to the object, wherein the first resource from the object is obtained by converting the second resource according to a fifth parameter, and the fifth parameter is a parameter used in the resource interaction server for interaction between the second resource and the first resource when the third request is received; If the first resource server is available and the third parameter is not greater than the fourth parameter, the second resource is received from the first resource server and stored in the first resource pool, the second resource is taken out from the first resource pool and converted into a first resource according to the third parameter, and the resource is sent to the first resource server, wherein the third parameter is a parameter used in the first resource server for interaction between the second resource and the first resource when the third request is received, and the fourth parameter is a parameter used in the second resource server for interaction between the second resource and the first resource when the third request is received; If the first resource server is unavailable, or although the first resource server is available but the third parameter is greater than the fourth parameter, the second resource is received from the second resource server and stored in the second resource pool, and the second resource is taken out from the second resource pool, converted into a first resource according to the fourth parameter, and sent to the second resource server.

3. The resource interaction processing method according to claim 2, characterized in that: The using the first parameter to perform the first resource interaction with the first resource server includes: receiving the second resource from the first resource server, storing it in the first resource pool, taking out the second resource from the first resource pool, converting it into a first resource according to the first parameter, and sending it to the first resource server; The using the second parameter to interact with the second resource server for the second resource includes: taking out the second resource from the second resource pool, sending it to the second resource server, receiving from the second resource server a first resource converted from the second resource according to the second parameter, and storing it in the second resource pool.

4. The resource interaction processing method according to claim 2, characterized in that: The determining that the first parameter and the second parameter satisfy the first condition includes: subtracting the first parameter from the second parameter to obtain a first difference; Subtracting the fifth parameter from the fourth parameter to obtain a second difference; Based on the first difference and the second difference, it is determined that the first parameter and the second parameter satisfy a first condition.

5. The resource interaction processing method according to claim 4, characterized in that: The determining, based on the first difference and the second difference, that the first parameter and the second parameter satisfy a first condition includes: subtracting the second difference from the first difference to obtain a third difference; According to the resource type of the second resource, obtaining a first curve of a parameter changing over time for interaction between the second resource corresponding to the resource type and the first resource; determining a variance of a parameter in the first curve for interaction of the second resource with the first resource; Based on the variance, determining a first threshold; If the third difference is greater than the first threshold, it is determined that the first parameter and the second parameter satisfy a first condition.

6. The resource interaction processing method according to claim 5, characterized in that: The step of obtaining, according to the resource type of the second resource, a first curve of a parameter changing over time for interaction between the second resource corresponding to the resource type and the first resource includes: Acquire, from the first resource server, according to the resource type of the second resource, a first sub-curve of parameter changes over time for interaction between the second resource corresponding to the resource type and the first resource; According to the resource type of the second resource, obtaining from the second resource server a second sub-curve of parameter changes over time for interaction between the second resource corresponding to the resource type and the first resource; The first curve is generated according to the first sub-curve and the second sub-curve.

7. The resource interaction processing method according to claim 5, characterized in that: The step of obtaining, according to the resource type of the second resource, a first curve of a parameter changing over time for interaction between the second resource corresponding to the resource type and the first resource includes: According to the resource type of the second resource, obtaining the number of interactions between the second resource of the resource type and the first resource in a unit period; Based on the number of interactions, determining a first duration; A first curve showing the time-varying parameters of the interaction between the second resource corresponding to the resource type and the first resource within the first time period before the current time is obtained.

8. The resource interaction processing method according to claim 2, characterized in that: The determining that the first parameter and the second parameter satisfy the first condition includes: Get the second duration; It is determined that the first parameter and the second parameter always satisfy the first condition within the second time period.

9. The resource interaction processing method according to claim 2, characterized in that: The determining that the first parameter and the second parameter satisfy the first condition includes: Acquire the first parameter and the second parameter every third time period; It is determined that the first parameter and the second parameter acquired for a predetermined number of consecutive times both satisfy the first condition.

10. The resource interaction processing method according to claim 2, characterized in that: The determining that the first resource in the first resource pool satisfies the second condition includes: Determining an interaction operation cost of the first resource interaction and the second resource interaction; If the first resource value is greater than the interaction operation cost, it is determined that the first resource meets the second condition.

11. The resource interaction processing method according to claim 10, characterized in that: The determining the interaction operation cost of the first resource interaction and the second resource interaction includes: Determining atomic operations included in the first resource interaction and the second resource interaction; According to the atomic operation, searching the atomic operation and operation cost correspondence table to obtain the operation cost corresponding to the atomic operation; The operation costs corresponding to the atomic operations included in the first resource interaction and the second resource interaction are summed up to obtain the interaction operation cost.

12. The resource interaction processing method according to claim 2, characterized in that: The determining that the first resource in the first resource pool satisfies the second condition includes: Determine the resource value consumed by non-resource interaction transactions per unit period; Determining a reserved resource value based on the resource consumption value of the non-resource interaction transaction in the unit period; If the first resource value is greater than the reserved resource value, it is determined that the first resource meets the second condition.

13. The resource interaction processing method according to claim 1, characterized in that: The first resource value is negative, and before determining that the first parameter and the second parameter satisfy the first condition, the resource interaction processing method further includes: Whenever a fourth request for obtaining a first resource from an object is received, the second resource from the object is stored in the first resource pool, and the first resource is taken out from the first resource pool and sent to the object, wherein the taken out first resource is obtained by converting the second resource according to a fifth parameter, and the fifth parameter is a parameter used in the resource interaction server for interaction between the second resource and the first resource when the fourth request is received; If the first resource server is available and the third parameter is not less than the fourth parameter, taking out the second resource from the first resource pool and sending it to the first resource server, receiving the first resource converted from the second resource according to the third parameter from the first resource server, and storing it in the first resource pool, wherein the third parameter is a parameter used by the first resource server for interaction between the second resource and the first resource when the third request is received, and the fourth parameter is a parameter used by the second resource server for interaction between the second resource and the first resource when the third request is received; If the first resource server is unavailable, or although the first resource server is available but the third parameter is less than the fourth parameter, the second resource is taken out from the second resource pool and sent to the second resource server, and the first resource converted from the second resource according to the fourth parameter is received from the second resource server and stored in the second resource pool.

14. The resource interaction processing method according to claim 13, characterized in that: The using the first parameter to perform the first resource interaction with the first resource server includes: taking the second resource from the first resource pool and sending it to the first resource server, receiving the first resource converted from the second resource according to the first parameter from the first resource server, and storing it in the first resource pool; The using the second parameter to interact with the second resource server for the second resource includes: receiving the second resource from the second resource server, storing it in the second resource pool, taking out the second resource from the second resource pool, converting it into a first resource according to the second parameter, and sending it to the second resource server.

15. The resource interaction processing method according to claim 13, characterized in that: The determining that the first parameter and the second parameter satisfy the first condition includes: subtracting the second parameter from the first parameter to obtain a fourth difference; subtracting the fourth parameter from the fifth parameter to obtain a fifth difference; Based on the fourth difference and the fifth difference, it is determined that the first parameter and the second parameter satisfy a first condition.

16. A resource interaction processing device, characterized in that: include: A first determining unit, configured to determine whether a first parameter and a second parameter satisfy a first condition, wherein the first parameter is a parameter used in the first resource server for interaction between the second resource and the first resource, and the second parameter is a parameter used in the second resource server for interaction between the second resource and the first resource; A second determining unit, configured to determine whether a first resource in the first resource pool satisfies a second condition; A first request unit, configured to initiate a first request to the first resource server, so as to perform a first resource interaction with the first resource server based on the first resource in the first resource pool and using the first parameter; The second request unit is configured to initiate a second request to the second resource server, so as to perform a second resource interaction with the second resource server by using the second parameter, wherein, for the first resource in the first resource pool, the operation direction of the first resource interaction is opposite to that of the second resource interaction.

17. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the resource interaction processing method according to any one of claims 1 to 15 is implemented.

18. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the resource interaction processing method according to any one of claims 1 to 15 is implemented.

19. A computer program product, comprising a computer program, wherein the computer program is read and executed by a processor of a computer device, so that the computer device executes the resource interaction processing method according to any one of claims 1 to 15.