Query processing method and device, computer device, and storage medium
By receiving user information to determine the target user type, obtaining the target application permission information, and using an asynchronous loading mechanism to process query requests, the problem of low permission query efficiency in the application center of the homepage of financial and insurance products has been solved, improving response efficiency and user experience.
Patent Information
- Application Number
- CN202311214142.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-09-19
AI Technical Summary
The existing permission query processing method in the homepage application center of financial insurance products is inefficient, resulting in huge server pressure and even potential crashes.
By receiving user information, the target user type is determined, the target application permission information is obtained based on the user type, and the target interface is called using an asynchronous loading mechanism to perform response processing, including caching mechanisms for active and inactive users and data acquisition interfaces.
It improved the response efficiency of query requests, reduced server load, and enhanced the user experience.
Smart Images

Figure CN117251468B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of big data technology and fintech, and in particular to query processing methods, devices, computer equipment and storage media. Background Technology
[0002] For fintech companies like insurance companies, they typically develop financial and insurance products for business promotion. Currently, in the application scenarios of these products, the homepage application center is the most frequently used entry point for users, bearing significant concurrent load but also playing a crucial role in user experience. When the application center on the homepage of a financial and insurance product has many functional modules and complex permissions, it often uses a pre-built data table containing application permission information for all users to handle permission queries for each application entry. This permission query processing method easily leads to slow query returns from the application center, low query processing efficiency for financial and insurance products, and immense server pressure, potentially even causing server crashes. Summary of the Invention
[0003] The purpose of this application is to provide a query processing method, apparatus, computer device, and storage medium to solve the technical problems of existing permission query processing methods that use a pre-built data table containing application permission information of all users, which easily leads to slow query returns from the application center, low query processing efficiency for financial and insurance products, and huge pressure on the servers of financial and insurance products.
[0004] To address the aforementioned technical problems, this application provides a query processing method, employing the following technical solution:
[0005] Receive a query request from a user for the application center of a target product application; wherein the query request carries the user's user information;
[0006] Obtain the user information from the query request, and determine the target user type of the user based on the user information;
[0007] Based on the target processing rules corresponding to the target user type, obtain the target application permission information corresponding to the user information;
[0008] Determine whether the target application's permissions match the preset specified loading scenario;
[0009] If so, based on the preset asynchronous loading mechanism, the target interface corresponding to the target application's permissions is called;
[0010] Execute the response processing corresponding to the query request based on the target interface.
[0011] Furthermore, the step of obtaining the target application permission information corresponding to the user information based on the target processing rule corresponding to the target user type specifically includes:
[0012] Determine whether the user is an active user based on the target user type;
[0013] If the user is not an active user, then obtain the category information corresponding to the user information;
[0014] Retrieve application permission information corresponding to the classification information from the preset cache;
[0015] The application permission information is used as the target application permission information.
[0016] Furthermore, the step of retrieving application permission information corresponding to the classification information from a preset cache specifically includes:
[0017] Determine whether a first category information matching the category information is stored in a preset local memory cache;
[0018] If the local memory cache stores first category information that matches the category information, then the application permission information corresponding to the first category information is obtained from the local memory cache.
[0019] If the local memory cache does not store first category information that matches the category information, then determine whether the preset Redis cache stores second category information that matches the category information.
[0020] If the Redis cache stores second category information that matches the category information, then the application permission information corresponding to the second category information is retrieved from the Redis cache.
[0021] Furthermore, before the step of retrieving application permission information corresponding to the classification information from a preset cache, the method further includes:
[0022] Call the preset data retrieval interface;
[0023] The specified application permission information of inactive users can be obtained through the data acquisition interface.
[0024] Store the specified application permission information in the local memory cache; and
[0025] The specified application permission information is stored in the Redis cache.
[0026] Furthermore, the step of obtaining the target application permission information corresponding to the user information based on the target processing rule corresponding to the target user type specifically includes:
[0027] Determine whether the user is an active user based on the target user type;
[0028] If the user is an active user, then the preset active user data is retrieved;
[0029] Obtain the target application permission information corresponding to the user information from the active user data.
[0030] Furthermore, the step of determining the target user type of the user based on the user information specifically includes:
[0031] Call the preset active user pool;
[0032] Determine whether target user information matching the user information is stored in the active user pool;
[0033] If the active user pool stores target user information that matches the user information, then the user is determined to be an active user, and the target user type of the active user is generated.
[0034] If the active user pool does not store target user information that matches the user information, then the user is determined to be an inactive user, and the target user type of the inactive user is generated.
[0035] Furthermore, prior to the step of invoking the preset active user pool, the following steps are also included:
[0036] Retrieve user access data and log records within a preset time period;
[0037] The user access data and the log records are analyzed and processed to identify specific users who are active users from all the initial users.
[0038] Obtain the specified user information of the specified user;
[0039] The specified user information is stored in the active user pool.
[0040] To address the aforementioned technical problems, this application also provides a query processing device, which employs the following technical solution:
[0041] The receiving module is used to receive a query request from a user for the application center of the target product application; wherein the query request carries the user's user information;
[0042] The determination module is used to obtain the user information from the query request and determine the target user type of the user based on the user information;
[0043] The acquisition module is used to acquire target application permission information corresponding to the user information based on the target processing rules corresponding to the target user type.
[0044] The judgment module is used to determine whether the permissions of the target application meet the preset specified loading scenario;
[0045] The calling module is used to, if so, call the target interface corresponding to the target application permissions based on a preset asynchronous loading mechanism;
[0046] The processing module is used to perform response processing corresponding to the query request based on the target interface.
[0047] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:
[0048] Receive a query request from a user for the application center of a target product application; wherein the query request carries the user's user information;
[0049] Obtain the user information from the query request, and determine the target user type of the user based on the user information;
[0050] Based on the target processing rules corresponding to the target user type, obtain the target application permission information corresponding to the user information;
[0051] Determine whether the target application's permissions match the preset specified loading scenario;
[0052] If so, based on the preset asynchronous loading mechanism, the target interface corresponding to the target application's permissions is called;
[0053] Execute the response processing corresponding to the query request based on the target interface.
[0054] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:
[0055] Receive a query request from a user for the application center of a target product application; wherein the query request carries the user's user information;
[0056] Obtain the user information from the query request, and determine the target user type of the user based on the user information;
[0057] Based on the target processing rules corresponding to the target user type, obtain the target application permission information corresponding to the user information;
[0058] Determine whether the target application's permissions match the preset specified loading scenario;
[0059] If so, based on the preset asynchronous loading mechanism, the target interface corresponding to the target application's permissions is called;
[0060] Execute the response processing corresponding to the query request based on the target interface.
[0061] Compared with the prior art, the embodiments of this application have the following main advantages:
[0062] In this embodiment, upon receiving a query request from a user for an application center related to a target product application, the system first obtains the user information from the query request and determines the target user type based on the user information. Then, based on the target processing rules corresponding to the target user type, it obtains the target application permission information corresponding to the user information. Subsequently, it determines whether the target application permissions conform to a preset specified loading scenario. If so, based on a preset asynchronous loading mechanism, it calls the target interface corresponding to the target application permissions. Finally, it executes the response processing corresponding to the query request based on the target interface. In this embodiment, after receiving a query request from a user for the application center of a target product application, the system first determines the user's target user type based on the user information carried in the query request. Then, it intelligently uses the target user type to identify the user's target user type and intelligently obtains the target application permission information corresponding to the user information based on the target processing rules corresponding to the target user type. This facilitates subsequent calls to the target interface corresponding to the target application permissions based on a preset asynchronous loading mechanism, enabling quick execution of the response processing corresponding to the query request. This effectively improves the efficiency of interface response and query request response, reduces the server pressure on the target product application, and enhances the user experience. Attached Figure Description
[0063] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;
[0065] Figure 2 A flowchart of an embodiment of the query processing method according to this application;
[0066] Figure 3 This is a schematic diagram of the structure of an embodiment of the query processing apparatus according to this application;
[0067] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0069] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0070] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0071] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0072] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0073] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0074] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.
[0075] It should be noted that the query processing method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the query processing device is generally set in the server / terminal device.
[0076] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0077] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0078] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0079] Continue to refer to Figure 2The flowchart illustrates an embodiment of the query processing method according to this application. Depending on different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted. The query processing method provided in this application embodiment can be applied to any scenario requiring permission information queries for product applications, and thus can be applied to products in these scenarios, such as permission information queries for insurance product applications in the financial insurance field. The query processing method includes the following steps:
[0080] Step S201: Receive a query request from the user for the application center of the target product application; wherein the query request carries the user's user information.
[0081] In this embodiment, the query processing method runs on an electronic device (e.g., Figure 1 The server / terminal device shown can obtain query requests carrying user information via wired or wireless connections. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future wireless connection methods. In the business scenario of finance and insurance, the aforementioned target product application can specifically be a finance and insurance application product, such as any one of the following: auto insurance application products, life insurance application products, medical insurance application products, etc. The aforementioned application center refers to the application center on the homepage of the target product application. The homepage application center is the most frequently used function entry point for users, bearing significant concurrent pressure, but also playing a crucial role in user experience. The aforementioned query request is a query request triggered when a user accesses the application center on the homepage of the target product application. Furthermore, the aforementioned user information may include the user's identity information, such as name information.
[0082] Step S202: Obtain the user information from the query request, and determine the target user type of the user based on the user information.
[0083] In this embodiment, the user information can be extracted from the query request by parsing it. The specific implementation process for determining the target user type based on the user information will be described in further detail in subsequent embodiments and will not be elaborated upon here.
[0084] Step S203: Based on the target processing rules corresponding to the target user type, obtain the target application permission information corresponding to the user information.
[0085] In this embodiment, the target user type includes active users or inactive users. For different user types, processing rules for obtaining user application permission information are pre-set, corresponding to each user type. The specific implementation process of obtaining target application permission information corresponding to the user information based on the target processing rules corresponding to the target user type will be described in further detail in subsequent embodiments of this application, and will not be elaborated upon here.
[0086] Step S204: Determine whether the target application permissions meet the preset specified loading scenario.
[0087] In this embodiment, the specified loading scenario is specifically a scenario where a third-party interface needs to be called to determine the application's display permissions and jump parameters.
[0088] Step S205: If yes, based on the preset asynchronous loading mechanism, call the target interface corresponding to the target application permissions.
[0089] In this embodiment, the aforementioned asynchronous loading mechanism refers to the mechanism of integrating asynchronous Future calls. Specifically, it can be achieved by introducing a thread pool to implement various third-party interfaces using concurrent interface calls, i.e., simultaneous invocation of the target interface, thereby greatly improving the efficiency of interface queries. Asynchronous Future is one of the commonly used asynchronous programming methods in Java. It can return a Future object representing a future result during code execution, allowing the program to continue performing other operations while waiting for the result. The Future object represents the result of an asynchronous operation. When executing an asynchronous task, the execution status and result of the task can be obtained through the Future object. In Java, Future objects are usually returned by asynchronous tasks submitted through the Executor framework, and the execution result of the asynchronous task can be obtained using the Future.get() method. If the asynchronous task has not yet completed, calling the Future.get() method will block the thread until the asynchronous task is completed and returns a result.
[0090] Step S206: Execute response processing corresponding to the query request based on the target interface.
[0091] In this embodiment, after calling the target interface corresponding to the target application's permissions based on the above asynchronous loading mechanism, the target interface can be used to execute the response processing of the user-triggered query request for the application center of the target product application, thereby achieving a fast and accurate response to the query request.
[0092] Upon receiving a query request from a user for an application center related to a target product application, this application first obtains the user information from the query request and determines the target user type based on the user information. Then, based on the target processing rules corresponding to the target user type, it obtains the target application permission information corresponding to the user information. Subsequently, it determines whether the target application permissions conform to a preset specified loading scenario. If so, based on a preset asynchronous loading mechanism, it calls the target interface corresponding to the target application permissions. Finally, it executes the response processing corresponding to the query request based on the target interface. Upon receiving a query request from a user for the application center of a target product application, this application first determines the user's target user type based on the user information carried in the query request. Then, it intelligently uses the target user type to identify the user's target user category and intelligently retrieves the target application permission information corresponding to the user information based on the target processing rules corresponding to the target user type. This facilitates subsequent calls to the target interface corresponding to the target application permissions based on a preset asynchronous loading mechanism, enabling rapid execution of the response processing corresponding to the query request. This effectively improves the efficiency of interface response and query request response, reduces the server load on the target product application, and enhances the user experience.
[0093] In some alternative implementations, step S203 includes the following steps:
[0094] Determine whether the user is an active user based on the target user type.
[0095] In this embodiment, the content of the target user type includes active users or inactive users. If the content of the target user type is active user, the user is determined to be an active user; if the content of the target user type is inactive user, the user is determined to be an inactive user.
[0096] If the user is not an active user, then obtain the category information corresponding to the user information.
[0097] In this embodiment, the aforementioned classification information may refer to information categorized by labels, organizations, groups of people, etc.
[0098] Retrieve application permission information corresponding to the classification information from the preset cache.
[0099] In this embodiment, the specific implementation process of obtaining the application permission information corresponding to the classification information from the preset cache will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0100] The application permission information is used as the target application permission information.
[0101] This application determines whether a user is an active user based on the target user type. If the user is not an active user, it obtains category information corresponding to the user information. Then, it retrieves application permission information corresponding to the category information from a preset cache. Subsequently, it uses the application permission information as the target application permission information. When the target user type determines that a user is an inactive user, this application intelligently obtains the category information corresponding to the user information. Then, based on the use of the cache, it quickly obtains the application permission information corresponding to the category information and uses it as the target application permission information. This facilitates the subsequent use of the target application permission information quickly obtained from the cache to call the target interface corresponding to the target application permission, thereby quickly executing the response processing corresponding to the query request. This effectively improves the efficiency of interface response and query request response, and ultimately enhances the user experience.
[0102] In some optional implementations of this embodiment, obtaining the application permission information corresponding to the classification information from a preset cache includes the following steps:
[0103] Determine whether a first category information matching the category information is stored in a preset local memory cache.
[0104] In this embodiment, the aforementioned local memory cache can also be referred to as ThreadLocal. Data queries can be performed on the local memory cache using classification information to detect whether the local memory cache stores first classification information that matches the classification information. Specifically, the local memory cache pre-caches classification information for inactive users, as well as application permission information corresponding to the classification information of inactive users. Application permission information refers to a user's visibility permissions for various applications in the application center; different users may have different visible application permissions. Furthermore, the cached data in the local memory cache is periodically cleaned up.
[0105] If the local memory cache stores first category information that matches the category information, then the application permission information corresponding to the first category information is retrieved from the local memory cache.
[0106] In this embodiment, the aforementioned application permission information is application permission information stored in the local memory cache that has a data correspondence with the first classification information. For example, the classification information, such as a tag, organization, or population code, can be found first through the user's identity information, and then the corresponding application permission information can be obtained from the local memory cache based on the classification information.
[0107] If the local memory cache does not store first category information that matches the category information, then it is determined whether the preset Redis cache stores second category information that matches the category information.
[0108] In this embodiment, the aforementioned Redis cache is a pre-built cache database within the electronic device. Data queries can be performed on the Redis cache using classification information to detect whether a second classification information matching the classification information is stored in the Redis cache. Specifically, the Redis cache pre-caches classification information for inactive users, as well as application permission information corresponding to the inactive user classification information. Application permission information refers to a user's visibility permissions for various applications in the application center. Furthermore, the cached data in the Redis cache is periodically cleaned up.
[0109] If the Redis cache stores second category information that matches the category information, then the application permission information corresponding to the second category information is retrieved from the Redis cache.
[0110] In this embodiment, the aforementioned application permission information refers to application permission information stored in the Redis cache that has a data correspondence with the second category information. Additionally, if the Redis cache does not store second category information matching the category information, a preset user application permission initialization interface is invoked to trigger personal permission initialization processing to obtain the user's application permission information. Upon completion, the obtained user application permission information is maintained in both the local memory cache and the Redis cache.
[0111] This application determines whether a first category information matching the classification information is stored in a preset local memory cache. If the local memory cache contains the first category information matching the classification information, the application permission information corresponding to the first category information is retrieved from the local memory cache. If the local memory cache does not contain the first category information matching the classification information, the application determines whether a second category information matching the classification information is stored in a preset Redis cache. If the Redis cache contains the second category information matching the classification information, the application permission information corresponding to the second category information is retrieved from the Redis cache. When this application determines that a user is an inactive user by using the target user type, it intelligently retrieves the classification information corresponding to the user information. Then, based on the use of the local memory cache and the Redis cache, it quickly retrieves the application permission information corresponding to the classification information and uses it as the target application permission information. This facilitates subsequent calls to the target interface corresponding to the target application permission based on the user's target application permission information quickly retrieved from the cache, thereby quickly executing the response processing corresponding to the query request. This effectively improves the efficiency of interface response and query request response, and ultimately enhances the user experience.
[0112] In some alternative implementations, before the step of retrieving the application permission information corresponding to the classification information from a preset cache, the electronic device may also perform the following steps:
[0113] Call the preset data retrieval interface.
[0114] In this embodiment, the aforementioned data acquisition interface is a pre-built user application permission initialization interface. This interface is used to initiate a task to generate interface data in batches. This task retrieves all visible application permission information of a user in the application center of the target product application from preset user permission data. The aforementioned application permission information is pre-collected information containing application permissions for active and inactive users. Furthermore, users are pre-classified into active and inactive users based on their user access data and log records.
[0115] The specified application permission information of inactive users can be obtained through the data acquisition interface.
[0116] In this embodiment, after obtaining all the application permission information visible to the user in the application center of the target product application through the data acquisition interface, the application permission information of inactive users can be further filtered out from the application permission information.
[0117] The specified application permission information is stored in the local memory cache.
[0118] In this embodiment, a first storage area for storing application permission information can be constructed in the local memory cache, and the specified application permission information can be stored in the first storage area in the local memory cache.
[0119] The specified application permission information is stored in the Redis cache.
[0120] In this embodiment, a second storage area for storing application permission information can be constructed in the Redis cache, and the specified application permission information is stored in the second storage area of the Redis cache. Furthermore, when an update to user application permission information is detected, the application permission information stored in both the local memory cache and the Redis cache is synchronously updated to ensure the accuracy of the application permission information stored in both caches.
[0121] This application obtains specified application permission information of inactive users by calling a preset data acquisition interface; then, it stores the specified application permission information in the local memory cache and the Redis cache. This intelligently pre-calls the preset data acquisition interface to obtain the specified application permission information of inactive users, and then stores the specified application permission information in the local memory cache and the Redis cache. This allows for rapid retrieval of the user's target application permission information from the local memory cache or the Redis cache, facilitating the subsequent quick execution of the response processing corresponding to the query request by calling the target interface corresponding to the target application permission. This effectively improves the efficiency of interface response and query request response, thus enhancing the user experience.
[0122] In some alternative implementations, step S203 includes the following steps:
[0123] Determine whether the user is an active user based on the target user type.
[0124] In this embodiment, the content of the target user type includes active users or inactive users. If the content of the target user type is active user, the user is determined to be an active user; if the content of the target user type is inactive user, the user is determined to be an inactive user.
[0125] If the user is an active user, then the preset active user data will be retrieved.
[0126] In this embodiment, the aforementioned active user data is generated in advance according to a pre-warming scheme set up for active users. Specifically, at a preset time each day, a task scheduler is started to analyze user access data and log records to identify the active user group and record it in the active user pool. The value of the preset time period is not specifically limited and can be set according to actual usage needs; for example, it can be set to 1:00 AM. Further, for this group of active users, a batch task for generating interface data is started. This task iterates through the visible application permissions and third-party dependencies of each active user, querying all visible application permissions (i.e., application permission information) for each active user in advance and storing the data to generate the corresponding active user data. The user information of the active users can be used as an identifier for the corresponding application permission information in the active user data for storage.
[0127] Obtain the target application permission information corresponding to the user information from the active user data.
[0128] In this embodiment, the user information can be used to query active user data, and specific user information matching the user information can be retrieved from the active user data. Then, the application permission information corresponding to the specific user information can be obtained from the active user data to obtain the target application permission information.
[0129] This application determines whether a user is an active user based on the target user type. If the user is an active user, it retrieves preset active user data. Subsequently, it obtains the target application permission information corresponding to the user information from the active user data. By using the target user type to determine if a user is an active user, this application intelligently retrieves active user data, and then quickly obtains the target application permission information corresponding to the user information based on the use of the active user data. This facilitates the subsequent call to the target interface corresponding to the target application permissions to quickly execute the response processing corresponding to the query request, effectively improving the efficiency of interface response and query request response, and ultimately enhancing the user experience.
[0130] In some optional implementations of this embodiment, step S202 includes the following steps:
[0131] Call the preset active user pool.
[0132] In this embodiment, a task schedule is initiated during a preset time period each day to analyze user access data and log records to obtain an active user group, and the user information corresponding to the active user group is recorded in a preset data pool to obtain the aforementioned active user pool.
[0133] Determine whether target user information matching the user information is stored in the active user pool.
[0134] In this embodiment, the user information can be matched with the information stored in the active user pool to determine whether there is target user information that matches the user information stored in the active user pool.
[0135] If the active user pool stores target user information that matches the user information, then the user is determined to be an active user, and the target user type of the active user is generated.
[0136] If the active user pool does not store target user information that matches the user information, then the user is determined to be an inactive user, and the target user type of the inactive user is generated.
[0137] This application calls a preset active user pool; then determines whether target user information matching the user information is stored in the active user pool; if target user information matching the user information is stored in the active user pool, the user is determined to be an active user, and a target user type with the content "active user" is generated; if target user information matching the user information is not stored in the active user pool, the user is determined to be an inactive user, and a target user type with the content "inactive user" is generated. This application uses an active user pool to match user information, thereby quickly and accurately identifying the target user type of a target user based on the generated matching results, improving the efficiency of target user type generation and ensuring the accuracy of the generated target user type.
[0138] In some optional implementations of this embodiment, before the step of invoking the preset active user pool, the electronic device may further perform the following steps:
[0139] Retrieve user access data and log records within a preset time period.
[0140] In this embodiment, the value of the preset time period is not specifically limited and can be set according to actual usage needs, for example, it can be set to 1 a.m.
[0141] The user access data and the log records are analyzed and processed to identify designated users who are active users from all the initial users.
[0142] In this embodiment, by analyzing the user access data and log records, users whose access frequency to the target product application exceeds a preset frequency threshold and whose total access duration to the target product application exceeds a preset duration threshold are selected as designated users belonging to the active user group. The values of the frequency threshold and duration threshold are not specifically limited and can be set according to actual usage needs.
[0143] Obtain the specified user information of the specified user.
[0144] In this embodiment, the specified user information may refer to the identity information of the specified user, such as name information.
[0145] The specified user information is stored in the active user pool.
[0146] In this embodiment, when it is found that some historically active users in the active user pool have become inactive users, the user information of these historically active users is removed from the active user pool to ensure the accuracy of the stored data in the active user pool.
[0147] This application acquires user access data and log records within a preset time period; then analyzes and processes the user access data and log records to determine designated users belonging to active users from all initial users; subsequently, it acquires designated user information for the designated users; and finally, it stores the designated user information in the active user pool. This application achieves rapid construction of the active user pool by analyzing and processing the user access data and log records to determine designated users belonging to active users from all initial users, and then storing the obtained designated user information in the active user pool. This facilitates the subsequent use of the active user pool to quickly and accurately identify the target user type of a user, thereby ensuring the accuracy of the generation of the user's target user type.
[0148] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0149] It should be emphasized that, to further ensure the privacy and security of the aforementioned user information, the user information can also be stored in a blockchain node.
[0150] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0151] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0152] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0153] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0154] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by 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 accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0155] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of a query processing apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0156] like Figure 3 As shown, the query processing device 300 described in this embodiment includes: a receiving module 301, a determining module 302, an acquiring module 303, a judging module 304, a calling module 305, and a processing module 306. Wherein:
[0157] The receiving module 301 is used to receive a query request for the application center of the target product application triggered by a user; wherein the query request carries the user's user information;
[0158] The determining module 302 is used to obtain the user information from the query request and determine the target user type of the user based on the user information;
[0159] The acquisition module 303 is used to acquire target application permission information corresponding to the user information based on the target processing rules corresponding to the target user type.
[0160] The judgment module 304 is used to determine whether the permissions of the target application meet the preset specified loading scenario;
[0161] Module 305 is invoked if, based on a preset asynchronous loading mechanism, to invoke the target interface corresponding to the target application permissions;
[0162] The processing module 306 is used to perform response processing corresponding to the query request based on the target interface.
[0163] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the query processing method in the aforementioned embodiments, and will not be repeated here.
[0164] In some optional implementations of this embodiment, the acquisition module 303 includes:
[0165] The first judgment submodule is used to determine whether the user is an active user based on the target user type;
[0166] The first acquisition submodule is used to acquire category information corresponding to the user information if the user is not an active user.
[0167] The second acquisition submodule retrieves application permission information corresponding to the classification information from a preset cache;
[0168] The submodule is determined to use the application permission information as the target application permission information.
[0169] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the query processing method in the aforementioned embodiments, and will not be repeated here.
[0170] In some optional implementations of this embodiment, the second acquisition submodule includes:
[0171] The first judgment unit is used to determine whether there is first classification information that matches the classification information stored in the preset local memory cache;
[0172] The first acquisition unit is configured to acquire application permission information corresponding to the first classification information from the local memory cache if the local memory cache stores first classification information that matches the classification information;
[0173] The second judgment unit is used to determine whether the preset Redis cache contains second classification information that matches the classification information if the local memory cache does not store first classification information that matches the classification information.
[0174] The second acquisition unit is used to acquire application permission information corresponding to the second category information from the Redis cache if the Redis cache stores second category information that matches the category information.
[0175] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the query processing method in the aforementioned implementation method, and will not be repeated here.
[0176] In some optional implementations of this embodiment, the acquisition module 303 further includes:
[0177] The first calling submodule is used to call the preset data acquisition interface;
[0178] The third acquisition submodule is used to acquire specified application permission information of inactive users through the data acquisition interface;
[0179] The first storage submodule is used to store the specified application permission information into the local memory cache; and
[0180] The second storage submodule is used to store the specified application permission information into the Redis cache.
[0181] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the query processing method in the aforementioned embodiments, and will not be repeated here.
[0182] In some optional implementations of this embodiment, the acquisition module 303 includes:
[0183] The second judgment submodule is used to determine whether the user is an active user based on the target user type;
[0184] The second calling submodule is used to call preset active user data if the user is an active user;
[0185] The fourth acquisition submodule is used to obtain target application permission information corresponding to the user information from the active user data.
[0186] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the query processing method in the aforementioned embodiments, and will not be repeated here.
[0187] In some optional implementations of this embodiment, the determining module 302 includes:
[0188] The third submodule is used to invoke the preset active user pool;
[0189] The third judgment submodule is used to determine whether target user information matching the user information is stored in the active user pool;
[0190] The first generation submodule is used to determine that the user is an active user if the active user pool stores target user information that matches the user information, and generate content as the target user type of the active user.
[0191] The second generation submodule is used to determine that the user is an inactive user if the active user pool does not store target user information that matches the user information, and to generate content that is the target user type of inactive user.
[0192] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the query processing method in the aforementioned embodiments, and will not be repeated here.
[0193] In some optional implementations of this embodiment, the determining module 302 further includes:
[0194] The fifth acquisition submodule is used to acquire user access data and log records within a preset time period;
[0195] The analysis submodule is used to analyze and process the user access data and the log records to determine the specified users who belong to the active users from all the initial users;
[0196] The sixth acquisition submodule is used to acquire the specified user information of the specified user;
[0197] The third storage submodule is used to store the specified user information into the active user pool.
[0198] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the query processing method in the aforementioned embodiments, and will not be repeated here.
[0199] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0200] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0201] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0202] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for query processing methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.
[0203] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions of the query processing method.
[0204] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.
[0205] Compared with the prior art, the embodiments of this application have the following main advantages:
[0206] In this embodiment, upon receiving a query request from a user for the application center of a target product application, the system first obtains the user information from the query request and determines the target user type based on the user information. Then, based on the target processing rules corresponding to the target user type, it obtains the target application permission information corresponding to the user information. Subsequently, it determines whether the target application permissions conform to a preset specified loading scenario. If so, based on a preset asynchronous loading mechanism, it calls the target interface corresponding to the target application permissions. Finally, it executes the response processing corresponding to the query request based on the target interface. In this embodiment, after receiving a query request from a user for the application center of a target product application, the system first determines the user's target user type based on the user information carried in the query request. Then, it intelligently uses the target user type to identify the user's target user type and intelligently obtains the target application permission information corresponding to the user information based on the target processing rules corresponding to the target user type. This facilitates subsequent calls to the target interface corresponding to the target application permissions based on a preset asynchronous loading mechanism, enabling quick execution of the response processing corresponding to the query request. This effectively improves the efficiency of interface response and query request response, reduces the server pressure on the target product application, and enhances the user experience.
[0207] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the query processing method described above.
[0208] Compared with the prior art, the embodiments of this application have the following main advantages:
[0209] In this embodiment, upon receiving a query request from a user for the application center of a target product application, the system first obtains the user information from the query request and determines the target user type based on the user information. Then, based on the target processing rules corresponding to the target user type, it obtains the target application permission information corresponding to the user information. Subsequently, it determines whether the target application permissions conform to a preset specified loading scenario. If so, based on a preset asynchronous loading mechanism, it calls the target interface corresponding to the target application permissions. Finally, it executes the response processing corresponding to the query request based on the target interface. In this embodiment, after receiving a query request from a user for the application center of a target product application, the system first determines the user's target user type based on the user information carried in the query request. Then, it intelligently uses the target user type to identify the user's target user type and intelligently obtains the target application permission information corresponding to the user information based on the target processing rules corresponding to the target user type. This facilitates subsequent calls to the target interface corresponding to the target application permissions based on a preset asynchronous loading mechanism, enabling quick execution of the response processing corresponding to the query request. This effectively improves the efficiency of interface response and query request response, reduces the server pressure on the target product application, and enhances the user experience.
[0210] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0211] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A query processing method, characterized in that, Includes the following steps: Receive a query request from a user for the application center of a target product application; wherein the query request carries the user's user information; Obtain the user information from the query request, and determine the target user type of the user based on the user information; Based on the target processing rules corresponding to the target user type, obtain the target application permission information corresponding to the user information; Determine whether the target application's permissions match the preset specified loading scenario; If so, based on the preset asynchronous loading mechanism, the target interface corresponding to the target application's permissions is called; Execute the response processing corresponding to the query request based on the target interface; The step of determining the target user type of the user based on the user information specifically includes: Call the preset active user pool; Determine whether target user information matching the user information is stored in the active user pool; If the active user pool stores target user information that matches the user information, then the user is determined to be an active user, and the target user type of the active user is generated. If the active user pool does not store target user information that matches the user information, then the user is determined to be an inactive user, and the target user type of the inactive user is generated. Specifically, a task scheduler is initiated during a preset time period each day to analyze user access data and log records to obtain an active user group, and the user information corresponding to the active user group is recorded in a preset data pool to obtain the aforementioned active user pool.
2. The query processing method according to claim 1, characterized in that, The step of obtaining target application permission information corresponding to the user information based on the target processing rule corresponding to the target user type specifically includes: Determine whether the user is an active user based on the target user type; If the user is not an active user, then obtain the category information corresponding to the user information; Retrieve application permission information corresponding to the classification information from the preset cache; The application permission information is used as the target application permission information.
3. The query processing method according to claim 2, characterized in that, The step of retrieving application permission information corresponding to the classification information from a preset cache specifically includes: Determine whether a first category information matching the category information is stored in a preset local memory cache; If the local memory cache stores first category information that matches the category information, then the application permission information corresponding to the first category information is obtained from the local memory cache. If the local memory cache does not store first category information that matches the category information, then determine whether the preset Redis cache stores second category information that matches the category information. If the Redis cache stores second category information that matches the category information, then the application permission information corresponding to the second category information is retrieved from the Redis cache.
4. The query processing method according to claim 3, characterized in that, Before the step of retrieving application permission information corresponding to the classification information from a preset cache, the method further includes: Call the preset data retrieval interface; The specified application permission information of inactive users can be obtained through the data acquisition interface. Store the specified application permission information in the local memory cache; and The specified application permission information is stored in the Redis cache.
5. The query processing method according to claim 1, characterized in that, The step of obtaining target application permission information corresponding to the user information based on the target processing rule corresponding to the target user type specifically includes: Determine whether the user is an active user based on the target user type; If the user is an active user, then the preset active user data is retrieved; Obtain the target application permission information corresponding to the user information from the active user data.
6. The query processing method according to claim 1, characterized in that, Before the step of invoking the preset active user pool, the following is also included: Retrieve user access data and log records within a preset time period; The user access data and the log records are analyzed and processed to identify specific users who are active users from all initial users. Obtain the specified user information of the specified user; The specified user information is stored in the active user pool.
7. A query processing device, characterized in that, include: The receiving module is used to receive a query request from a user for the application center of the target product application; wherein the query request carries the user's user information; The determination module is used to obtain the user information from the query request and determine the target user type of the user based on the user information; The acquisition module is used to acquire target application permission information corresponding to the user information based on the target processing rules corresponding to the target user type. The judgment module is used to determine whether the permissions of the target application meet the preset specified loading scenario; The calling module is used to, if so, call the target interface corresponding to the target application permissions based on a preset asynchronous loading mechanism; The processing module is used to perform response processing corresponding to the query request based on the target interface; The determining module includes: The third submodule is used to invoke the preset active user pool; The third judgment submodule is used to determine whether target user information matching the user information is stored in the active user pool; The first generation submodule is used to determine that the user is an active user if the active user pool stores target user information that matches the user information, and generate content as the target user type of the active user. The second generation submodule is used to determine that the user is an inactive user if the active user pool does not store target user information that matches the user information, and to generate content that is the target user type of inactive user. Specifically, a task scheduler is initiated during a preset time period each day to analyze user access data and log records to obtain an active user group, and the user information corresponding to the active user group is recorded in a preset data pool to obtain the aforementioned active user pool.
8. A computer device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the query processing method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the query processing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Navigation service system and method
CN108259524A
Interface unified management system and platform interface management system
CN114417278A