A server-side paging processing method, device, computer equipment and storage medium

By using feature platforms for data screening and caching technology in server-side paging processing, the existing server-side paging functions have solved the problem of low efficiency and accuracy when processing large amounts of data, achieving more efficient and accurate paging processing, improving system performance and user experience.

CN118606580BActive Publication Date: 2025-03-04SHANGHAI SHUHE INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410800467.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2025-03-04
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

When the existing server-side paging function processes a large amount of data, the paging results are not accurate and efficient enough, resulting in inefficient system operation and unable to meet the requirements of financial institutions for data processing service quality.

Method used

By receiving the client's paging query request, the query conditions, paging parameters and feature information are parsed, the data set that meets the conditions are obtained from the database, the feature information and data sets are sent to the feature platform for filtering, the paging data is constructed and returned, and the target data is cached for later use.

Benefits of technology

It improves the data processing efficiency of server-side paging processing and the accuracy of paging results, optimizes system performance, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118606580B_ABST
    Figure CN118606580B_ABST
Patent Text Reader

Abstract

The present application relates to a server-side paging processing method, device, computer equipment and storage medium, including: parsing query conditions, first paging parameters and feature information from a first query request sent by a client; obtaining a first number of data sets that meet the query conditions and the first paging parameters from a database; sending the feature information and the first number of data sets to a feature platform, and the feature platform filters out multiple first target data that match the feature information from the first number of data sets; receiving multiple first target data fed back by the feature platform and constructing a first paging number of data based on the multiple first target data, and sending the first paging number of data to the client; caching the multiple first target data so that the multiple first target data can be read from the cache next time to reconstruct the first paging number of data. The above can improve the data processing efficiency of server-side paging processing and improve the accuracy of paging results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a server-side paging processing method, device, computer equipment and storage medium. Background Art

[0002] With the continuous development of Internet technology, all walks of life are rapidly transforming, and the financial services sector is no exception. Especially in the context of the rapid development of Internet finance, financial institutions have begun to widely adopt automated systems to handle various businesses in order to improve work efficiency and customer satisfaction. Among them, the server-side paging function is one of the key functions in the automation system and is of great significance.

[0003] However, the existing server-side paging function has some limitations. When processing large amounts of data, the existing server-side paging function can usually only paging data according to simple pre-set rules, resulting in inaccurate and inefficient paging results, which cannot meet the requirements of financial institutions for data processing service quality. In addition, the server-side paging function needs to process too much data, which is prone to jamming and delays, affecting the overall operating efficiency of the system.

[0004] Therefore, in order to solve the problems existing in the existing server-side paging function and improve the data processing efficiency and service quality of financial institutions, it is necessary to propose an innovative server-side paging technology that can more intelligently perform paging according to specific data characteristics and business scenarios, improve the accuracy and efficiency of paging results, optimize system performance, and enhance user experience. Summary of the invention

[0005] Based on this, it is necessary to provide a server-side paging processing method, device, computer equipment and storage medium to address the above technical problems, which can improve the data processing efficiency of server-side paging processing and improve the accuracy of paging results.

[0006] A server-side paging processing method includes: receiving a first query request for a paging query sent by a client, parsing the query condition, a first paging parameter and feature information from the first query request; acquiring a first number of data sets that meet the query condition and the first paging parameter from a database; sending the feature information and the first number of data sets to a feature platform, the feature platform screening out a plurality of first target data that match the feature information from the first number of data sets; receiving a plurality of first target data fed back by the feature platform and constructing a first paging number of data based on the plurality of first target data, and sending the first paging number of data to the client; caching the plurality of first target data so that when the query condition and feature information of the client are received again, the plurality of first target data are read from the cache to reconstruct the first paging number of data.

[0007] In one of the embodiments, a server-side paging processing method also includes: receiving a paging query request from a client, parsing a second paging parameter, query conditions, and feature information from the paging query request; acquiring a second number of data sets that satisfy the query conditions and the second paging parameter from a database; sending the feature information and the second number of data sets to a feature platform, the feature platform filtering out a plurality of second target data that match the feature information from the second number of data sets; receiving a plurality of second target data fed back by the feature platform, constructing a second paging quantity of data for the client's paging with the plurality of second target data, and returning the second paging quantity of data to the client.

[0008] In one of the embodiments, after receiving a page turning query request from a client, the method further includes: if a second query request for returning to the previous page is received, and the second query request encapsulates a query condition, a first paging parameter, and characteristic information, then when it is determined that multiple first target data in the cache are valid, the multiple first target data are read from the cache and the first paging quantity of data is reconstructed, and the first paging quantity of data is sent to the client.

[0009] In one of the embodiments, after receiving a page turning query request from a client, it also includes: reading multiple first target data from a cache based on the query conditions in the page turning query request; sending the multiple first target data to a database so that the database marks the validity of each first target data based on a first set condition; sending the multiple first target data to a feature platform so that the feature platform marks the validity of each first target data based on a second set condition.

[0010] In one embodiment, after the step of receiving the paging query request from the client, it also includes: receiving a second query request for the paging query sent by the client, parsing the query condition, the first paging parameter and the characteristic information from the second query request; obtaining a third number of data sets that meet the query condition and the first paging parameter from the database, wherein the data sets include multiple third target data and fourth target data, and the third target data is the first target data marked as valid based on the first set condition; sending the characteristic information and the third number of data sets to the characteristic platform, the characteristic platform filters out multiple fifth target data from the multiple third target data, the fifth target data is the first target data marked as valid based on the second set condition, and filters out multiple sixth target data that match the characteristic information from the multiple fifth target data and the fourth target data; receiving multiple sixth target data fed back by the characteristic platform and constructing the first number of paging data based on the multiple sixth target data, and sending the first number of paging data to the client.

[0011] In one of the embodiments, after the step of obtaining a second number of data sets that meet the query conditions and the second paging parameter from the database, it also includes: calculating the difference between the second number and the first number; if the difference is greater than a set threshold, sending the difference to the client, or sending a prompt message to the client indicating that the previous page should be re-queried.

[0012] In one of the embodiments, a server-side paging processing method also includes: parsing a first query time from a first query request; parsing a second query time from a page-turning query request; calculating the time difference between a current time and the first query time, and / or calculating the time difference between the current time and the second query time; when the time difference between the current time and the first query time is greater than a first time threshold, sending a prompt message to the client indicating that the time interval is too long and re-querying; when the time difference between the current time and the second query time is greater than a second time threshold, sending a prompt message to the client indicating that the time interval is too long and re-querying.

[0013] A server-side paging processing device includes: a receiving module, which is used to receive a first query request for a paging query sent by a client, and parse the query condition, the first paging parameter and feature information from the first query request; an acquisition module, which is used to acquire a first number of data sets that meet the query condition and the first paging parameter from a database; a sending module, which is used to send the feature information and the first number of data sets to a feature platform, and the feature platform screens out a plurality of first target data that match the feature information from the first number of data sets; a construction module, which is used to receive a plurality of first target data fed back by the feature platform and construct a first paging number of data based on the plurality of first target data, and send the first paging number of data to the client; and a cache module, which is used to cache the plurality of first target data, so that when the query condition and feature information of the client are received again, the plurality of first target data are read from the cache to reconstruct the first paging number of data.

[0014] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of any of the above-mentioned embodiments are implemented.

[0015] A computer-readable storage medium stores a computer program, which implements the steps of any of the above-mentioned method embodiments when the computer program is executed by a processor.

[0016] The above-mentioned server-side paging processing method, device, computer equipment and storage medium receive a first query request for a paging query sent by a client, parse the query condition, the first paging parameter and feature information from the first query request; obtain a first number of data sets that meet the query condition and the first paging parameter from a database; send the feature information and the first number of data sets to a feature platform, and the feature platform screens out multiple first target data that match the feature information from the first number of data sets; receive multiple first target data fed back by the feature platform and construct a first paging number of data based on the multiple first target data, and send the first paging number of data to the client; cache the multiple first target data so that when the query condition and feature information of the client are received again, read the multiple first target data from the cache to reconstruct the first paging number of data.

[0017] Therefore, a feature platform is set up, and the first number of data sets that meet the query conditions are sent to the feature platform for re-matching and screening, so that the multiple first target data obtained are more matched with the client's query requirements, providing the accuracy of the paging results. In addition, the multiple first target data are cached, and when the same query request from the client is received again, the multiple first target data are directly read from the cache to construct the data of the paging query page, without obtaining matching data from the database and without sending it to the feature platform for feature matching and screening, thereby improving the data processing efficiency of the server-side paging processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 An application environment diagram of a server-side paging processing method in an embodiment;

[0019] Figure 2 A schematic diagram of a flow chart of a server-side paging processing method in one embodiment;

[0020] Figure 3 A data interaction diagram between various nodes in a system for implementing a server-side paging processing method in an embodiment;

[0021] Figure 4 It is a structural block diagram of a server-side paging processing device in one embodiment;

[0022] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0024] The present application provides a server-side paging processing method, which is applied to Figure 1 In the application environment shown. Figure 1 As shown, a client is installed in the terminal device 200, and the user sends a paging query request to the server 100 through the client. The server 100 includes a network server 102, a database 104 and a feature platform 106. The network server 102 is used to implement a server-side paging processing method of the present application. Specifically, the network server 102 receives a first query request for a paging query sent by the client, parses the query condition, the first paging parameter and the feature information from the first query request, obtains a first number of data sets that meet the query condition and the first paging parameter from the database 104, and sends the feature information and the first number of data sets to the feature platform 106. The feature platform 106 filters out a plurality of first target data that matches the feature information from the first number of data sets. The network server 102 receives a plurality of first target data fed back by the feature platform 106 and constructs a first number of paging data based on the plurality of first target data, sends the first number of paging data to the client, and caches the plurality of first target data so that when the query condition and feature information of the client are received again, the plurality of first target data are read from the cache to reconstruct the first number of paging data.

[0025] In one embodiment, Figure 2 As shown, a server-side paging processing method is provided, which is applied to Figure 1 Taking the network server 102 of the server 100 as an example, the following steps are included:

[0026] S202, receiving a first query request for paging query sent by a client, and parsing the first query request to obtain a query condition, a first paging parameter, and feature information.

[0027] In this embodiment, when the user initiates a paging query request on the client, the client encapsulates the query condition, the first paging parameter and the feature information into the first query request, and sends the first query request to the server. Among them, the first paging parameter includes the page number of the current query page, the size of the current query page, the first query time, etc. The feature information is used to characterize the features of the data that meets the query condition.

[0028] In one example, a paginated query is used to query the case list of the server, and the first query request is used to request the server to return the related cases of the current query page. When querying the case list, the server needs to ensure that it can obtain the latest feature value corresponding to each case and accurately display it on the client interface.

[0029] Specifically, Figure 3As shown, the first query request may be a default request for querying the first page. The first query request encapsulates a query condition query_condition, a page number page_number of the current query page in the first paging parameter, a size page size of the current query page, and a first query time query_timestamp.

[0030] S204: Acquire a first number of data sets satisfying the query condition and the first paging parameter from the database.

[0031] In this embodiment, a plurality of data are stored in the database, and each data corresponds to a query condition. A plurality of data satisfying the query condition can be obtained from the database, and then a plurality of data satisfying the first paging parameter can be screened out from the plurality of data satisfying the query condition, that is, a plurality of data satisfying the first paging parameter is included in the first number of data sets. For example, the first paging parameter includes the page number of the current query page and the size of the current query page, then the first number of data sets includes a plurality of data corresponding to the page number of the current query page. The amount of the plurality of data corresponds to the size of the current query page. Among them, when the paging query is used to query the case list of the server, each data in the data set is a case.

[0032] Specifically, Figure 3 As shown, the proxy server transmits the query parameters in the first query request, such as query_condition, page_number, page size, and query_timestamp, to the network server. The network server executes Figure 3 Steps 3 and 4 shown above obtain a query result query_result, which includes the first number of data sets.

[0033] S206: Send the feature information and the first number of data sets to the feature platform, and the feature platform selects a plurality of first target data matching the feature information from the first number of data sets.

[0034] In this embodiment, each piece of data in the first number of data sets has its corresponding features, and the feature information and the first number of data sets are sent to the feature platform. The feature platform identifies the features of each piece of data in the first number of data sets and matches them with the feature information respectively, and determines a plurality of matching first target data. Among them, the feature platform can perform feature information matching operations in a multi-threaded concurrent manner to query for a plurality of first target data that matches the feature information. In one example, when the feature platform performs feature information matching operations to query for a plurality of first target data that matches the feature information, the plurality of first target data are filtered out from high to low according to the priority of the features. That is, when the specific feature information is matched, each piece of data is obtained from high to low according to the priority to match the feature information.

[0035] Specifically, Figure 3 As shown, the network server executes step 5 and step 6 to obtain a query result query_result by_feature, where query_result by_feature includes multiple first target data.

[0036] S208, receiving multiple pieces of first target data fed back by the feature platform, constructing a first page number of data based on the multiple pieces of first target data, and sending the first page number of data to the client.

[0037] In this embodiment, the first page number is the number of data displayed in the current query page. The network server constructs the data of the current query page based on the multiple first target data and sends it to the client for page rendering and display.

[0038] In one example, when the first paging parameter includes the amount of data that needs to be displayed on the current query page, the first number of data sets obtained from the database is the amount of data that needs to be displayed on the current query page. At this time, the amount of data of the multiple first target data obtained after feature matching through the feature platform cannot meet the needs of the current query page. Therefore, after receiving the multiple first target data fed back by the feature platform, the difference between the number of the multiple first target data fed back and the amount of data that needs to be displayed on the current query page is calculated, and based on the difference, multiple data that meet the query conditions are obtained from the database, and then the multiple data obtained from the database and the feature information are sent to the feature platform, and the feature platform performs feature matching again and feeds back the matched first target data to the network server. This is repeated until the number of first target data fed back by the feature platform is greater than or equal to the amount of data that needs to be displayed on the current query page. That is, it is greater than or equal to the first paging number.

[0039] Specifically, Figure 3As shown, the first query request is used to request to query related cases, the data set refers to the case set, and the first target data is the target case. query_result_by_feature is the case set that meets the feature. Since the number of cases in the case set no longer meets page_number after feature filtering, it is necessary to query again based on the maximum number queried in the above positive order as the minimum number for the next query, and then poll for feature query until the target cases equal to page_number are queried.

[0040] When enough target cases are found, the network server executes steps 8, 9 and 10, thereby feeding back the cases of the current query page to the client.

[0041] S210, caching the plurality of first target data, so that when receiving the query condition and characteristic information from the client again, the plurality of first target data are read from the cache to reconstruct the first page quantity of data.

[0042] In this embodiment, multiple first target data are cached, so that when the client's query conditions and feature information are received again, the first paged quantity of data is directly read from the cache and constructed. There is no need to obtain data from the database again or send data to the feature platform for feature matching. Therefore, it is possible to quickly respond to the client's paging query request and improve the data processing efficiency of the server-side paging processing.

[0043] Specifically, multiple pieces of first target data are associated with the query condition, the first paging parameter and the characteristic information and then cached. Therefore, when a paging query is performed again using the same query parameter, multiple pieces of first target data can be directly obtained from the cache, thereby improving the efficiency of the paging query. In addition, the cache time can also be set. For example, the cache time can be set to 5 minutes. The statistical time is calculated from the execution of the cache operation. If the statistical time exceeds the cache time, the multiple pieces of first target data in the cache are cleared, thereby avoiding data query errors caused by the first target data being displayed to the client after being invalid for too long.

[0044] Specifically, Figure 3 As shown, the network server executes step 7 and caches query_result by feature. Among them, cache query result query_result: after caching the query result, when the same query parameters are queried, the data is obtained from the cache. The cache time can be delayed by 5 minutes, which is determined by the actual query performance. redis_condition caches necessary parameters: including query_timestamp, page_number, page_size, query_condition. After recording the paging data, different query operations are performed according to different scenarios.

[0045] The above-mentioned server-side paging processing method receives a first query request for a paging query sent by a client, parses the query condition, the first paging parameter and feature information from the first query request; obtains a first number of data sets that meet the query condition and the first paging parameter from a database; sends the feature information and the first number of data sets to a feature platform, and the feature platform screens out multiple first target data that match the feature information from the first number of data sets; receives multiple first target data fed back by the feature platform and constructs a first paging number of data based on the multiple first target data, and sends the first paging number of data to the client; caches the multiple first target data so that when the query condition and feature information of the client are received again, the multiple first target data are read from the cache to reconstruct the first paging number of data.

[0046] Therefore, a feature platform is set up, and the first number of data sets that meet the query conditions are sent to the feature platform for re-matching and screening, so that the multiple first target data obtained are more matched with the client's query requirements, providing the accuracy of the paging results. In addition, the multiple first target data are cached, and when the same query request from the client is received again, the multiple first target data are directly read from the cache to construct the data of the paging query page, without obtaining matching data from the database and without sending it to the feature platform for feature matching and screening, thereby improving the data processing efficiency of the server-side paging processing.

[0047] In one embodiment, after the above S210, it also includes: receiving a paging query request from the client, parsing the second paging parameter, query conditions and feature information from the paging query request; acquiring a second number of data sets that meet the query conditions and the second paging parameter from the database; sending the feature information and the second number of data sets to the feature platform, and the feature platform filters out multiple second target data that match the feature information from the second number of data sets; receiving multiple second target data fed back by the feature platform, constructing the second paging quantity data of the client from the multiple second target data, and returning the second paging quantity data to the client.

[0048] In this embodiment, when the client initiates a page-turning query request, the query conditions and feature information encapsulated in the page-turning query request are the same as those in the first query request initiated last time, but the paging parameters are different. After querying the second number of data sets that meet the second paging parameters from the database, the second number of data sets are sent to the feature platform for feature matching screening, and multiple second target data construct the second page number of data for the client's page turning. The specific method of obtaining data from the database and using the feature platform for feature matching is the same as the operation described in the first query request processed in the above embodiment.

[0049] Specifically, Figure 3 As shown, the client executes step 11. That is, the page turning query request carries the same query conditions query_condition and query_timestamp as the last first query request and feature information (not shown). Since the client needs to turn pages, the second paging parameter is different from the last first paging parameter, that is, the specific values ​​of page_number and / or page_size are different from the last time. The proxy server transparently transmits each query parameter in the page turning query request to the network server. Based on this, the network server executes steps 17, 18, 21 and 22, and then implements steps 23 and 24.

[0050] In one embodiment, after the above-mentioned step of receiving the paging query request from the client, it also includes: if a second query request for returning to the previous page is received, the second query request encapsulates the query condition, the first paging parameter and the characteristic information, then when it is determined that multiple first target data in the cache are valid, the multiple first target data are read from the cache and the first paging quantity of data is reconstructed, and the first paging quantity of data is sent to the client.

[0051] Specifically, when the client enters the page query and then requests to return to the previous page, the second query request encapsulates the same request parameters as those in the first query request, namely, the query condition, the first paging parameter and the feature information. At this time, there is no need to obtain data from the database, and multiple first target data can be directly obtained from the cache for paging query data construction. Therefore, the data for the client's paging query can be quickly constructed, which improves the paging processing efficiency of the server.

[0052] In one embodiment, after the above-mentioned step of receiving the paging query request from the client, it also includes: reading multiple first target data from the cache based on the query conditions in the paging query request; sending the multiple first target data to the database, so that the database marks the validity of each first target data based on the first set condition; sending the multiple first target data to the feature platform, so that the feature platform marks the validity of each first target data based on the second set condition.

[0053] In this embodiment, when a page turning query request sent by a client is received, a query condition is parsed from the page turning query request, and a plurality of first target data are obtained from the cache based on the query condition. Since the cache time is too long, some first target data no longer meet the first set condition of conventional screening, so the plurality of first target data are sent to the database, so that the database marks the validity of each first target data based on the first set condition, and the attribute of the valid first target data is marked as valid, and the attribute of the invalid first target data is marked as invalid, so that invalid first target data can be avoided when obtaining data from the database based on the query condition in the subsequent process. In one case, the first set condition is a query condition. Therefore, a plurality of first target data can be extracted from the cache to correct the conventional conditions to correct the inaccurate parts of the data used for paging query caused by invalid attributes.

[0054] In addition, due to the long cache time, some first target data no longer meet the second set condition for feature screening, so multiple first target data are sent to the feature platform so that the feature platform marks the validity of each first target data based on the second set condition, and the valid first target data is marked as feature valid, and the invalid first target data is marked as feature invalid, so that the first target data with invalid features can be excluded when the feature platform is used for feature matching processing, thereby improving the accuracy of data screening. In one case, the second set condition is a feature matching condition. Therefore, when multiple first target data are extracted from the cache, the feature conditions can be corrected to update the inaccurate parts of the data used for paging query caused by feature updates.

[0055] Specifically, Figure 3 As shown, when the network server confirms that it has received the page query request sent by the client, it executes steps 13, 14, 15 and 16. The purpose of executing steps 13 and 14 is: first query redis_condition to determine whether the new query has been made. If so, directly obtain redis_result. When adjusting page_number, get the largest ID according to redis_result, and then fill in the new data until the page_number is reached and return together. When adjusting page_size, get the largest ID according to redis_result, and then query the new data until the page_number is reached and return separately.

[0056] The purpose of executing steps 15 and 16 is: when getting results from the cache, some cases may no longer meet the conventional screening conditions, so the data in the cache is queried again in the database, and the invalid data is marked as invalid: attribute invalid. When getting results from the cache, some cases may no longer meet the feature selection conditions, so the data in the cache is queried again in the feature platform, and the invalid data is marked as invalid: feature invalid.

[0057] In one embodiment, after the above-mentioned step of receiving the paging query request from the client, it also includes: receiving a second query request for paging query sent by the client, parsing the query condition, the first paging parameter and the characteristic information from the second query request; obtaining a third number of data sets that meet the query condition and the first paging parameter from the database, wherein the data sets include multiple third target data and fourth target data, and the third target data are the first target data marked as valid based on the first set condition; sending the characteristic information and the third number of data sets to the characteristic platform, the characteristic platform filters out multiple fifth target data from the multiple third target data, the fifth target data are the first target data marked as valid based on the second set condition, and filters out multiple sixth target data that match the characteristic information from the multiple fifth target data and the fourth target data; receiving multiple sixth target data fed back by the characteristic platform and constructing the first number of paging data based on the multiple sixth target data, and sending the first number of paging data to the client.

[0058] In this embodiment, after the page turning process, when the second query request encapsulating the query condition, the first paging parameter and the feature information is received again, and when the plurality of first target data are invalid in the cache, the third number of data sets satisfying the query condition and the first paging parameter are obtained from the database. At this time, the third target data is the first target data with a valid mark, and the fourth target data is other data that the database satisfies the query condition without a mark. Specifically, due to the existence of the first target data with an invalid mark, the database needs to exclude this part of the first target data when matching the data of the query condition. Therefore, compared with the previous processing of the same query condition, the fourth target data satisfying the condition is added here. Furthermore, when the feature information and the third number of data sets are sent to the feature platform for feature matching, the feature platform also excludes the first target data with an invalid mark feature. That is, the fifth target data is the first target data with a valid mark feature. The sixth target data is the target data that matches the feature information selected by the feature platform from the fifth target data and the fourth target data. Therefore, when constructing the data of the client paging query page based on the plurality of sixth target data, the invalid data can be excluded, thereby improving the accuracy of the data of the paging query.

[0059] Specifically, see Figure 3Steps 15 and 16 are shown. The purpose is that when a query request with the same query parameters is received from the client after a period of time, the database and feature platform will no longer return invalid target data. During the query process, if the number of data obtained by the query does not meet the conditions due to the invalidation of some first target data, the database will complete the data through other target data. As mentioned above, the fourth target data is used to complete the data.

[0060] In one embodiment, after the above step of obtaining a second number of data sets that meet the query conditions and the second paging parameter from the database, it also includes: calculating the difference between the second number and the first number; if the difference is greater than a set threshold, sending the difference to the client, or sending a prompt message to the client indicating that the previous page should be re-queried.

[0061] In this embodiment, the first quantity is the amount of data that meets the query conditions queried from the database when the first query request is received. The second quantity is the amount of data that meets the query conditions queried from the database when the page turning query request is received. The difference between the two can represent the newly added data that meets the query conditions in the database within the time difference between the two queries. If the difference is greater than the set threshold, it means that there is too much newly added data, and the user of the client needs to be reminded to query again. The prompt method can be to send the difference directly to the client. The user of the client can manually judge that there is too much newly added data that meets the query conditions through the difference, thereby actively triggering another query. Or, a prompt message representing the re-query of the previous page is sent to the client, without the client user knowing the amount of newly added data, and reminding the user to trigger another query.

[0062] Specifically, Figure 3 As shown, the network server executes step 20. The purpose is: the front end of the client reminds the agent of the difference, indicating that the difference of the newly added data in the time interval is too large, and reminds the agent to re-query. For example, when the amount of newly added data is large, the system will return a corresponding prompt message to prompt the user that more data has been generated and ask whether it is necessary to re-query to obtain the latest data.

[0063] In one embodiment, after the above step of receiving the first query request for a paging query sent by the client, it also includes: parsing the first query time from the first query request; after the above step of receiving the page turning query request from the client, it also includes: parsing the second query time from the page turning query request; calculating the time difference between the current time and the first query time, and / or calculating the time difference between the current time and the second query time; when the time difference between the current time and the first query time is greater than the first time threshold, sending a prompt message to the client indicating that the time interval is too long and re-querying; when the time difference between the current time and the second query time is greater than the second time threshold, sending a prompt message to the client indicating that the time interval is too long and re-querying.

[0064] In this embodiment, the time difference between the current time and the first query time can indicate the time interval between the first query and the current time. If the time interval is too large, it means that more data that meets the query conditions may have been added to the database, and the client user needs to be reminded to re-query. The time difference between the current time and the second query time can indicate the time interval between the current query and the current time. If the time interval is too large, it means that more data that meets the query conditions may have been added to the database, and the client user needs to be reminded to re-query. The difference between the two is that using the time difference between the current time and the second query time as a basis for judgment can reduce the frequency of client user queries. Using the time difference between the current time and the first query time as a basis for judgment can improve the accuracy of client paging queries. In specific usage scenarios, one or both methods can be selected based on specific business needs to prompt client users.

[0065] Specifically, Figure 3 As shown, the network server executes step 19. The purpose is: the purpose of calculating the time interval is to inform the agent how long it has been since the last query. If the interval is too long, remind the agent to query again. For example, setting the observation window, that is, setting the time difference, when the observation window times out, the system will return corresponding prompt information in addition to basic information such as page numbers, notifying the user that the data is outdated and suggesting to query again to obtain updated data.

[0066] The above-mentioned server-side paging processing method has the following technical effects:

[0067] 1. The query request initiated by the client, including the first query request, the translation query request and the second query request, can encapsulate one or more feature information to achieve a dynamic screening function of different conditions.

[0068] 2. Real-time feature value acquisition: Combined with multi-threading, redis cache and other mechanisms, the data corresponding to the latest feature value is obtained from the database and stored in the system cache for use in the next query, which improves the efficiency of data query.

[0069] 3. Efficient paging algorithm: Use offset-based paging, that is, the execution operation of repeatedly querying the database and feature platform mentioned above, and combine database index optimization, caching mechanism and other technologies to improve the efficiency and performance of paging query.

[0070] Through the implementation of the above technical solutions, the problems of un-paginated case lists and unavailable activity filter conditions in the CRM system can be effectively solved, while ensuring that the system has good performance and user experience.

[0071] It should be understood that, although the steps in the flowchart are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, 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 portion of the steps in the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0072] The present application also provides a server-side paging processing device. Figure 4 As shown, a server-side paging processing device is applied to the server, including a receiving module 402, an acquisition module 404, a sending module 406, a construction module 408 and a cache module 410. The receiving module 402 is used to receive a first query request for paging query sent by a client, and parse the query condition, the first paging parameter and feature information from the first query request; the acquisition module 404 is used to obtain a first number of data sets that meet the query condition and the first paging parameter from a database; the sending module 406 is used to send the feature information and the first number of data sets to a feature platform, and the feature platform selects a plurality of first target data matching the feature information from the first number of data sets; the construction module 408 is used to receive a plurality of first target data fed back by the feature platform and construct a first number of paging data based on the plurality of first target data, and send the first number of paging data to the client; the cache module 410 is used to cache the plurality of first target data, so that when the query condition and feature information of the client are received again, the plurality of first target data are read from the cache to reconstruct the first number of paging data.

[0073] In one implementation, a server-side paging processing device also includes a paging processing module, which is used to receive a paging query request from a client, parse a second paging parameter, query conditions, and feature information from the paging query request; obtain a second number of data sets that meet the query conditions and the second paging parameter from a database; send the feature information and the second number of data sets to a feature platform, and the feature platform filters out multiple second target data that match the feature information from the second number of data sets; receive multiple second target data fed back by the feature platform, construct the client's second paging quantity data with the multiple second target data, and return the second paging quantity data to the client.

[0074] In one of the implementations, after receiving a page-turning query request from a client, the method further includes: if a second query request for returning to the previous page is received, and the second query request encapsulates a query condition, a first paging parameter, and characteristic information, then when it is determined that multiple first target data in the cache are valid, the multiple first target data are read from the cache and the first paging quantity of data is reconstructed, and the first paging quantity of data is sent to the client.

[0075] In one of the implementations, after receiving a page-turning query request from a client, the method further includes: reading multiple first target data from a cache based on query conditions in the page-turning query request; sending the multiple first target data to a database so that the database marks the validity of each first target data based on a first set condition; sending the multiple first target data to a feature platform so that the feature platform marks the validity of each first target data based on a second set condition.

[0076] In one implementation, after the step of receiving the paging query request from the client, it also includes: receiving a second query request for the paging query sent by the client, parsing the query condition, the first paging parameter and the characteristic information from the second query request; obtaining a third number of data sets that meet the query condition and the first paging parameter from the database, wherein the data sets include multiple third target data and fourth target data, and the third target data are the first target data marked as valid based on the first set condition; sending the characteristic information and the third number of data sets to the characteristic platform, the characteristic platform filters out multiple fifth target data from the multiple third target data, the fifth target data are the first target data marked as valid based on the second set condition, and filters out multiple sixth target data that match the characteristic information from the multiple fifth target data and the fourth target data; receiving multiple sixth target data fed back by the characteristic platform and constructing the first number of paging data based on the multiple sixth target data, and sending the first number of paging data to the client.

[0077] In one implementation, a server-side paging processing device also includes a first prompt module, which is used to calculate the difference between the second number and the first number; if the difference is greater than a set threshold, the difference is sent to the client, or a prompt message indicating a re-query of the previous page is sent to the client.

[0078] In one implementation, a server-side paging processing device also includes a second prompt module, which is used to parse the first query time from the first query request; parse the second query time from the page turning query request; calculate the time difference between the current time and the first query time, and / or calculate the time difference between the current time and the second query time; when the time difference between the current time and the first query time is greater than the first time threshold, send a prompt message to the client indicating that the time interval is too long and re-query; when the time difference between the current time and the second query time is greater than the second time threshold, send a prompt message to the client indicating that the time interval is too long and re-query.

[0079] For the specific definition of a server-side paging processing device, please refer to the definition of a server-side paging processing method mentioned above, which will not be repeated here. Each module in the above-mentioned server-side paging processing 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.

[0080] In one embodiment, a computer device is provided. The computer device may be a network server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to interact with the client for data, etc. When the computer program is executed by the processor, the above-mentioned server-side paging processing method is implemented.

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

[0082] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: receiving a first query request for a paging query sent by a client, parsing the query condition, the first paging parameter, and feature information from the first query request; acquiring a first number of data sets satisfying the query condition and the first paging parameter from a database; sending the feature information and the first number of data sets to a feature platform, wherein the feature platform filters out a plurality of first target data matching the feature information from the first number of data sets; receiving a plurality of first target data fed back by the feature platform and constructing a first number of paging data based on the plurality of first target data, and sending the first number of paging data to the client; caching the plurality of first target data, so that when the query condition and feature information of the client are received again, the plurality of first target data are read from the cache to reconstruct the first number of paging data.

[0083] In one of the embodiments, the processor implements the following steps when executing the computer program: receiving a page turning query request from a client, parsing a second paging parameter, a query condition, and feature information from the page turning query request; acquiring a second number of data sets that satisfy the query condition and the second paging parameter from a database; sending the feature information and the second number of data sets to a feature platform, and the feature platform filters out a plurality of second target data that match the feature information from the second number of data sets; receiving a plurality of second target data fed back by the feature platform, constructing a second paging quantity of data for the client's page turning from the plurality of second target data, and returning the second paging quantity of data to the client.

[0084] In one of the embodiments, the processor implements the following steps when executing a computer program: if a second query request for returning a previous page is received, and the second query request encapsulates a query condition, a first paging parameter, and characteristic information, then when it is determined that multiple first target data in the cache are valid, the multiple first target data are read from the cache and the first paging quantity of data is reconstructed, and the first paging quantity of data is sent to the client.

[0085] In one of the embodiments, the processor implements the following steps when executing the computer program: reading multiple first target data from the cache based on the query conditions in the page query request; sending the multiple first target data to the database so that the database marks the validity of each first target data based on the first set condition; sending the multiple first target data to the feature platform so that the feature platform marks the validity of each first target data based on the second set condition.

[0086] In one of the embodiments, the processor implements the following steps when executing the computer program: receiving a second query request for a paging query sent by a client, parsing the query condition, the first paging parameter and the feature information from the second query request; obtaining a third number of data sets that meet the query condition and the first paging parameter from a database, wherein the data sets include multiple third target data and fourth target data, and the third target data are first target data marked valid based on the first set condition; sending the feature information and the third number of data sets to a feature platform, wherein the feature platform filters out multiple fifth target data from the multiple third target data, wherein the fifth target data are first target data marked valid based on the second set condition, and filters out multiple sixth target data that match the feature information from the multiple fifth target data and the fourth target data; receiving multiple sixth target data fed back by the feature platform and constructing a first number of paging data based on the multiple sixth target data, and sending the first number of paging data to the client.

[0087] In one embodiment, when the processor executes the computer program, the following steps are implemented: calculating the difference between the second number and the first number; if the difference is greater than a set threshold, sending the difference to the client, or sending a prompt message indicating a re-query of the previous page to the client.

[0088] In one of the embodiments, the processor implements the following steps when executing the computer program: parsing a first query time from a first query request; parsing a second query time from a page-turning query request; calculating the time difference between the current time and the first query time, and / or calculating the time difference between the current time and the second query time; when the time difference between the current time and the first query time is greater than a first time threshold, sending a prompt message to the client indicating that the time interval is too long and re-querying; when the time difference between the current time and the second query time is greater than a second time threshold, sending a prompt message to the client indicating that the time interval is too long and re-querying.

[0089] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: receiving a first query request for a paging query sent by a client, parsing the query condition, the first paging parameter and feature information from the first query request; acquiring a first number of data sets that meet the query condition and the first paging parameter from a database; sending the feature information and the first number of data sets to a feature platform, and the feature platform filters out a plurality of first target data that match the feature information from the first number of data sets; receiving a plurality of first target data fed back by the feature platform and constructing a first number of paging data based on the plurality of first target data, and sending the first number of paging data to the client; caching the plurality of first target data so that when the query condition and feature information of the client are received again, the plurality of first target data are read from the cache to reconstruct the first number of paging data.

[0090] In one of the embodiments, the computer program implements the following steps when executed by a processor: receiving a page turning query request from a client, parsing a second paging parameter, a query condition, and feature information from the page turning query request; acquiring a second number of data sets that satisfy the query condition and the second paging parameter from a database; sending the feature information and the second number of data sets to a feature platform, and the feature platform filters out a plurality of second target data that match the feature information from the second number of data sets; receiving a plurality of second target data fed back by the feature platform, constructing a second paging quantity of data for the client's page turning from the plurality of second target data, and returning the second paging quantity of data to the client.

[0091] In one embodiment, the computer program implements the following steps when executed by a processor: if a second query request for returning a previous page is received, and the second query request encapsulates a query condition, a first paging parameter, and characteristic information, then when it is determined that multiple first target data in the cache are valid, the multiple first target data are read from the cache and the first paging quantity of data is reconstructed, and the first paging quantity of data is sent to the client.

[0092] In one of the embodiments, when the computer program is executed by a processor, the following steps are implemented: reading multiple first target data from the cache based on the query conditions in the page query request; sending the multiple first target data to the database so that the database marks the validity of each first target data based on the first set condition; sending the multiple first target data to the feature platform so that the feature platform marks the validity of each first target data based on the second set condition.

[0093] In one embodiment, when the computer program is executed by the processor, the following steps are implemented: receiving a second query request for a paging query sent by a client, parsing the query condition, the first paging parameter and the feature information from the second query request; obtaining a third number of data sets that meet the query condition and the first paging parameter from a database, wherein the data sets include multiple third target data and fourth target data, and the third target data are the first target data marked valid based on the first set condition; sending the feature information and the third number of data sets to a feature platform, and the feature platform filters out multiple fifth target data from the multiple third target data, wherein the fifth target data are the first target data marked valid based on the second set condition, and filters out multiple sixth target data that match the feature information from the multiple fifth target data and the fourth target data; receiving multiple sixth target data fed back by the feature platform and constructing a first number of paging data based on the multiple sixth target data, and sending the first number of paging data to the client.

[0094] In one embodiment, when the computer program is executed by the processor, the following steps are implemented: calculating the difference between the second number and the first number; if the difference is greater than a set threshold, sending the difference to the client, or sending a prompt message to the client indicating re-querying the previous page.

[0095] In one of the embodiments, the computer program implements the following steps when executed by a processor: parsing a first query time from a first query request; parsing a second query time from a page-turning query request; calculating the time difference between a current time and the first query time, and / or calculating the time difference between the current time and the second query time; when the time difference between the current time and the first query time is greater than a first time threshold, sending a prompt message to the client indicating that the time interval is too long and re-querying; when the time difference between the current time and the second query time is greater than a second time threshold, sending a prompt message to the client indicating that the time interval is too long and re-querying.

[0096] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0097] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0098] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A server-side paging processing method, characterized in that: The method comprises: Receive a first query request for paging query sent by a client, and parse the query condition, the first paging parameter and the characteristic information from the first query request; Acquire a first number of data sets that satisfy the query condition and the first paging parameter from a database; Sending the feature information and the first number of data sets to a feature platform, wherein the feature platform selects a plurality of first target data matching the feature information from the first number of data sets; receiving a plurality of first target data fed back by the feature platform, constructing a first page quantity of data based on the plurality of first target data, and sending the first page quantity of data to the client; caching the plurality of first target data, so that when the query condition and characteristic information of the client are received again, the plurality of first target data are read from the cache to reconstruct the first page quantity of data; After receiving the plurality of first target data fed back by the feature platform, the method further includes: Calculate the difference between the number of the multiple first target data fed back and the amount of data that needs to be displayed on the current query page, obtain multiple data that meet the query conditions from the database based on the difference, and then send the multiple data obtained from the database and the feature information to the feature platform, which performs feature matching again and feeds back the matched first target data to the network server, and repeats this process until the number of first target data fed back by the feature platform is greater than or equal to the number of the first pages on the current query page.

2. The method according to claim 1, characterized in that The method further comprises: Receiving a page turning query request from the client, parsing the page turning query request to obtain a second paging parameter, the query condition, and the characteristic information; Acquire a second number of data sets that satisfy the query condition and the second paging parameter from the database; sending the feature information and the second number of data sets to a feature platform, wherein the feature platform selects a plurality of second target data matching the feature information from the second number of data sets; Receive multiple pieces of second target data fed back by the feature platform, construct data of a second paging quantity of the client using the multiple pieces of second target data, and return the data of the second paging quantity to the client.

3. The method according to claim 2, characterized in that After receiving the page turning query request from the client, the method further includes: If a second query request for returning the previous page is received, and the second query request encapsulates the query condition, the first paging parameter and the characteristic information, then when it is determined that the multiple first target data in the cache are all valid, the multiple first target data are read from the cache and the first paging quantity of data is reconstructed, and the first paging quantity of data is sent to the client.

4. The method according to claim 1, characterized in that: After receiving the page turning query request from the client, the method further includes: Reading the plurality of first target data from the cache based on the query condition in the page turning query request; sending the plurality of first target data to the database, so that the database marks the validity of each first target data based on a first set condition; The plurality of first target data are sent to the feature platform, so that the feature platform marks the validity of each first target data based on a second set condition.

5. The method according to claim 4, characterized in that After the step of receiving the page turning query request from the client, the method further includes: receiving a second query request for paging query sent by a client, and parsing the query condition, the first paging parameter and the characteristic information from the second query request; Acquire a third number of data sets satisfying the query condition and the first paging parameter from the database, wherein the data sets include a plurality of third target data and fourth target data, and the third target data is the first target data marked as valid based on the first set condition; The feature information and the third number of data sets are sent to a feature platform, the feature platform filters out a plurality of fifth target data from the plurality of third target data, the fifth target data being the first target data marked valid based on the second set condition, and filters out a plurality of sixth target data matching the feature information from the plurality of fifth target data and the fourth target data; Receive multiple pieces of sixth target data fed back by the feature platform, construct a first page number of data based on the multiple pieces of sixth target data, and send the first page number of data to the client.

6. The method according to claim 2, characterized in that After the step of acquiring from the database a second number of data sets that satisfy the query condition and the second paging parameter, the method further includes: calculating a difference between the second amount and the first amount; If the difference is greater than a set threshold, the difference is sent to the client, or a prompt message indicating a re-query of the previous page is sent to the client.

7. The method according to claim 2, characterized in that The method further comprises: Parsing a first query time from the first query request; Parsing a second query time from the page turning query request; Calculating the time difference between the current time and the first query time, and / or calculating the time difference between the current time and the second query time; When the time difference between the current time and the first query time is greater than a first time threshold, sending a prompt message indicating that the time interval is too long to the client to re-query; When the time difference between the current time and the second query time is greater than a second time threshold, a prompt message indicating that the time interval is too long and indicating that the query should be repeated is sent to the client.

8. A server-side paging processing device, characterized in that: The device comprises: A receiving module, configured to receive a first query request for a paging query sent by a client, and parse the query condition, the first paging parameter and the characteristic information from the first query request; An acquisition module, configured to acquire a first number of data sets satisfying the query condition and the first paging parameter from a database; A sending module, configured to send the feature information and the first number of data sets to a feature platform, wherein the feature platform selects a plurality of first target data matching the feature information from the first number of data sets; A construction module, configured to receive a plurality of first target data fed back by the feature platform, construct a first page number of data based on the plurality of first target data, and send the first page number of data to the client; A cache module, used for caching the plurality of first target data, so that when the query condition and characteristic information of the client are received again, the plurality of first target data are read from the cache to reconstruct the first page quantity of data; After receiving the plurality of first target data fed back by the feature platform, the method further includes: Calculate the difference between the number of the multiple first target data fed back and the amount of data that needs to be displayed on the current query page, obtain multiple data that meet the query conditions from the database based on the difference, and then send the multiple data obtained from the database and the feature information to the feature platform, which performs feature matching again and feeds back the matched first target data to the network server, and repeats this process until the number of first target data fed back by the feature platform is greater than or equal to the number of the first pages on the current query page.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Optimized web paging query method and device

    CN103425708A

  • Cache-based server paging method and system

    CN105843958A