Business object information query method and device, computer equipment and storage medium

By storing and sorting business object information in the local cache, the query process is optimized, the response time extension problem of massive users is solved, and the query efficiency and user experience are improved.

CN119127927AInactive Publication Date: 2024-12-13E FUND MANAGEMENT CO LTD

Patent Information

Application Number
CN202411197845.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, business object information query efficiency is low, especially when a large number of Internet users access it, resulting in extended response time and decreased user experience.

Method used

By storing the details of the business object in the first local cache and sorting it in the second local cache, traversing the sorting identification information to obtain the target identification information, obtain the target details information from the first local cache, and report according to the target The text structure returns the target details.

Benefits of technology

It improves the efficiency of business object information query, reduces the pressure of direct querying business object database, and improves system response speed and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127927A_ABST
    Figure CN119127927A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a business object information query method and device, computer equipment and a storage medium, and the method comprises the following steps: storing detail information of a business object in a first local cache; wherein the detailed information comprises identification information of the business object; sorting the identification information of the business objects to obtain sorted identification information; storing the sorted identification information in a second local cache; wherein the first local cache is different from the second local cache; traversing the sorted identification information to obtain target identification information; obtaining target detail information corresponding to the target identification information from a first local cache; returning the target detail information according to the target message structure; wherein the target message structure comprises a value list and a key list. Therefore, by optimizing the data storage and query process, the method for improving the business object information query efficiency is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a business object information query method, device, computer equipment and storage medium. Background Art

[0002] With the development of Internet technology, a sales system has emerged to carry out corresponding transactions for massive Internet users, through which real-time online purchases can be supported. As the first choice for most users when conducting transactions, the business object list needs to provide sales information of the business object.

[0003] In the related art, if a user performs a personalized query among a large number of business objects, the user can directly initiate a query access to the application service to obtain the corresponding data. However, the efficiency of business object information query in the related art needs to be improved. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the present application proposes a business object information query method, device, computer device and storage medium. The main technical solutions adopted by the present application include:

[0005] In a first aspect, an embodiment of the present application provides a business object information query method, the method comprising: storing detailed information of a business object in a first local cache; wherein the detailed information comprises identification information of the business object; sorting the identification information of the business object to obtain sorted identification information; storing the sorted identification information in a second local cache; wherein the first local cache is different from the second local cache; traversing the sorted identification information to obtain target identification information; wherein the target identification information is a specified part of the sorted identification information; obtaining target detailed information corresponding to the target identification information from the first local cache; returning the target detailed information according to a target message structure; wherein the target message structure comprises a value list and a key list, the value list comprises the value of the key of the business object in the target detailed information, and the key list comprises the key of the business object in the target detailed information.

[0006] Optionally, storing the detailed information of the business object in the first local cache includes: updating the detailed information of the business object from the business object database to the first local cache through a scheduled task.

[0007] Optionally, sorting the identification information of the business object to obtain sorted identification information includes: sorting the identification information of the business object to obtain sorted identification information sorted according to a preset sorting method; wherein, there are multiple preset sorting methods, the business object has multiple attribute parameters, and the preset sorting methods correspond one-to-one to the attribute parameters of the business object.

[0008] Optionally, target detail information corresponding to the target identification information is obtained from the first local cache, including: obtaining initial detail information corresponding to the target identification information from the first local cache; matching the initial detail information according to the filtering conditions to obtain target detail information that meets the filtering conditions; wherein the target detail information is used to be displayed in the current page.

[0009] Optionally, the target detail information is used to be displayed in the current page; before traversing the sorted identification information to obtain the target identification information, the method also includes: determining the number of pages and the current starting identification; wherein the number of pages is the maximum number of business objects allowed to be displayed in the current page, and the current starting identification is used to indicate the sorting position of the first identification information used for the current query operation in the sorted identification information; traversing the sorted identification information to obtain the target identification information includes: when the current starting identification does not exceed the range of the number of business objects, traversing the sorted identification information according to the number of pages and the current starting identification to obtain the target identification information.

[0010] Optionally, if the sorted identification information is arranged in ascending order, and the current starting identification does not exceed the range of the number of business objects, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain the target identification information, including: when the current starting identification is less than or equal to the number of business objects, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain the target identification information.

[0011] Optionally, if the sorted identification information is in descending order, and the current starting identification does not exceed the range of the number of business objects, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain the target identification information, including: when the current starting identification is greater than zero, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain the target identification information.

[0012] In a second aspect, an embodiment of the present application provides a business object information query device, which includes: a details information storage module, which is used to store the details information of the business object in a first local cache; wherein the details information includes the identification information of the business object; an identification information sorting module, which is used to sort the identification information of the business object to obtain the sorted identification information; an identification information storage module, which is used to store the sorted identification information in a second local cache; wherein the first local cache is different from the second local cache; an identification information traversal module, which is used to traverse the sorted identification information to obtain target identification information; wherein the target identification information is a specified part of the sorted identification information; a details information acquisition module, which is used to obtain target details information corresponding to the target identification information from the first local cache; a details information return module, which is used to return the target details information according to the target message structure; wherein the target message structure includes a value list and a key list, the value list includes the value of the key of the business object in the target details information, and the key list includes the key of the business object in the target details information.

[0013] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.

[0014] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when the computer program is executed by a processor.

[0015] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.

[0016] In the above embodiment, the target identification information is determined by traversing the sorted identification information in the second local cache; wherein the target identification information is part of the sorted identification information; the target detailed information corresponding to the target identification information is obtained from the first local cache; wherein the first local cache stores detailed information of the business object, the detailed information includes the identification information of the business object, and the sorted identification information is obtained by sorting the identification information of the business object; finally, the target detailed information is returned according to the target message structure; wherein the target message structure includes a value list and a key list, the key list includes the key of the business object in the target detailed information, and the value list includes the value of the key of the business object in the target detailed information. Thus, a method for improving the efficiency of business object information query is realized by optimizing data storage and query process. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flowchart of a business object information query method provided according to an embodiment of the present application;

[0019] Figure 2 A schematic diagram of a method for sorting business object information provided according to an embodiment of the present application;

[0020] Figure 3 A flowchart of a method for obtaining target detailed information provided according to an embodiment of the present application;

[0021] Figure 4 A flowchart of a business object information query and traversal method provided according to an embodiment of the present application;

[0022] Figure 5 A flowchart of a business object information query method provided according to another embodiment of the present application;

[0023] Figure 6 is a structural block diagram of a business object information query device according to an embodiment of the present application;

[0024] Figure 7 The figure is a diagram of the internal structure of a computer device according to one embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.

[0026] Taking funds as an example, the full market fund sales system is a system for conducting fund transactions for a large number of Internet users. Tens of thousands of public funds support real-time online purchases. As the preferred tool for most users to purchase funds, the full fund list provides a wealth of fund sales information and convenient sorting, filtering and paging functions. In the fund industry, users conduct personalized queries among a large number of funds. In related technologies, they directly initiate query access to the application service and sink the logic to the database for corresponding conditional screening to complete fund data acquisition.

[0027] Faced with the real-time data query services for tens of thousands of funds by massive Internet customers, the existing technical services in fund sales scenarios have two main problems: First, the underlying data of the real-time query service is stored in multiple large tables, and personalized queries need to be associated with these tables, resulting in slow interface response rate and extended response time. Secondly, although cache-based data storage in related technologies can solve some of the response rate problems, once a large number of users access it at the same time, the bandwidth consumption caused by cache reading may affect system performance, ultimately resulting in low efficiency of fund queries and reduced user experience.

[0028] Based on this, the embodiment of the present application provides a fund information query method. The business object can be each public fund that provides instant online trading services, and the detailed information of the business object includes the basic information data of these funds, which may include but is not limited to the code, name, net value, risk level, establishment year and fund size of each fund. The identification information of the business object can be regarded as the fund code of each fund, and the business object database can be regarded as the fund database of the entire market.

[0029] Furthermore, multiple local cache spaces are preset, including a first local cache and a second local cache. The first local cache can be regarded as a local cache of basic fund information, and the second local cache can be regarded as a sorting local cache. The local cache of basic fund information is different from the sorting local cache. Specifically, the local cache of basic fund information is used to store basic information data of each public fund that provides instant online trading services obtained from the full market fund database. Optionally, the data stored in the local cache of basic fund information is in the form of Map<String,Object> Format organized.

[0030] Sorting the identification information of the business objects to obtain the sorted identification information can be regarded as sorting the fund codes of the funds to obtain the sorted fund codes. The sorted local cache is a local cache space for storing these sorted fund codes. Optionally, the fund codes stored in the sorted local cache can be in the form of List<T> <string>The fund codes are organized in the format of [fund code 1, fund code 2, ...] after sorting and stored in the sorted local cache in reverse order.

[0031] Traversing the sorted identification information to obtain the target identification information can be regarded as traversing the sorted fund code stored in the sorted local cache to obtain the target fund code. Specifically, after the system receives the query instruction, it traverses the sorted fund code in order from the sorted local cache to obtain the target fund code. Further, in a paging manner, only part of the sorted fund code in the sorted local cache is traversed, and part of the sorted fund code is used as the target fund code. Optionally, if the user also wants to filter according to fund type, risk level, establishment year, fund size, etc., the sorted fund code can be filtered before traversing the sorted fund code to obtain the target fund code. Specifically, the corresponding sorted local cache is traversed one by one in ascending or descending order. If there is a filtering condition, the traversed fund code is queried in the local cache of fund basic information to obtain the basic information data of the fund, and the basic information data of the fund is matched and filtered according to the filtering condition. Only when the filtering condition is met, the corresponding fund code is retained and used as the target fund code.

[0032] The target details information corresponding to the target identification information is obtained from the first local cache, and the target details information is returned according to the target message structure. It can be regarded as using the target fund code traversed in the sorted local cache to obtain the basic information data of the fund corresponding to the target fund code in the local cache of the fund basic information, and return the basic information data of the fund according to the target message structure. Among them, the target message structure can refer to the order in which the backend service returns the fields based on the fund list agreed with the product-side system. The backend service directly returns the fields in the order of the agreed array [value1, value2...], where the key arrays corresponding to all value arrays are only returned once each time the message is called. The product side can match the corresponding values ​​according to the key array order corresponding to the value array and use the data.

[0033] According to an embodiment of the present application, an embodiment of a business object information query method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0034] In this embodiment, a method for querying business object information is provided. Figure 1 : is a flowchart of a business object information query method according to an embodiment of the present application, comprising the following steps:

[0035] S110: Store detailed information of the business object in a first local cache.

[0036] The detailed information includes the identification information of the business object. The identification information represents specific information that can uniquely identify each business object. Exemplarily, the business object can be each public fund that provides instant online trading services, and the detailed information includes the basic information data of these funds, which may include but is not limited to the code, name, net value, risk level, establishment year and fund size of each fund. Furthermore, the fund code of each fund can be used as its identification information. It is understandable that the business object can also be each document that can be publicly queried in the literature database, and the detailed information can be the basic information data of these documents, which may include but is not limited to the article title, index number, author, publication date, etc. of each document.

[0037] The first local cache refers to a cache stored in the memory of the application server, which is used to store business object details. For example, the local cache of fund basic information can be regarded as the first local cache. Specifically, the detailed information of business objects can be stored in the first local cache from the business object database using a memory data structure. For example, a hash table (HashMap) is used to store data in the first local cache in the form of key-value pairs from the full market fund database that stores all fund information. At this time, the data is in the form of Map<String,Object> The format is organized as follows, where the String type key represents the fund code and the Object represents the detailed information associated with the fund code.

[0038] S120. Sort the identification information of the business objects to obtain sorted identification information.

[0039] Specifically, a kind of attribute value data of a preset business object is used as the basis for sorting, and such attribute value data of all business objects are extracted from the first local cache, and a sorting algorithm is applied to sort such attribute value data of all extracted business objects, and based on such attribute value data of the business objects, the identification information of the business objects is arranged in a certain order to obtain sorted identification information. Exemplarily, the fund net value is used as the attribute value data of the preset business object. Based on the fund net value, the actual fund net value of each fund is extracted from the local cache of the fund basic information, and further, according to the values ​​of the actual fund net values ​​of these funds, the fund codes are sorted from high to low, and finally the sorted fund codes of all funds arranged in order from large to small according to the fund net value are obtained.

[0040] S130: Store the sorted identification information in a second local cache.

[0041] The first local cache is different from the second local cache. The second local cache may refer to a lightweight memory cache, which is also stored in the memory of the application server and is used to store sorted identification information of the business object. Specifically, after sorting the multiple attribute value data of the business object, multiple sorted local caches may be constructed, in which the sorted identification information of each attribute value data category of the business object is stored. The sorted local cache may be regarded as the second local cache. Exemplarily, the sorted local cache may be a List<T> <string>After obtaining the sorted fund codes of all funds arranged in descending order according to a certain attribute value data of the fund, the sorted fund codes are stored in the corresponding sorted local cache in reverse order according to the format of [fund code 1, fund code 2, ...].

[0042] S140, traverse the sorted identification information to obtain target identification information.

[0043] The target identification information is a specified part of the sorted identification information. Specifically, after receiving the query instruction, the sorted identification information stored in the second local cache is sequentially traversed and searched based on the query instruction to obtain the target identification information.

[0044] Exemplarily, after receiving the query instruction, the system sequentially traverses the sorted fund codes from the sorted local cache to obtain the target fund code. Optionally, a paging method can be used to traverse only part of the sorted fund codes in the sorted local cache and use the part of the sorted fund codes as the target fund code.

[0045] S150: Obtain target detail information corresponding to the target identification information from the first local cache.

[0046] The target details information refers to the details information of the business object stored in the first local cache. Specifically, the target details information is the details information of the business object obtained in the first local cache by a corresponding search method based on the target identification information obtained by traversing from the second local cache. For example, the first local cache, that is, the local cache of the basic information of the fund, is based on Map<String,Object> format, use the target fund code as the key, and perform a corresponding query to get a value, which contains the basic information data of the target fund.

[0047] S160. Return target detailed information according to the target message structure.

[0048] Among them, the target message structure includes a value list and a key list, the value list includes the value of the key of the business object in the target detail information, and the key list includes the key of the business object in the target detail information. The target message structure is an optimized data return format. Specifically, the backend service will return a value list in a predetermined order according to the agreement of the predefined field order. Since the keys of all business objects usually do not change in a process, it is only necessary to return the value list of the key of the target business object, that is, the key list, once each time the interface is called, and then the product side can parse and use the data according to the predefined field order based on this key list. Understandably, after obtaining the target detail information corresponding to the target identification information in the first local cache, the target detail information of the business object can be returned to the product side using the target message structure and displayed on the user terminal interface.

[0049] Exemplarily, after obtaining the basic information data of the target fund corresponding to the target fund code in the first local cache, that is, the local cache of the basic information of the fund, the back-end service returns the fields directly in the order of the agreed array [value1, value2...] based on the order of the fund list return fields agreed with the product-side system, where the key arrays corresponding to all value arrays are returned only once in each call message. The product side can match the corresponding values ​​according to the key array order corresponding to the value array and use the data.

[0050] In the above implementation, the target identification information is first determined by traversing the sorted identification information in the second local cache, and the target detailed information corresponding to the target identification information is obtained from the first local cache, and finally the target detailed information is returned according to the target message structure. Thus, by optimizing the data storage and query process, a method for improving the efficiency of business object information query is realized.

[0051] In some implementations, storing detailed information of the business object in the first local cache includes: updating the detailed information of the business object from a business object database to the first local cache through a scheduled task.

[0052] Specifically, an automatically programmed timer task can be used to update the business object details from the business object database to the first local cache at a predetermined time interval. Exemplarily, this timer task includes querying the business object database for new data or changed data every minute, performing an update operation, reading the latest updated business object details in the business object database, and comparing it with the business object details stored in the first local cache, identifying the data items that need to be updated, and further writing the identified new data or changed data into the first local cache to replace the old data items, thereby completing the update.

[0053] In the above implementation, the new data or changed data in the business object database is written into the first local cache by a scheduled task and the old data items are replaced at the same time, so that the data in the first local cache is always kept up to date. Furthermore, by performing operations such as sorting and querying based on the updated first local cache, the system can ensure that users can always obtain the latest data when accessing detailed information of business objects, while reducing the direct query pressure on the business object database and improving the response speed and performance of the system.

[0054] In some implementations, sorting the identification information of the business objects to obtain sorted identification information includes:

[0055] Sort the identification information of the business object to obtain sorted identification information sorted according to a preset sorting method; wherein, there are multiple preset sorting methods, the business object has multiple attribute parameters, and the preset sorting methods correspond to the attribute parameters of the business object one by one. For example, if the business object is a fund, the attribute parameters of the business object may be more than ten attribute parameters such as the unit net value of the fund, daily rise and fall, the past week, the past year, this year, and since its establishment. Similarly, by sorting the business objects according to different attribute parameters, different groups of sorted identification information of the business objects under the preset sorting methods corresponding to different attribute parameters can be obtained. Specifically, if Figure 2 As shown, the business object database 202 stores all detailed information of all business objects, the first local cache 204 stores detailed information of business objects, and the sorted identification information of business objects under different preset sorting methods corresponding to different attribute parameters is stored in different second local caches. Exemplarily, the second local cache can be an establishment time sorting cache 206, which stores sorted fund codes arranged in chronological order since the establishment of the fund; it can be a unit net value sorting cache 208, which stores sorted fund codes arranged in descending order according to the unit net value of the fund; it can be a weekly time sorting cache 210, which stores sorted fund codes arranged in chronological order according to the fund in the past week; it can be a rise and fall sorting cache 212, which stores sorted fund codes arranged in chronological order according to the size of the daily rise and fall of the fund.

[0056] In the above implementation, multiple preset sorting methods are constructed based on multiple attribute parameters of the business object to obtain multiple second local caches, so that the system can flexibly sort business objects according to user needs while ensuring fast access and processing of data to improve user experience.

[0057] In some embodiments, please refer to the attached Figure 3 , obtaining target detail information corresponding to the target identification information from the first local cache, including:

[0058] S310: Obtain initial detail information corresponding to the identification information from the first local cache.

[0059] Among them, the initial detail information may refer to the detail information of all business objects obtained in the first local cache through a corresponding search method according to the target identification information obtained by traversing from the second local cache. Specifically, after receiving the query instruction, the sorted identification information stored in the second local cache is sequentially traversed and searched based on the query instruction to obtain the target identification information. Exemplarily, after the system receives the query instruction, the sorted fund codes are traversed in order from the sorted local cache to obtain the target fund codes corresponding to all funds. Furthermore, using these fund codes as keys, a corresponding query is performed in the first local cache, that is, the fund basic information local cache, to obtain the corresponding fund basic information data, that is, the initial detail information.

[0060] S320: Match the initial detailed information according to the screening conditions to obtain target detailed information that meets the screening conditions.

[0061] The target details are displayed on the current page. There may be more than one selection of filtering conditions. For example, if the business object is a fund, the filtering conditions may be fund type, risk level, years of establishment, fund size, etc. Specifically, the filtering process is to match and filter the initial details of the business object stored in the first local cache based on all selected filtering conditions, obtain the target details that meet the filtering conditions, and display them on the current page.

[0062] In the above implementation, through the screening function, the system can provide a more personalized and efficient user experience, allowing users to quickly find the business object information of interest.

[0063] In some embodiments, please refer to the attached Figure 4 , the target details information is used to be displayed in the current page. Before traversing the sorted identification information to obtain the target identification information, the method further includes:

[0064] S410: Determine the number of pages and the current start mark.

[0065] Among them, the number of pages is the maximum number of business objects allowed to be displayed in the current page, and the current starting identifier is used to indicate the sorting position of the first identification information used for the current query operation in the sorted identification information. Specifically, the value of the number of pages can be a value set by default after the system balances the page loading time and user experience. The current starting identifier is determined by the number of pages, the order of traversing the sorted identification information, and the current number of pages. Exemplarily, the number of pages and the current starting identifier are first initialized, where the current starting identifier in ascending order can start from 0, and the current starting identifier in descending order is the number of sorted identification information stored in the second local cache.

[0066] S420, traverse the sorted identification information to obtain target identification information, including:

[0067] When the current start identifier does not exceed the range of the number of business objects, the sorted identifier information is traversed according to the number of pages and the current start identifier to obtain the target identifier information.

[0068] Specifically, in the second local cache, the sorted identification information is traversed according to the number of pages and the current starting identifier, and the identification information of the business objects is retrieved one by one to obtain the target identification information. Optionally, if there is a filtering condition, for each identification information of the retrieved business object, the first local cache will be queried to obtain the detailed information of the business object, and the detailed information will be matched with the filtering condition. Only the business objects that meet all the filtering conditions will be retained, and the sorted identification information of the business objects that do not meet the filtering conditions will be eliminated to obtain the target identification information. Furthermore, if the number of sorted identification information after filtering is less than the number of pages, then after completing the traversal of the current page, the current starting identifier is updated to the starting identifier of the next page, that is, the starting identifier value of the current page plus the number of pages, and the next page traversal operation is performed again until the target identification information obtained is greater than or equal to the number of pages.

[0069] In the above implementation, by determining the number of pages and the current starting identifier and traversing the sorted identifier information, the target identifier information is finally obtained, so that the system can achieve efficient paging and screening of a large number of business objects, ensuring that users can easily browse and retrieve required information according to their needs.

[0070] In some implementations, if the sorted identification information is in ascending order, and the current starting identification does not exceed the range of the number of business objects, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain the target identification information, including:

[0071] When the current start identifier is less than or equal to the number of business objects, the sorted identifier information is traversed according to the number of pages and the current start identifier to obtain the target identifier information.

[0072] Specifically, after determining the number of pages and the current starting identifier, when the user issues an instruction to request a specific page number, the system will receive the number of pages and the current starting identifier passed by the calling service. At this time, the system will check whether the current starting identifier is greater than the number of all business objects stored in the first local cache. If so, it means that the requested page number exceeds the number of pages that can actually be displayed. At this time, the system returns an empty array, indicating that there is no more data to display; if not, it means that the requested page number can be displayed normally, then the sorted identifier information is traversed in ascending order to filter out all business objects that meet the conditions. It can be understood that during the traversal process, the system will update the starting identifier, and the starting identifier when exiting the traversal loop will be used as the current starting subscript for the next request. It is the minimum value between the subscript value at the end of the current traversal and the number of all business objects stored in the first local cache. Finally, the system returns the target identifier information obtained by the current traversal and the updated current starting subscript.

[0073] In the above implementation, for the ascending arrangement, when the current starting identifier is less than or equal to the number of business objects, the sorted identifier information is traversed according to the number of pages and the current starting identifier to obtain the target identifier information. The system can efficiently process the paging request to facilitate users to browse the entire business object detail information list step by step.

[0074] In some implementations, if the sorted identification information is in descending order, and the current starting identification does not exceed the range of the number of business objects, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain the target identification information, including:

[0075] When the current start identifier is greater than zero, the sorted identifier information is traversed according to the number of pages and the current start identifier to obtain the target identifier information.

[0076] Specifically, after determining the number of pages and the current starting identifier, when the user issues an instruction to request a specific page number, the system will receive the number of pages and the current starting identifier passed by the calling service. At this time, the system will check whether the current starting identifier is less than zero. If so, it means that the requested page number exceeds the number of pages that can actually be displayed. At this time, the system returns an empty array, indicating that there is no more data to display; if not, it means that the requested page number can be displayed normally, then the sorted identifier information is traversed in descending order to filter out all business objects that meet the conditions. It can be understood that during the traversal process, the system will update the starting identifier, and the starting identifier when exiting the traversal loop will be used as the current starting index for the next request. It is obtained by subtracting the index value at the end of the current traversal from the number of all business objects stored in the first local cache, and ensure that this value is not less than 0. Finally, the system returns the target identifier information obtained by the current traversal and the updated current starting index.

[0077] In the above implementation, for the ascending order, when the current starting identifier is greater than zero, the sorted identifier information is traversed according to the number of pages and the current starting identifier to obtain the target identifier information. The system can efficiently process paging requests, and even when the current business object information is huge, it can facilitate users to browse part of the business object information in the reverse order of the second local cache, providing a variety of user experiences.

[0078] This specification also provides a method for querying business object information. Figure 5 , the method comprises the following steps:

[0079] S502: Update business object details from a business object database to a first local cache through a scheduled task.

[0080] The detailed information includes identification information of the business object. The identification information represents specific information that can uniquely identify each business object. The first local cache refers to a cache stored in the memory of the application server, which is used to store the business object detailed information. Specifically, the business object detailed information can be updated from the business object database to the first local cache at a predetermined time interval through an automatically programmed timer task.

[0081] S504: Sort the identification information of the business objects to obtain sorted identification information sorted according to a preset sorting method.

[0082] Among them, there are multiple preset sorting methods, and the business object has multiple attribute parameters. The preset sorting methods correspond to the attribute parameters of the business object one by one. For example, if the business object is a fund, the attribute parameters of the business object can be more than ten attribute parameters such as the unit net value of the fund, daily rise and fall, the past week, the past year, this year, and since its establishment. Similarly, by sorting the different attribute parameters of the business object, the identification information of different groups of business objects under the preset sorting methods corresponding to different attribute parameters can be obtained.

[0083] S506: Store the sorted identification information in the second local cache.

[0084] The first local cache is different from the second local cache. The second local cache may refer to a lightweight memory cache, which is also stored in the memory of the application server and is used to store sorted identification information of the business object. Specifically, after sorting the multiple attribute value data of the business object, multiple sorted local caches may be constructed, in which the sorted identification information of each attribute value data category of the business object is stored, and the sorted local cache may be regarded as the second local cache.

[0085] S508: Determine the number of pages and the current start mark.

[0086] The number of pages is the maximum number of business objects allowed to be displayed in the current page, and the current start identifier is used to indicate the sorting position of the first identifier used in the current query operation in the sorted identifier information. Specifically, the value of the number of pages can be a default value set by the system after balancing page loading time and user experience, and the current start identifier is determined by the number of pages, the order of traversing the sorted identifier information, and the current page number.

[0087] S510: If the sorted identification information is in ascending order, and the current starting identification is less than or equal to the number of business objects, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain target identification information.

[0088] Specifically, after determining the number of pages and the current starting identifier, when the user issues an instruction to request a specific page number, the system will receive the number of pages and the current starting identifier passed by the calling service. At this time, the system will check whether the current starting identifier is greater than the number of all business objects stored in the first local cache. If so, it means that the requested page number exceeds the actual number of pages that can be displayed. At this time, the system returns an empty array, indicating that there is no more data to display; if not, it means that the requested page number can be displayed normally, then the sorted identifier information is traversed in ascending order to filter out all business objects that meet the conditions.

[0089] S512: If the sorted identification information is in descending order, and the current start identification is greater than zero, the sorted identification information is traversed according to the number of pages and the current start identification to obtain target identification information.

[0090] Specifically, after determining the number of pages and the current start identifier, when the user issues an instruction to request a specific page number, the system will receive the number of pages and the current start identifier passed by the calling service. At this time, the system will check whether the current start identifier is less than zero. If so, it means that the requested page number exceeds the actual number of pages that can be displayed. At this time, the system returns an empty array, indicating that there is no more data to display; if not, it means that the requested page number can be displayed normally, then the sorted identifier information is traversed in descending order to filter out all business objects that meet the conditions.

[0091] S514 traverses the sorted identification information according to the number of pages and the current starting identification to obtain target identification information.

[0092] Specifically, in the second local cache, the sorted identification information is traversed according to the number of pages and the current start identification, and the identification information of the business objects is retrieved one by one to obtain the target identification information.

[0093] S516: Obtain initial detail information corresponding to the target identification information from the first local cache.

[0094] The target details information refers to the details information of the business object stored in the first local cache. Specifically, the target details information is the details information of the business object obtained in the first local cache by a corresponding search method based on the target identification information obtained by traversing from the second local cache.

[0095] S518: Match the initial detailed information according to the screening conditions to obtain target detailed information that meets the screening conditions.

[0096] The target details are displayed on the current page. There may be more than one selection of filtering conditions. For example, if the business object is a fund, the filtering conditions may be fund type, risk level, years of establishment, fund size, etc. Specifically, the filtering process is to match and filter the initial details of the business object stored in the first local cache based on all selected filtering conditions, obtain the target details that meet the filtering conditions, and display them on the current page.

[0097] S520. Return target detailed information according to the target message structure.

[0098] The target message structure includes a value list and a key list. The value list includes the value of the key of the business object in the target detail information, and the key list includes the key of the business object in the target detail information. Specifically, the backend service will return a value list in a predetermined order according to the predefined field order convention. Since the keys of all business objects usually do not change in a process, it is only necessary to return the value list of the key of the target business object, that is, the key list, once each time the interface is called. After that, the product end can parse and use the data according to the predefined field order based on this key list.

[0099] It should be understood that, although the various steps in the above flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may 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 part of the steps or stages in other steps.

[0100] The present specification also provides a business object information query device 600, such as Figure 6 As shown, it includes: a detail information storage module 610, an identification information sorting module 620, an identification information storage module 630, an identification information traversal module 640, a detail information acquisition module 650 and a detail information return module 660, wherein:

[0101] The detailed information storage module 610 is used to store detailed information of the business object in the first local cache. The detailed information includes identification information of the business object.

[0102] The identification information sorting module 620 is used to sort the identification information of the business objects to obtain sorted identification information.

[0103] The identification information storage module 630 is used to store the sorted identification information in a second local cache, wherein the first local cache is different from the second local cache.

[0104] The identification information traversal module 640 is used to traverse the sorted identification information to obtain target identification information, wherein the target identification information is a specified part of the sorted identification information.

[0105] The detail information acquisition module 650 is used to acquire the target detail information corresponding to the target identification information from the first local cache.

[0106] The detailed information return module 660 is used to return the target detailed information according to the target message structure, wherein the target message structure includes a value list and a key list, the value list includes the value of the key of the business object in the target detailed information, and the key list includes the key of the business object in the target detailed information.

[0107] In some implementations, the detail information storage module 610 is further configured to update the business object detail information from the business object database to the first local cache through a scheduled task.

[0108] In some embodiments, the detailed information acquisition module 650 is further used to acquire initial detailed information corresponding to the target identification information from the first local cache, and to match the initial detailed information according to the screening condition to obtain target detailed information that meets the screening condition, wherein the target detailed information is used to be displayed in the current page.

[0109] In some embodiments, the target detail information is used to be displayed in the current page. Before traversing the sorted identification information to obtain the target identification information, the identification information traversal module 640 is also used to determine the number of pages and the current starting identification. The number of pages is the maximum number of business objects allowed to be displayed in the current page, and the current starting identification is used to indicate the sorting position of the first identification information used for the current query operation in the sorted identification information. Traversing the sorted identification information to obtain the target identification information includes: when the current starting identification does not exceed the range of the number of business objects, traversing the sorted identification information according to the number of pages and the current starting identification to obtain the target identification information.

[0110] In some embodiments, if the sorted identification information is arranged in ascending order, and the current starting identification does not exceed the range of the number of business objects, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain the target identification information. The identification information traversal module 640 is also used to traverse the sorted identification information according to the number of pages and the current starting identification to obtain the target identification information when the current starting identification is less than or equal to the number of business objects.

[0111] In some embodiments, if the sorted identification information is arranged in descending order, and the current starting identification does not exceed the range of the number of business objects, the sorted identification information is traversed according to the number of pages and the current starting identification to obtain the target identification information. The identification information traversal module 640 is also used to traverse the sorted identification information according to the number of pages and the current starting identification to obtain the target identification information when the current starting identification is greater than zero.

[0112] For the specific definition of a business object information query device, please refer to the definition of a business object information query method above, which will not be repeated here. Each module in the above-mentioned business object information query device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0113] A business object information query device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0114] The embodiment of the present application also provides a computer device, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a business object information query method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0115] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0116] The embodiment of the present application also provides a computer-readable storage medium. The above method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0117] The embodiment of the present application provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of any embodiment of the present application.

[0118] The business object information query method, apparatus, device and storage medium described in the above embodiments can be implemented by a computer chip or entity, or by a product with a certain function. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0119] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0120] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0121] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0122] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0124] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0125] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0126] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the existence of other identical elements in the process, method, commodity or device including the element.

[0127] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. Since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0128] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

[0129] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.

[0130] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0131] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0132] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0133] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0134] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0135] It is understandable that in the specific implementation of the present application, related data such as user information, location information, navigation data, etc. are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.< / string> < / string>

Claims

1. A method for querying business object information, characterized in that: The method comprises: Storing detailed information of the business object in a first local cache; wherein the detailed information includes identification information of the business object; Sorting the identification information of the business objects to obtain sorted identification information; storing the sorted identification information in a second local cache; wherein the first local cache is different from the second local cache; Traversing the sorted identification information to obtain target identification information; wherein the target identification information is a specified part of the sorted identification information; Acquire target detail information corresponding to the target identification information from the first local cache; The target detail information is returned according to the target message structure; wherein the target message structure includes a value list and a key list, the value list includes the value of the key of the business object in the target detail information, and the key list includes the key of the business object in the target detail information.

2. The method according to claim 1, characterized in that The storing of detailed information of the business object in the first local cache includes: The business object detail information is updated from the business object database to the first local cache through a scheduled task.

3. The method according to claim 1, characterized in that The step of sorting the identification information of the business objects to obtain sorted identification information includes: The identification information of the business object is sorted to obtain sorted identification information sorted according to a preset sorting method; wherein the number of the preset sorting methods is multiple, the business object has multiple attribute parameters, and the preset sorting methods correspond one-to-one to the attribute parameters of the business object.

4. The method according to claim 1, characterized in that The acquiring, from the first local cache, target detail information corresponding to the target identification information includes: Acquire initial detail information corresponding to the target identification information from the first local cache; The initial detailed information is matched according to the filtering condition to obtain the target detailed information satisfying the filtering condition; wherein the target detailed information is used to be displayed in the current page.

5. The method according to claim 1, characterized in that The target details information is used to be displayed on the current page; Before traversing the sorted identification information to obtain target identification information, the method further includes: Determine the number of pages and the current start identifier; wherein the number of pages is the maximum number of business objects allowed to be displayed in the current page, and the current start identifier is used to indicate the sorting position of the first identifier information used in the current query operation in the sorted identifier information; The step of traversing the sorted identification information to obtain target identification information includes: In the case that the current start identifier does not exceed the range of the number of business objects, the sorted identifier information is traversed according to the number of pages and the current start identifier to obtain the target identifier information.

6. The method according to claim 5, characterized in that If the sorted identification information is in ascending order, and the current start identification does not exceed the range of the number of business objects, the sorted identification information is traversed according to the number of pages and the current start identification to obtain the target identification information, including: When the current start identifier is less than or equal to the number of the business objects, the sorted identifier information is traversed according to the number of pages and the current start identifier to obtain the target identifier information.

7. The method according to claim 5, characterized in that If the sorted identification information is in descending order, and the current start identification does not exceed the range of the number of business objects, the sorted identification information is traversed according to the number of pages and the current start identification to obtain the target identification information, including: When the current start identifier is greater than zero, the sorted identifier information is traversed according to the paging number and the current start identifier to obtain the target identifier information.

8. A business object information query device, characterized in that: The device comprises: A detail information storage module, used to store detail information of the business object in the first local cache; wherein the detail information includes identification information of the business object; An identification information sorting module, used to sort the identification information of the business object to obtain sorted identification information; An identification information storage module, used to store the sorted identification information in a second local cache; wherein the first local cache is different from the second local cache; An identification information traversal module, used to traverse the sorted identification information to obtain target identification information; wherein the target identification information is a specified part of the sorted identification information; A detailed information acquisition module, used to acquire target detailed information corresponding to the target identification information from the first local cache; A detail information return module is used to return the target detail information according to the target message structure; wherein the target message structure includes a value list and a key list, the value list includes the value of the key of the business object in the target detail information, and the key list includes the key of the business object in the target detail information.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data pagination query method and apparatus

    CN105354256A

  • Data query method and device, computing equipment and storage medium

    CN116644091A

  • Service data processing method and system

    CN117633014A

Cited By

  • Data screening method and device, data interaction system and storage medium

    CN121117061A