Resource information acquisition method and apparatus, electronic device, and storage medium

By pre-storing the resource package of the target object and matching it with multiple candidate resource packages, the problem of low efficiency in obtaining resource information is solved, enabling rapid acquisition of target object resource information and improving system stability and efficiency.

CN116028696BActive Publication Date: 2026-01-23BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310024988.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-09
Publication Date
2026-01-23
Estimated Expiration
2043-01-09

AI Technical Summary

Technical Problem

Existing technologies are inefficient at acquiring resource information, requiring frequent traversal of resource information across various business functions to obtain results.

Method used

By pre-storing the resource package of the target object, matching the target resource package with multiple candidate resource packages, determining the resource package to be queried, and obtaining the resource information associated with the target object based on the resource package to be queried.

Benefits of technology

It narrows the query scope, improves the efficiency of resource information acquisition, reduces the number of query operations and computing resource consumption, and enhances system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116028696B_ABST
    Figure CN116028696B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a resource information acquisition method and device, electronic equipment and storage medium. The method comprises: acquiring a target resource package of a target object according to a query request of a resource account of the target object; the target resource package comprises a resource package of the resource account created by the target object in a resource management system; determining a to-be-queried resource package corresponding to the target object according to the target resource package and resource packages of a plurality of candidate resource packages; the plurality of candidate resource packages comprise part of the resource packages associated with each business account of the resource management system; and acquiring resource information in each resource account associated with the target object based on the resource account contained in the to-be-queried resource package. The present disclosure can reduce the query range to the resource package containing the resource account of the target object in the plurality of candidate resource packages provided by the query, reduce the query operation, quickly acquire the resource information of the target object, and improve the acquisition efficiency of the resource information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for acquiring resource information. Background Technology

[0002] With the development of computer technology and the popularization of mobile applications, platforms can provide relevant resources to users when conducting related business, thereby enhancing user engagement. To facilitate the statistical analysis of the number of resources provided, the platform can perform resource information statistics separately for different business segments, recording the resource information provided to each user under each business segment.

[0003] In related technologies, users can send query requests to retrieve resources they have obtained from the platform. After receiving the query request, the platform can traverse the resource information under each business and query content related to the user.

[0004] However, the above method requires frequent traversal of resource information under each business to obtain the corresponding result after each query request is received, which results in low efficiency in obtaining resource information. Summary of the Invention

[0005] This disclosure provides a method, apparatus, electronic device, and storage medium for acquiring resource information, to at least solve the problem of low efficiency in acquiring resource information in related technologies. The technical solution of this disclosure is as follows:

[0006] According to a first aspect of the present disclosure, a method for obtaining resource information is provided, including:

[0007] Based on the resource information query request of the target object, obtain the target resource package of the target object; the target resource package includes the resource package of the resource account created by the target object in the resource management system;

[0008] Based on the resource packages of the target resource package and multiple candidate resource packages, determine the resource package to be queried corresponding to the target object. The multiple candidate resource packages include some resource packages associated with various business accounts of the resource management system.

[0009] Based on the resource accounts contained in the resource package to be queried, obtain the resource information in each resource account associated with the target object.

[0010] In an exemplary embodiment, each of the candidate resource packages includes at least one resource account, and each resource account corresponds to an account identifier. Before determining the query resource package corresponding to the target object based on the target resource package and the plurality of candidate resource packages, the method further includes:

[0011] Traverse all resource packages in the resource management system, determine the resource package containing the target resource account, and store it as the target resource package of the target object; the account identifier corresponding to the target resource account matches the object identifier of the target object.

[0012] In an exemplary embodiment, before determining the query resource package corresponding to the target object based on the target resource package and the plurality of candidate resource packages, the method further includes:

[0013] Receive the account creation information of the target object in the resource management system, and send the account creation information to an asynchronous message queue;

[0014] Based on the account creation information in the asynchronous message queue, determine the resource package corresponding to the account creation information, use the resource package as the target resource package of the target object, and store the target resource package.

[0015] In an exemplary embodiment, determining the resource package corresponding to the account creation information based on the account creation information in the asynchronous message queue includes:

[0016] If all target resource packages of the target object include the resource package of the resource account to be created indicated by the account creation information in the asynchronous message queue, then continue reading the next account creation information in the asynchronous message queue;

[0017] If none of the target resource packages of the target object include the resource package of the resource account to be created indicated by the account creation information in the asynchronous message queue, then the resource package is determined to be the resource package corresponding to the account creation information.

[0018] In an exemplary embodiment, obtaining the target resource package of the target object based on the resource information query request of the target object includes:

[0019] Based on the pre-stored resource package identifier associated with the target object, the target resource package associated with the target object is determined; the association between the target object and the resource package identifier is stored after it is detected that the target object has created a resource account in the target resource package.

[0020] In an exemplary embodiment, the resource information query request includes a query request for resource information to be displayed on the resource information display page. Before determining the resource package to be queried corresponding to the target object based on the target resource package and multiple candidate resource packages, the method further includes:

[0021] Obtain configuration information for the resource information display page, which includes a page provided by the resource management system to the user object for displaying resource information associated with a preset business account. The configuration information is used to configure the business account in the resource management system to determine the preset business account.

[0022] The preset business account is configured and determined based on the configuration information;

[0023] Based on the multiple resource packages associated with the preset business account, the multiple candidate resource packages are obtained.

[0024] In one exemplary embodiment, the resource information includes the remaining resource balance of the resource account, and the method further includes:

[0025] Based on the remaining resources in each resource account associated with the target object, determine the total remaining resources of the resource accounts associated with the target object;

[0026] Send the total remaining resource balance of the resource account associated with the target object to the terminal of the target object, so as to display the total remaining resource balance of the resource account associated with the target object on the resource information display page of the terminal.

[0027] According to a second aspect of the present disclosure, a resource information acquisition apparatus is provided, comprising:

[0028] The target resource package acquisition unit is configured to execute a resource information query request based on the target object to acquire the target resource package of the target object; the target resource package includes the resource package of the target object in the resource management system where the target object creates a resource account;

[0029] The resource package determination unit is configured to determine the resource package to be queried corresponding to the target object based on the target resource package and multiple candidate resource packages, wherein the multiple candidate resource packages include some resource packages associated with various business accounts of the resource management system;

[0030] The resource information acquisition unit is configured to acquire resource information from each resource account associated with the target object based on the resource accounts contained in the resource package to be queried.

[0031] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0032] processor;

[0033] Memory used to store the processor's executable instructions;

[0034] The processor is configured to execute the instructions to implement the resource information acquisition method as described in any of the preceding claims.

[0035] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the resource information acquisition method as described in any of the preceding claims.

[0036] According to a fifth aspect of the present disclosure, a computer program product is provided, the computer program product including instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the resource information acquisition method as described in any of the preceding claims.

[0037] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0038] In the aforementioned resource information acquisition methods, devices, electronic equipment, storage media, and computer program products, a target resource package of the target object can be obtained based on the resource information query request of the target object. This target resource package may include resource packages for which the target object has created resource accounts in the resource management system. Furthermore, based on the target resource package and multiple candidate resource packages, a query resource package corresponding to the target object can be determined. These multiple candidate resource packages include partial resource packages associated with various business accounts in the resource management system. Then, based on the resource accounts contained in the query resource package, resource information in each resource account associated with the target object can be obtained. In this disclosure, by pre-storing the target resource package for which the target object's resource accounts have been created, the query scope can be narrowed down to resource packages containing the target object's resource accounts from among the provided queryable candidate resource packages. This reduces query operations while quickly obtaining the target object's resource information, thereby improving the efficiency of resource information acquisition.

[0039] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0041] Figure 1 This is an application environment diagram illustrating a resource information acquisition method according to an exemplary embodiment.

[0042] Figure 2 This is a flowchart illustrating a method for obtaining resource information according to an exemplary embodiment.

[0043] Figure 3 This is a flowchart illustrating a step of processing account creation information according to an exemplary embodiment.

[0044] Figure 4 This is a flowchart illustrating a step of obtaining a candidate resource package according to an exemplary embodiment.

[0045] Figure 5 This is a flowchart illustrating a step of displaying total resource reserves according to an exemplary embodiment.

[0046] Figure 6 This is a block diagram illustrating a resource information acquisition device according to an exemplary embodiment.

[0047] Figure 7 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0048] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0049] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0050] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0051] The resource information acquisition method provided in this disclosure can be applied to, for example... Figure 1 The application environment shown is illustrated. In this environment, the terminal can communicate with the resource management system via a network. The resource management system can have a corresponding data storage system, which can store the data that the server needs to process, such as multiple resource packages. In practical applications, the data storage system can be integrated into the resource management system or placed in the cloud or on other network servers.

[0052] In some embodiments, the terminal can query the resource information of the target object under each resource account and send a resource information query request to the resource management system. The resource management system can obtain the target resource package of the target object based on the query request of the target object's resource account. The target resource package includes the resource package of the resource account created by the target object in the resource management system. Then, the system can determine the resource package to be queried corresponding to the target object based on the target resource package and the resource packages of multiple candidate resource packages. The multiple candidate resource packages include some resource packages associated with each business account of the resource management system. Then, the system can obtain the resource information in each resource account associated with the target object based on the resource account contained in the resource package to be queried.

[0053] The terminals can be, but are not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices; portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The resource management system can be implemented using a dedicated server or a server cluster consisting of multiple servers.

[0054] It is understood that the above application scenario is merely an example and does not constitute a limitation on the resource information acquisition method provided in the embodiments of this disclosure. For example, a resource information query request may also be sent by another server intending to acquire resource information of a target object to the resource management system.

[0055] Figure 2 This is a flowchart illustrating a resource information acquisition method according to an exemplary embodiment, such as... Figure 2 As shown, this method is used for Figure 1 The resource management system in the document will be explained, including the following steps.

[0056] In step S210, the target resource package of the target object is obtained according to the resource information query request of the target object; the target resource package includes the resource package of the target object in the resource management system where the target object creates a resource account.

[0057] The target object can be an account, such as an account used to log in to a client. Users can use this account to perform various actions within the client, such as browsing or publishing media resources, or interacting with other accounts. Each target object can have one or more corresponding resource accounts. Users can use these resource accounts to perform resource-related account actions, such as acquiring, using, and transferring resources, thus generating corresponding resource information. In other words, users can perform resource-related account actions through resource accounts and perform resource-independent account actions through the target object. In one example, the resource targeted by the resource account and resource information can be a virtual resource. This virtual resource can be used to exchange for corresponding items (e.g., exchanging virtual resources for corresponding equivalents), and its value can be measured numerically.

[0058] Resource information can be information recorded during the process of a target object processing resources. A resource package can contain at least one resource account and record the resource information of each resource account. Resource information belonging to the same resource account can be stored in the same resource package.

[0059] In practice, the resource management system can pre-store resource packages associated with different objects. These resource packages include resource accounts created by the target object in the resource management system. Then, upon receiving a resource information query request for the target object, the resource management system can retrieve the pre-stored target resource packages associated with the target object.

[0060] Specifically, a target resource package can be stored after it is detected that a resource account for the target object has been created under the resource package. In other words, whenever it is detected that a resource account for the target object has been created under a resource package in the resource management system, the resource package can be stored as a target resource. For example, the target resource package can be cached in the corresponding storage module. The stored target resource package can also be called the target object's valid resource package. For resource packages for which no resource account has been created for the target object, the resource package is not associated with the target object. When a resource information query request for the target object is received, resource packages that do not contain the target object's resource account do not need to be queried.

[0061] In step S220, the resource package to be queried corresponding to the target object is determined based on the resource package of the target resource package and the resource packages of multiple candidate resource packages; the multiple candidate resource packages include some resource packages associated with various business accounts of the resource management system.

[0062] The resource management system can be used to manage resource packages for one or more business accounts, such as storing resource packages associated with each business account.

[0063] A business account can be an account set up for a business activity. When a business party provides corresponding resources for a business activity, it can create a corresponding business account and resource package through the business activity. The target object participating in the business activity can set up an associated resource account under the resource package, and record the resource usage of the target object in the process of participating in the business activity through the resource account, forming relevant resource information.

[0064] In practical applications, upon receiving a query request, the resource management system can also obtain partial resource packages associated with each business account connected to the resource management system. In other words, it can obtain partial resource packages under one or more business accounts under the resource management system. These partial resources can be associated with different business accounts or with the same business account. Based on the obtained partial resource packages, multiple candidate resource packages can be obtained.

[0065] Since the target object may have only participated in some business activities provided by some business accounts, or it may have participated in all business activities provided by all business accounts, the multiple candidate resource packages currently obtained may contain the target object's resource account, or some may not contain the target object's resource account. The target object's resource account may only be stored in some resource packages. In other words, after obtaining multiple candidate resource packages, it is not possible to directly locate the resource package containing the target object's resource account.

[0066] Based on this, in this step, the resource package to be queried corresponding to the target object can be determined by comparing the target resource package with multiple candidate resource packages. Specifically, since the target resource package is a resource package containing the target object's resource account, by comparing the target resource package with multiple candidate resource packages, resource packages within the resource package query range (i.e., multiple candidate resource packages) that contain the target object's resource account can be quickly identified. Thus, the resource package to be queried containing the target object's resource information can be determined. For example, the intersection of the target resource package and multiple candidate packages can be used as the resource package to be queried.

[0067] Compared to related technologies that require traversing various resource packages on the platform after receiving a query request to obtain resource information related to the user, this disclosure pre-stores target resource packages associated with the target object and filters out the resource packages to be queried from multiple candidate resource packages based on the target resource package and multiple candidate resource packages. This can quickly and effectively narrow the scope of resource information query to the resource packages with the target object's resource account.

[0068] In step S230, based on the resource accounts contained in the resource package to be queried, the resource information in each resource account associated with the target object is obtained.

[0069] Once the resource package to be queried is obtained, the resource account associated with the target object can be identified from the resource accounts contained in the resource package, and relevant resource information can be obtained from the resource account associated with the target object.

[0070] In the above-described method for obtaining resource information, a target resource package of the target object can be obtained based on the target object's resource information query request. This target resource package may include resource packages for which the target object has created resource accounts in the resource management system. Then, based on the target resource package and multiple candidate resource packages, the resource package to be queried corresponding to the target object can be determined. These multiple candidate resource packages include some resource packages associated with various business accounts in the resource management system. Finally, based on the resource accounts contained in the resource package to be queried, resource information in each resource account associated with the target object can be obtained. In this disclosure, by pre-storing the target resource package for which the target object's resource accounts have been created, the query scope can be narrowed down to resource packages containing the target object's resource accounts from among the provided multiple queryable candidate resource packages. This reduces query operations while quickly obtaining the target object's resource information, thus improving the efficiency of resource information acquisition.

[0071] Furthermore, by filtering multiple candidate resource packages based on the target resource package and eliminating the remaining resource packages, the number of queries can be reduced, as well as the consumption of query interfaces and related computing resources. This effectively reduces interface latency, improves interface stability and traffic carrying capacity, and enhances system stability.

[0072] In an exemplary embodiment, step S210, obtaining the target resource package of the target object based on the resource information query request of the target object, may include:

[0073] Based on the pre-stored resource package identifier associated with the target object, the target resource package associated with the target object is determined; the association between the target object and the resource package identifier is stored after it is detected that the target object has created a resource account in the target resource package.

[0074] The resource package identifier can be the identifier corresponding to the resource package, and the resource package can be uniquely identified through the resource package identifier.

[0075] In practice, the resource management system can pre-store resource package identifiers associated with different objects. Upon receiving a query request, it can retrieve the resource package identifier associated with the target object based on the target object specified in the query request. This resource package identifier can be stored after it is detected that a resource account has been created under the resource package for the target object. In other words, whenever it is detected that a resource account associated with the target object has been created under the resource package, the resource package identifier of that resource package can be retrieved and the association between that resource package identifier and the target object can be stored.

[0076] After obtaining the resource package identifier associated with the target object, the resource package corresponding to the resource package identifier can be used as the target resource package.

[0077] In this implementation, on the one hand, the target resource package associated with the target object can be quickly queried through the resource package identifier; on the other hand, by storing the resource package identifier, the amount of data storage can be effectively reduced.

[0078] In an exemplary embodiment, each candidate resource package contains at least one resource account, and each resource account corresponds to an account identifier. Before step S220, the method may further include the following steps:

[0079] Traverse all resource packages in the resource management system, identify the resource package containing the target resource account, and store it as the target resource package associated with the target object; the account identifier corresponding to the target resource account matches the object identifier of the target object.

[0080] In practical applications, the object identifier of the target object can be obtained. For example, if the target object is an account, the account identifier (such as the account number) can be used as the object identifier. Furthermore, all resource packages currently stored in the resource management system can be obtained. Each resource package can contain one or more resource accounts, and the resource package stores the resource information of the resource accounts set in that resource package.

[0081] This allows us to iterate through all resource packages under the currently acquired resource management system and determine whether each resource package contains the target resource account. Based on resource packages containing the target resource account, we can then obtain the target resource package. Specifically, we can match the object identifier of the target object with the account identifiers of each resource account in each resource package to determine if there exists an account identifier that matches the object identifier of the target object.

[0082] For example, the account identifier in a resource package of a resource management system can be composed of the account identifier of the business account associated with the resource package, the resource package identifier, and the object identifier of the target object. This allows us to determine whether there is an account identifier in the resource package that contains the object identifier. If so, we can determine that there is an account identifier in the resource package that matches the object identifier.

[0083] If a resource package contains a target resource account, the resource package can be stored as a target resource package associated with the target object. For example, the resource package identifier of the resource package can be stored as the resource package identifier associated with the target object.

[0084] In other examples, if a target resource account exists within the resource package, it can be further identified whether the resource information of the target resource account meets preset conditions. These preset conditions can be set based on the content displayed on the resource information display page. For example, if the resource information display page is used to display the resource information of resource accounts with remaining resources for the target object, the preset condition could be that the remaining resource information is greater than or equal to a resource quantity threshold. If the resource information of the target resource account meets the preset conditions, the current resource package can be stored as the target resource package; otherwise, the current resource package will not be stored.

[0085] In this embodiment, resource packages that have been set with target object resource accounts in the existing data can be identified and pre-stored as target resource packages. This avoids frequently querying multiple candidate resource packages after receiving subsequent query requests, while enabling targeted queries and effectively reducing the number of queries.

[0086] In one exemplary embodiment, such as Figure 3 As shown, prior to step S220, the method may further include the following steps:

[0087] In step S310, the account creation information of the target object in the resource management system is received, and the account creation information is sent to the asynchronous message queue.

[0088] The account creation information can instruct the creation of a resource account for the target object within the target resource package.

[0089] In practice, if the target object intends to add a resource account under a resource package, the terminal can send account creation information to the resource management system, and instruct the resource management system to create the target object's resource account in the resource package targeted by the account creation information.

[0090] After receiving account creation information, the resource management system can send the information to an asynchronous message queue. The message processing in the asynchronous message queue and the creation of the resource account can be asynchronous events; that is, neither the message processing nor the creation of the resource account needs to be triggered only after the other event has completed.

[0091] In step S320, based on the account creation information in the asynchronous message queue, the resource package corresponding to the account creation information is determined, and the resource package is used as the target resource package of the target object and stored.

[0092] Specifically, after sending account creation information to the asynchronous message queue, the resource management system can read the account creation information in the asynchronous message queue and process related tasks asynchronously. Specifically, the resource management system can determine the resource package corresponding to the account creation information based on the information carried in the asynchronous message queue. This resource package may include the resource package of the resource account of the target object to be created, and then the determined resource package can be used as the target resource package of the target object and stored.

[0093] In some examples, the resource management system can determine whether the message reading conditions are met, such as whether the waiting time has reached a preset threshold or whether the account creation information in the asynchronous message queue has reached a preset number. Then, it can read the account creation information in the asynchronous message queue when the message reading conditions are met.

[0094] In this embodiment, on the one hand, by sending the account creation information to an asynchronous message queue and storing the target resource package according to the resource package corresponding to the account creation information, the storage of the target resource package can be triggered at the same time as the normal creation of the resource account. This avoids increasing the user's waiting time and provides a basis for quickly identifying the resource package to be queried in the future.

[0095] In an exemplary embodiment, step S320, determining the resource package corresponding to the account creation information based on the account creation information in the asynchronous message queue, may include the following steps:

[0096] If all target resource packages of the target object include a resource package for the resource account to be created as indicated by the account creation information in the asynchronous message queue, then continue reading the next account creation information in the asynchronous message queue; if none of the target resource packages of the target object include a resource package for the resource account to be created as indicated by the account creation information in the asynchronous message queue, then that resource package is determined as the resource package corresponding to the account creation information.

[0097] Specifically, after reading the current account creation information of the target object, it is possible to obtain all the target resource packages of the target object and determine whether all the target resource packages include the resource package of the resource account to be created as indicated by the account creation information.

[0098] If yes, it can be determined that the resource package of the resource account to be created has been stored as the target resource package. The resource management system can then ignore the current account creation information and continue reading the next account creation information from the asynchronous message queue. If no, it can be determined that the resource package of the resource account to be created has not been stored as the target resource package. Therefore, this resource package can be identified as the resource package corresponding to the account creation information and stored as the target resource package in subsequent updates.

[0099] In this embodiment, for incremental data, that is, resource accounts newly added in resource packages under the resource management system, the resource packages of newly added target object resource accounts can be stored in a timely manner, realizing timely synchronization of new target resource packages, avoiding the need to traverse each resource package under the resource management system again in the future, and providing a basis for quickly determining the resource package to be queried in the future.

[0100] In one exemplary embodiment, the resource information query request includes a query request for resource information to be displayed on the resource information display page, such as... Figure 4 As shown, prior to step S220, the method may further include the following steps:

[0101] In step S410, the configuration information of the resource information display page is obtained. The resource information display page includes a page provided by the resource management system to the user object, which is used to display resource information associated with the preset business account to the user object. The configuration information is used to configure the business account in the resource management system to determine the preset business account.

[0102] In the specific implementation, users can query the resource information under the target object's resource account on the resource information page. The resource information display page can display the resource accounts associated with the preset business accounts and the resource information under those resource accounts. For example, it can display the resource information of the resource accounts associated with business account A and business account B.

[0103] The business accounts whose relevant resource information is to be displayed can be set through configuration information. Specifically, each business entity can select the business accounts in the resource management system whose relevant resource information is to be displayed through configuration information, thus obtaining the corresponding preset business accounts. For example, the configuration information can be set to display resource information related to business accounts A, B, and C from the existing N business accounts in the resource management system. In one example, the configuration information can be set by the business entity.

[0104] In this step, the resource management system can obtain the configuration information for the resource information display page.

[0105] In step S420, a preset business account is configured and determined based on the configuration information.

[0106] In step S430, multiple candidate resource packages are obtained based on multiple resource packages associated with a preset business account.

[0107] After obtaining the configuration information, the resource management system can determine the preset business accounts configured in the configuration information, and the resource packages associated with each preset business account, as multiple candidate resource packages that can be queried.

[0108] In this embodiment, the business account to be displayed resource information can be set based on the configuration information of the resource information display page, and the corresponding resource package can be used as multiple candidate resource packages.

[0109] In one exemplary embodiment, the resource information may include the resource balance of a resource account, whereby the resource balance refers to the amount of resources available to the target object. In some examples, the resource information may also include other information; for example, the resource information may also include at least one of the following: the time of resource acquisition, the time of resource transfer, the time of resource usage, the type of resource, the frequency of resource acquisition, and the frequency of resource usage.

[0110] If the resource information includes the remaining resource balance of the resource account, such as Figure 5 As shown, the method may further include the following steps:

[0111] In step S510, the total resource balance of the resource accounts associated with the target object is determined based on the resource balance in each resource account associated with the target object.

[0112] In practice, after determining the resource package to be queried for the target object, a query can be performed in each resource package. From the resource accounts contained in each resource package, the resource accounts associated with the target object can be filtered out. Then, the resource information in each associated resource account can be obtained to get the resource balance of the target object in that resource account. Based on the resource balance under each associated resource account, the total resource balance of the target object can be obtained. For example, the resource balances can be summed and the sum can be used as the total resource balance of the target object.

[0113] In step S520, the total remaining resource balance of the resource account associated with the target object is sent to the terminal of the target object so as to display the total remaining resource balance of the resource account associated with the target object on the resource information display page of the terminal.

[0114] After obtaining the total resource balance, the total resource balance corresponding to each resource account associated with the target object can be sent to the terminal where the target object is located. This allows the total resource balance that the target object has under the corresponding candidate resource package to be displayed on the resource information display page of the terminal.

[0115] In this embodiment, the total remaining resources of the target object under each associated resource account can be quickly queried and displayed.

[0116] In some optional embodiments, the remaining resource information can be stored in a cache module, such as Redis. When a resource information query request is received, there is no need to access the database or query the resource packages stored in the resource management system; a single cache query can quickly retrieve the remaining resource information. However, this method requires frequent cache consistency maintenance to ensure that the remaining resource information stored in the cache matches the remaining resource information stored in the database. Whenever the remaining resource information of the target object changes (such as resource acquisition, transfer, or exchange), a cache update will be triggered.

[0117] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0118] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.

[0119] Based on the same inventive concept, this disclosure also provides a resource information acquisition device for implementing the resource information acquisition method described above.

[0120] Figure 6 This is a block diagram illustrating a resource information acquisition device according to an exemplary embodiment. (Refer to...) Figure 6 The device includes a target resource package acquisition unit 601, a resource package determination unit 602, and a resource information acquisition unit 603.

[0121] The target resource package acquisition unit 601 is configured to execute a resource information query request based on the target object to acquire the target resource package of the target object; the target resource package includes the resource package of the target object in the resource management system where the target object creates a resource account;

[0122] The resource package determination unit 602 is configured to determine the resource package to be queried corresponding to the target object based on the target resource package and multiple candidate resource packages, wherein the multiple candidate resource packages include some resource packages associated with each business account of the resource management system;

[0123] The resource information acquisition unit 603 is configured to acquire resource information from each resource account associated with the target object based on the resource accounts contained in the resource package to be queried.

[0124] In one exemplary embodiment, each of the candidate resource packages includes at least one resource account, and each resource account corresponds to an account identifier. The apparatus further includes:

[0125] The first target resource package storage unit is configured to traverse all resource packages of the resource management system, determine the resource package containing the target resource account, and store it as the target resource package of the target object; the account identifier corresponding to the target resource account matches the object identifier of the target object.

[0126] In one exemplary embodiment, the apparatus further includes:

[0127] The information processing unit is configured to receive the account creation information of the target object in the resource management system and send the account creation information to an asynchronous message queue;

[0128] The second target resource package storage unit is configured to perform the following actions: determine the resource package corresponding to the account creation information based on the account creation information in the asynchronous message queue, use the resource package as the target resource package of the target object, and store the target resource package.

[0129] In one exemplary embodiment, the second target resource package storage unit is configured to perform:

[0130] If all target resource packages of the target object include the resource package of the resource account to be created indicated by the account creation information in the asynchronous message queue, then continue reading the next account creation information in the asynchronous message queue;

[0131] If none of the target resource packages of the target object include the resource package of the resource account to be created indicated by the account creation information in the asynchronous message queue, then the resource package is determined to be the resource package corresponding to the account creation information.

[0132] In an exemplary embodiment, the target resource package acquisition unit 601 is configured to perform:

[0133] Based on the pre-stored resource package identifier associated with the target object, the target resource package associated with the target object is determined; the association between the target object and the resource package identifier is stored after it is detected that the target object has created a resource account in the target resource package.

[0134] In one exemplary embodiment, the resource information query request includes a query request for resource information to be displayed on the resource information display page, and the device further includes:

[0135] The configuration information acquisition unit is configured to acquire configuration information for a resource information display page. The resource information display page includes a page provided by the resource management system to the user object, used to display resource information associated with a preset business account to the user object. The configuration information is used to configure the business account in the resource management system to determine the preset business account.

[0136] The business account determination unit is configured to determine the preset business account based on the configuration information.

[0137] The candidate resource package determination unit is configured to execute multiple resource packages associated with the preset business account to obtain the multiple candidate resource packages.

[0138] In one exemplary embodiment, the resource information includes the remaining resource balance of the resource account, and the device further includes:

[0139] The total resource balance determination unit is configured to determine the total resource balance of the resource accounts associated with the target object based on the resource balance in each resource account associated with the target object.

[0140] The total resource balance display unit is configured to send the total resource balance of the resource account associated with the target object to the terminal of the target object, so as to display the total resource balance of the resource account associated with the target object on the resource information display page of the terminal.

[0141] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0142] Each module in the aforementioned resource information acquisition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0143] Figure 7 This is a block diagram illustrating an electronic device 700 for implementing a resource information acquisition method, according to an exemplary embodiment. For example, the electronic device 700 can be a server. (Refer to...) Figure 7The electronic device 700 includes a processing component 720, which further includes one or more processors, and memory resources represented by memory 722 for storing instructions, such as application programs, that can be executed by the processing component 720. The application programs stored in memory 722 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 720 is configured to execute instructions to perform the methods described above.

[0144] Electronic device 700 may further include: a power supply component 724 configured to perform power management of electronic device 700, a wired or wireless network interface 726 configured to connect electronic device 700 to a network, and an input / output (I / O) interface 728. Electronic device 700 may operate on an operating system stored in memory 722, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, or similar.

[0145] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 722 including instructions, which can be executed by a processor of an electronic device 700 to perform the above-described method. The storage medium may be a computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0146] In an exemplary embodiment, a computer program product is also provided, the computer program product including instructions that can be executed by a processor of an electronic device 700 to perform the above-described method.

[0147] It should be noted that the above-mentioned apparatus, electronic equipment, computer-readable storage medium, computer program product, etc., may also include other implementation methods according to the description of the method embodiments. For specific implementation methods, please refer to the description of the relevant method embodiments, which will not be elaborated here.

[0148] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0149] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for acquiring resource information, characterized in that, include: Based on the resource information query request of the target object and the association between the target object and the corresponding resource package identifier, the target resource package of the target object is obtained; The target resource package includes the resource package in which the target object creates a resource account in the resource management system; Based on the intersection of the target resource package and multiple candidate resource packages, the resource package to be queried corresponding to the target object is determined. The multiple candidate resource packages include some resource packages associated with each business account of the resource management system. Based on the resource accounts contained in the resource package to be queried, obtain the resource information in each resource account associated with the target object.

2. The method according to claim 1, characterized in that, Each of the candidate resource packages contains at least one resource account, and each resource account corresponds to an account identifier. Before determining the query resource package corresponding to the target object based on the target resource package and the multiple candidate resource packages, the method further includes: Traverse all resource packages in the resource management system, determine the resource package containing the target resource account, and store it as the target resource package of the target object; the account identifier corresponding to the target resource account matches the object identifier of the target object.

3. The method according to claim 1, characterized in that, Before determining the query resource package corresponding to the target object based on the target resource package and the multiple candidate resource packages, the method further includes: Receive the account creation information of the target object in the resource management system, and send the account creation information to an asynchronous message queue; Based on the account creation information in the asynchronous message queue, determine the resource package corresponding to the account creation information, use the resource package as the target resource package of the target object, and store the target resource package.

4. The method according to claim 3, characterized in that, The step of determining the resource package corresponding to the account creation information based on the account creation information in the asynchronous message queue includes: If all target resource packages of the target object include the resource package of the resource account to be created indicated by the account creation information in the asynchronous message queue, then continue reading the next account creation information in the asynchronous message queue; If none of the target resource packages of the target object include the resource package of the resource account to be created indicated by the account creation information in the asynchronous message queue, then the resource package is determined to be the resource package corresponding to the account creation information.

5. The method according to claim 1, characterized in that, The step of obtaining the target resource package of the target object based on the resource information query request of the target object includes: Based on the pre-stored resource package identifier associated with the target object, the target resource package associated with the target object is determined; the association between the target object and the resource package identifier is stored after it is detected that the target object has created a resource account in the target resource package.

6. The method according to claim 1, characterized in that, The resource information query request includes a query request for resource information to be displayed on the resource information display page. Before determining the resource package to be queried corresponding to the target object based on the target resource package and multiple candidate resource packages, it also includes: Obtain configuration information for the resource information display page, which includes a page provided by the resource management system to the user object for displaying resource information associated with a preset business account. The configuration information is used to configure the business account in the resource management system to determine the preset business account. The preset business account is configured and determined based on the configuration information; Based on the multiple resource packages associated with the preset business account, the multiple candidate resource packages are obtained.

7. The method according to any one of claims 1-6, characterized in that, The resource information includes the remaining resource balance of the resource account, and the method further includes: Based on the remaining resources in each resource account associated with the target object, determine the total remaining resources of the resource accounts associated with the target object; Send the total remaining resource balance of the resource account associated with the target object to the terminal of the target object, so as to display the total remaining resource balance of the resource account associated with the target object on the resource information display page of the terminal.

8. A resource information acquisition device, characterized in that, include: The target resource package acquisition unit is configured to execute a resource information query request for the target object and the association between the target object and the corresponding resource package identifier to acquire the target resource package of the target object; the target resource package includes the resource package for which the target object has created a resource account in the resource management system; The resource package determination unit is configured to determine the resource package to be queried corresponding to the target object based on the intersection of the target resource package and multiple candidate resource packages, wherein the multiple candidate resource packages include some resource packages associated with each business account of the resource management system; The resource information acquisition unit is configured to acquire resource information from each resource account associated with the target object based on the resource accounts contained in the resource package to be queried.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the resource information acquisition method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the resource information acquisition method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data query method and device, computer equipment and medium

    CN115408597A