Method and system for inquiring whether enterprise indexes trigger upper limit indexes in batches
Patent Information
- Application Number
- CN202410807713.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-11
AI Technical Summary
The traditional enterprise indicator query system has low efficiency and poor real-time performance, making it difficult to achieve efficient and real-time batch query of enterprise indicator triggering conditions.
By implementing user information encryption between the front end and the back end, querying the database asynchronously and storing the results in Redis, the front end periodically requests the back end to check the results, renders asynchronously and stops the request when the results match, using non-blocking asynchronous query and timing request control. , combined with SHA256 encryption and Redis lifecycle management.
It improves query efficiency and real-time performance, reduces system response time and resource consumption, ensures data security and user experience, and enhances system stability and user satisfaction.
Smart Images

Figure CN118760702A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for batch querying whether enterprise indicators trigger upper limit indicators. Background Art
[0002] Traditional enterprise indicator query systems have problems such as low efficiency and poor real-time performance. How to provide efficient and real-time batch query of enterprise indicator triggering conditions is a technical problem that needs to be solved. Summary of the invention
[0003] The technical task of the present invention is to address the above shortcomings and provide a method and system for batch querying whether enterprise indicators trigger upper limit indicators, so as to solve the technical problem of how to efficiently and real-time batch query the triggering status of enterprise indicators.
[0004] In a first aspect, the present invention provides a method for batch querying whether enterprise indicators trigger upper limit indicators, which is applied between a front end and a back end, and includes the following steps:
[0005] The enterprise information based on the user's batch query is submitted to the backend as a query request, and the enterprise information is encrypted by SHA256 through the backend, and the encrypted string is used as the key value of Redis;
[0006] Through the back-end asynchronous query database, determine whether the enterprise information of the relevant enterprise triggers the upper limit indicator based on the query request, and store the query results in Redis;
[0007] The front-end periodically sends data requests to the back-end. Based on the data requests, the back-end checks the query results stored in Redis according to the key.
[0008] The query results returned are rendered asynchronously by the front end, and the submission of data requests is stopped after the number of queries and the number of query results returned are the same.
[0009] Preferably, the asynchronous query mode is a non-blocking operation.
[0010] Preferably, the front-end asynchronous rendering method includes dynamically updating the front-end page and displaying the query results in real time.
[0011] Preferably, based on the query results returned by the backend, the frontend triggers other operations, including updating the UI status or notifying the user.
[0012] Preferably, when the query results are stored in Redis, a life cycle of the query results is set, and the query results are automatically expired and cleaned up based on the life cycle.
[0013] In a second aspect, the present invention provides a system for batch querying whether enterprise indicators trigger upper limit indicators, which is used to batch query whether enterprise indicators trigger upper limit indicators by using a method for batch querying whether enterprise indicators trigger upper limit indicators as described in any one of the first aspects, including a front end and a back end;
[0014] The front end is used to submit enterprise information based on user batch query as a query request to the back end. Correspondingly, the back end is used to encrypt the enterprise information with SHA256, and the encrypted string obtained is used as the key value of Redis;
[0015] The backend is used to asynchronously query the database, determine whether the enterprise information of the relevant enterprise triggers the upper limit indicator based on the query request, and store the query results in Redis;
[0016] The front end is used to periodically send data requests to the back end. Based on the data requests, the back end is used to check the query results stored in Redis according to the key;
[0017] The front end is used to asynchronously render the returned query results and stop submitting data requests after the number of queries and the number of returned query results are the same.
[0018] Preferably, the asynchronous query mode is a non-blocking operation.
[0019] Preferably, the front-end asynchronous rendering method includes dynamically updating the front-end page and displaying the query results in real time.
[0020] Preferably, based on the query results returned by the backend, the frontend is used to trigger other operations, including updating the UI status or notifying the user.
[0021] Preferably, when the query results are stored in Redis, a life cycle of the query results is set, and the query results are automatically expired and cleaned up based on the life cycle.
[0022] The method and system for batch querying whether enterprise indicators trigger upper limit indicators of the present invention have the following advantages:
[0023] 1. Improve query efficiency: Through encryption and asynchronous processing technology, query efficiency is improved, system response time is reduced, and users can quickly obtain query results;
[0024] 2. Realize real-time display: Through front-end timing request and stop condition control, the function of real-time display of query results is realized, which enhances the real-time performance and user experience of the system;
[0025] 3. Save system resources: Through timing request control and stop conditions, the pressure on the server is reduced, system resources are saved, and the stability and reliability of the system are improved;
[0026] 4. Ensure data security: Use encryption algorithms to encrypt corporate information, ensuring data security and privacy, and effectively preventing the risk of information leakage.
[0027] 5. Improve user experience: Through real-time display and efficient query, the user experience is improved, allowing users to obtain the required enterprise indicator information more quickly and conveniently, thereby enhancing user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] The present invention is further described below in conjunction with the accompanying drawings.
[0030] Figure 1 This is a flowchart of a method for batch querying whether enterprise indicators trigger upper limit indicators in Example 1. DETAILED DESCRIPTION
[0031] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.
[0032] The embodiment of the present invention provides a method and system for batch querying whether enterprise indicators trigger upper limit indicators, which are used to solve the technical problem of how to efficiently and real-time batch query enterprise indicator triggering conditions.
[0033] Embodiment 1:
[0034] The present invention provides a method for batch querying whether enterprise indicators trigger upper limit indicators, which is applied between the front end and the back end, and includes the following steps:
[0035] S100, the enterprise information based on the user's batch query is submitted to the backend as a query request, and the enterprise information is encrypted by SHA256 through the backend, and the encrypted string obtained is used as the key value of Redis;
[0036] S200, the back-end asynchronously queries the database, determines whether the enterprise information of the relevant enterprise triggers the upper limit indicator based on the query request, and stores the query result in Redis;
[0037] S300, the front end periodically sends a data request to the back end, and based on the data request, the back end checks the query result stored in Redis according to the key;
[0038] S400: The front end asynchronously renders the returned query results, and stops submitting data requests after the number of queries and the number of returned query results are the same.
[0039] When the backend asynchronously queries the database in step S200 of this embodiment, the asynchronous query mode is a non-blocking operation, which improves data processing efficiency.
[0040] In step S300 of this embodiment, the front end sends a data request to the back end every 5 seconds.
[0041] The front-end asynchronous rendering method in step S400 of this embodiment includes dynamically updating the front-end page and displaying the query results in real time.
[0042] The method of this embodiment is scalable and supports processing different types of queries and data structures. The method uses secure encryption technology to ensure the security of data transmission and storage and prevent unauthorized access.
[0043] Embodiment 2:
[0044] The present invention discloses a system for batch querying whether enterprise indicators trigger upper limit indicators, including a front end and a back end, and is used for batch querying whether enterprise indicators trigger upper limits through the method disclosed in Example 1.
[0045] The front end is used to submit enterprise information based on user batch queries as query requests to the back end. Correspondingly, the back end is used to encrypt the enterprise information with SHA256, and the obtained encrypted string is used as the key value of Redis.
[0046] The backend is used to asynchronously query the database, determine whether the enterprise information of the relevant enterprise triggers the upper limit indicator based on the query request, and store the query results in Redis. Among them, when the backend asynchronously queries the database, the asynchronous query method is a non-blocking operation to improve data processing efficiency.
[0047] The front end is used to periodically send data requests to the back end. Based on the data request, the back end is used to check the query results stored in Redis according to the key. As a specific implementation, the front end sends data requests to the back end every 5 seconds.
[0048] The front end is used to asynchronously render the returned query results, and stops submitting data requests after the number of queries and the number of returned query results are the same. As a specific implementation, the front end asynchronous rendering method includes dynamically updating the front end page and displaying the query results in real time.
[0049] The system of this embodiment is scalable and supports processing different types of queries and data structures. The system uses secure encryption technology to ensure the security of data transmission and storage and prevent unauthorized access.
[0050] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A method for batch querying whether enterprise indicators trigger upper limit indicators, characterized in that: Applied between the front-end and the back-end, it includes the following steps: The enterprise information based on the user's batch query is submitted to the backend as a query request, and the enterprise information is encrypted by SHA256 through the backend, and the encrypted string is used as the key value of Redis; Through the back-end asynchronous query database, determine whether the enterprise information of the relevant enterprise triggers the upper limit indicator based on the query request, and store the query results in Redis; The front-end periodically sends data requests to the back-end. Based on the data requests, the back-end checks the query results stored in Redis according to the key. The query results returned are rendered asynchronously by the front end, and the submission of data requests is stopped after the number of queries and the number of query results returned are the same.
2. The method for batch querying whether enterprise indicators trigger upper limit indicators according to claim 1 is characterized in that: The asynchronous query mode is a non-blocking operation.
3. The method for batch querying whether enterprise indicators trigger upper limit indicators according to claim 1 is characterized in that: Front-end asynchronous rendering methods include dynamically updating the front-end page and displaying query results in real time.
4. The method for batch querying whether enterprise indicators trigger upper limit indicators according to claim 1 is characterized in that: Based on the query results returned by the backend, the frontend triggers other operations, including updating the UI status or notifying the user.
5. The method for batch querying whether enterprise indicators trigger upper limit indicators according to claim 1 is characterized in that: When storing query results in Redis, set the life cycle of the query results and automatically clear the query results based on the life cycle.
6. A system for batch querying whether enterprise indicators trigger upper limit indicators, characterized in that: Used to batch query whether enterprise indicators trigger upper limits by using a method for batch querying whether enterprise indicators trigger upper limit indicators as described in any one of claims 1 to 5, including a front end and a back end; The front end is used to submit enterprise information based on user batch query as a query request to the back end. Correspondingly, the back end is used to encrypt the enterprise information with SHA256, and the encrypted string obtained is used as the key value of Redis; The backend is used to asynchronously query the database, determine whether the enterprise information of the relevant enterprise triggers the upper limit indicator based on the query request, and store the query results in Redis; The front end is used to periodically send data requests to the back end. Based on the data requests, the back end is used to check the query results stored in Redis according to the key; The front end is used to asynchronously render the returned query results and stop submitting data requests after the number of queries and the number of returned query results are the same.
7. The system for batch querying whether enterprise indicators trigger upper limit indicators according to claim 6 is characterized in that: The asynchronous query mode is a non-blocking operation.
8. The system for batch querying whether enterprise indicators trigger upper limit indicators according to claim 6 is characterized in that: Front-end asynchronous rendering methods include dynamically updating the front-end page and displaying query results in real time.
9. The system for batch querying whether enterprise indicators trigger upper limit indicators according to claim 6, characterized in that: Based on the query results returned by the backend, the frontend is used to trigger other operations, including updating the UI status or notifying the user.
10. The system for batch querying whether enterprise indicators trigger upper limit indicators according to claim 6, characterized in that: When storing query results in Redis, set the life cycle of the query results and automatically clear the query results based on the life cycle.
