Service request processing method and apparatus
By optimizing the hierarchical and caching strategies for configuration data in the data service gateway, the problems of poor availability and low reliability caused by the gateway's reliance on an external configuration center were solved, and more efficient service request processing was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2023-03-28
- Publication Date
- 2026-07-03
AI Technical Summary
In existing technologies, data service gateways rely on external configuration centers to obtain configuration data, resulting in poor availability, introducing network risks and time overhead, and affecting the reliability of service request processing.
By reading configuration data from an external configuration center, classifying the data into levels based on the classification index, determining classification labels, and formulating caching strategies based on the classification labels, the configuration data is cached locally on the gateway, reducing dependence on the external configuration center and directly loading and parsing service request data from the local machine.
It improves gateway availability, reduces network risks and time overhead, enhances the reliability of service request processing, and ensures stable gateway operation.
Smart Images

Figure CN116319176B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data technology, and more particularly to a service request processing method and apparatus. Background Technology
[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.
[0003] Data service gateways are core components of big data and cloud data supply. Big data cloud platforms build public gateways to support internal and external applications of enterprises to use the data assets of the cloud platform in order to release the business value of the cloud platform. When processing service requests, whether the gateway has high availability has a significant impact on the release of the business value of the big data cloud platform.
[0004] To build a highly available data service gateway and ensure the accessibility of the big data cloud platform during service request processing, the current solution for obtaining and applying configuration data that gateway service request processing depends on is usually a remote loading-parsing-application model. That is, during the gateway startup process, it requests configuration data from an external configuration center, then verifies and parses the configuration data information, and finally applies it in the gateway's process space. This method relies entirely on obtaining configuration data from an external configuration center, resulting in poor gateway availability, which in turn adversely affects service request processing. In addition, loading configuration data usually introduces network risks and time overhead, affecting the reliability of gateway service request processing. Summary of the Invention
[0005] This invention provides a service request processing method applied to a gateway to reduce the gateway's dependence on an external configuration center and improve its availability. The method includes:
[0006] Read configuration data from an external configuration center;
[0007] The configuration data is classified into different levels based on the classification index, and the classification label of the configuration data is determined based on the classification results; the classification index is determined based on the importance, update frequency and usage frequency of the configuration data.
[0008] Based on the hierarchical labels of the configuration data, a caching strategy is determined for each level of configuration data;
[0009] According to the caching strategy, the configuration data that needs to be cached is cached locally on the gateway;
[0010] Upon receiving a service request, if the gateway has the configuration data required to process the service request locally, it loads and parses the configuration data required to process the service request from the gateway and processes the service request.
[0011] This invention provides a service request processing apparatus applied to a gateway to reduce the gateway's dependence on an external configuration center and improve its availability. The apparatus includes:
[0012] The read module is used to read configuration data from an external configuration center;
[0013] The grading module is used to classify the configuration data into grades based on the grading index of the configuration data, and determine the grade label of the configuration data based on the grading results; wherein, the grading index is determined based on the importance, update frequency and usage frequency of the configuration data;
[0014] The determination module is used to determine the caching strategy for each level of configuration data based on the hierarchical labels of the configuration data.
[0015] The caching module is used to cache the configuration data that needs to be cached to the gateway locally according to the caching strategy;
[0016] The processing module is used to load and parse the configuration data required to process the service request from the gateway if the gateway has the configuration data on its local machine after receiving the service request, and then process the service request.
[0017] An embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a service request processing method.
[0018] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a service request processing method.
[0019] An embodiment of the present invention provides a computer program product, which includes a computer program that, when executed by a processor, implements a service request processing method.
[0020] This invention addresses the problem in existing technologies where gateways rely entirely on external configuration centers for configuration data, resulting in poor gateway availability, network risks, and time overhead, negatively impacting gateway reliability. This invention reads configuration data from an external configuration center; classifies the configuration data into levels based on a grading index; and determines grading labels based on the grading results. The grading index is determined based on the importance, update frequency, and usage frequency of the configuration data. A caching strategy is determined for each level of configuration data based on its grading labels. The required configuration data is then cached locally on the gateway according to the caching strategy. Upon receiving a service request, if the gateway possesses the necessary configuration data for processing the request, it loads and parses the required data from the gateway and processes the request. This reduces the gateway's dependence on the external configuration center. Determining a caching strategy for each level of configuration data and caching the required configuration data locally improves gateway availability, ensures stable service request processing, reduces network risks and time overhead, and enhances the reliability of gateway service request processing. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating the service request processing method in an embodiment of the present invention;
[0023] Figure 2 This is a specific example diagram of the service request processing method in the embodiments of the present invention;
[0024] Figure 3 This is a specific example diagram of the service request processing method in the embodiments of the present invention;
[0025] Figure 4 This is a schematic diagram of a service request processing device in an embodiment of the present invention;
[0026] Figure 5 This is a specific example diagram of the service request processing device in an embodiment of the present invention;
[0027] Figure 6 This is a specific example diagram of the service request processing device in an embodiment of the present invention;
[0028] Figure 7 This is an example diagram of the service request processing device processing a service request in an embodiment of the present invention;
[0029] Figure 8 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0031] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0032] In the description of this specification, the terms "comprising," "including," "having," and "containing" are open-ended terms, meaning that they include but are not limited to. The terms "an embodiment," "a specific embodiment," "some embodiments," and "for example," etc., refer to specific features, structures, or characteristics described in connection with that embodiment or example that are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, or characteristics described can be combined in any suitable manner in one or more embodiments or examples. The order of steps involved in the various embodiments is used to illustrate the implementation of this application, and the order of steps is not limited and can be adjusted appropriately as needed.
[0033] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments.
[0034] Figure 1 This is a flowchart illustrating the service request processing method according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0035] Step 101: Read the configuration data from the external configuration center;
[0036] Step 102: Based on the hierarchical index of the configuration data, classify the configuration data into levels, and determine the hierarchical labels of the configuration data based on the hierarchical classification results; wherein, the hierarchical index is determined based on the importance, update frequency and usage frequency of the configuration data;
[0037] Step 103: Determine the caching strategy for each level of configuration data based on the hierarchical labels of the configuration data.
[0038] Step 104: Cache the configuration data that needs to be cached to the gateway local according to the caching policy;
[0039] Step 105: Upon receiving a service request, if the gateway has the configuration data required to process the service request locally, load and parse the configuration data required to process the service request from the gateway and process the service request.
[0040] Depend on Figure 1 As shown in the process, this embodiment of the invention reads configuration data from an external configuration center, classifies the configuration data into levels based on the classification index, and determines the classification label of the configuration data based on the classification result. The classification index is determined based on the importance, update frequency, and usage frequency of the configuration data. A caching strategy is determined for each level of configuration data based on the classification label. The configuration data that needs to be cached is cached locally on the gateway according to the caching strategy. Upon receiving a service request, if the gateway has the configuration data required to process the service request locally, it loads and parses the configuration data required to process the service request from the gateway and processes the service request. Conventional gateway service request processing typically adopts a remote loading-parsing-enabling mode, where the gateway requests configuration data from an external configuration center during startup, then verifies and parses the configuration data information, and finally enacts it in the gateway's process space. This embodiment of the invention classifies the configuration data into levels, determines the classification label based on the classification result, processes different levels of configuration data according to different caching strategies, and caches the configuration data that needs to be cached locally on the gateway. This reduces the gateway's dependence on the external configuration center, improves the gateway's availability, and ensures stable processing of service requests.
[0041] To provide a clearer explanation of the above distributed replay testing method, each step will be described in detail below.
[0042] In one embodiment of the present invention, the hierarchical index of configuration data includes an importance index, a change index, and a popularity index; the importance index is determined according to the importance of the configuration data; the change index is determined according to the update frequency of the configuration data; and the popularity index is determined according to the usage frequency of the configuration data.
[0043] In practice, the importance of each configuration data point is determined, and the importance of each configuration data point is quantitatively converted into an importance index; the update frequency of the configuration data is statistically analyzed to determine the change index; and the usage frequency of the configuration data is statistically analyzed to determine the popularity index.
[0044] In one embodiment of the present invention, for step 102, the configuration data is classified into levels according to the classification index of the configuration data, and the classification label of the configuration data is determined according to the classification result; for example: when the classification index of the configuration data is greater than 0 and less than or equal to 0.25, the classification label of the configuration data is determined to be level D; when the classification index of the configuration data is greater than 0.25 and less than or equal to 0.5, the classification label of the configuration data is determined to be level C; when the classification index of the configuration data is greater than 0.5 and less than or equal to 0.75, the classification label of the configuration data is determined to be level B; when the classification index of the configuration data is greater than 0.75 and less than or equal to 1, the classification label of the configuration data is determined to be level A.
[0045] In one embodiment of the present invention, the caching strategy includes whether caching is required, the caching duration, whether to force a cache refresh, and whether offline backup is required.
[0046] In one embodiment of the present invention, for step 103, a caching strategy is determined for each level of configuration data based on the hierarchical labels of the configuration data. The caching strategy determines the caching behavior of the configuration data. For example, the caching strategy for configuration data with a hierarchical label of D is set to no caching required; the caching strategy for configuration data with a hierarchical label of C is set to require caching, with a caching duration of 100 seconds, mandatory cache refresh after use, and no offline backup required; the caching strategy for configuration data with a hierarchical label of B is set to require caching, with a caching duration of 200 seconds, mandatory cache refresh after use, and offline backup required; and the caching strategy for configuration data with a hierarchical label of A is set to require configuration caching, with a caching duration of 300 seconds, mandatory cache refresh after use, and offline backup required. This forms an adaptive caching mechanism, which effectively improves the effectiveness of caching configuration data and also improves the loading efficiency of configuration data.
[0047] In one embodiment of the present invention, in order to flexibly adapt to the needs of gateway application scenarios, hierarchical tags for configuration data cached locally by the gateway can be created, modified, or deleted, and configuration data cached locally by the gateway can be queried according to hierarchical tags; caching strategies for configuration data cached locally by the gateway can be created, modified, or deleted, and caching strategies can be bound to hierarchical tags of configuration data.
[0048] In one embodiment of the present invention, for step 104, the configuration data that needs to be cached is cached locally on the gateway according to the caching strategy, and the configuration data cached locally on the gateway is backed up.
[0049] In practice, the configuration data is backed up to a local disk file or a network disk file, such as NAS (Network Attached Storage). Backing up the cached configuration data can avoid providing configuration data to handle service requests when the external configuration center service is unavailable. It also supports comparison of differences between multiple versions of backed-up configuration data, enhancing the gateway's emergency handling capabilities.
[0050] Figure 2 This is a specific example diagram of the service request processing method in an embodiment of the present invention. Regarding step 105, refer to... Figure 2 The detailed processing flow for service request handling is as follows:
[0051] Step 201: Receive service request;
[0052] Step 202: After receiving a service request, if the gateway has the configuration data required to process the service request locally, load and parse the configuration data required to process the service request from the gateway and process the service request.
[0053] Step 203: After receiving a service request, if the gateway does not have the configuration data required to process the service request locally, it queries the external configuration center.
[0054] Step 204: If the external configuration center has the configuration data required to process the service request and the external configuration center service is available, read the configuration data required to process the service request from the external configuration center and process the service request.
[0055] Step 205: If the external configuration center does not have the configuration data required to process the service request or the external configuration center service is unavailable, the service request will fail to be replied to.
[0056] In one embodiment of the present invention, upon receiving a service request, it is determined whether the configuration data required to process the service request is cached locally on the gateway. If the configuration data exists locally on the gateway, it is loaded and parsed from the gateway, and the service request is processed. If the configuration data does not exist locally on the gateway, an external configuration center is queried via HTTP request or other means. If the external configuration center contains the configuration data and its service is available, the configuration data is read from the external configuration center, the service request is processed, and the hierarchical label and caching strategy of the configuration data read from the external configuration center are determined. The configuration data is then synchronously cached locally on the gateway according to the caching strategy. If the external configuration center does not contain the configuration data or its service is unavailable, a service request failure is reported. This embodiment of the present invention reduces the gateway's dependence on the external configuration center, improves the gateway's availability, ensures stable processing of service requests, reduces network risks and time overhead, and enhances the reliability of gateway service request processing.
[0057] In one embodiment of the present invention, after receiving a service request, if the gateway has the configuration data required to process the service request locally, the gateway loads and parses the configuration data required to process the service request locally. After processing the service request, the configuration data required to process the service request cached locally by the gateway can be updated. In addition, the configuration data cached locally by the gateway can be queried, added, or deleted according to the needs of the service request or the gateway's operating status, thereby enhancing the gateway's emergency handling capability.
[0058] In one embodiment of the present invention, after receiving a service request, if the gateway has the configuration data required to process the service request locally, the gateway loads and parses the configuration data required to process the service request locally, processes the service request, and adjusts the hierarchical label and caching strategy of the configuration data according to the status of the service request.
[0059] Figure 3 This is a specific example diagram of the service request processing method in an embodiment of the present invention. (Reference) Figure 3 The detailed process for adjusting the hierarchical tags and caching strategies of configuration data is as follows:
[0060] Step 301: Analyze the status of processing service requests to determine the usage frequency and update frequency of the configuration data cached locally on the gateway;
[0061] Step 302: Adjust the hierarchical labels and caching strategies of the configuration data based on the usage frequency and update frequency of the configuration data cached locally on the gateway.
[0062] In one embodiment of the present invention, the status of processing service requests is analyzed to determine the usage frequency and update frequency of the configuration data cached locally by the gateway. Based on the usage frequency and update frequency of the configuration data cached locally by the gateway, the hierarchical tags and caching strategies of the configuration data are adjusted. This can avoid caching strategy mismatch caused by deviations in the analysis of application scenarios by business and technical personnel, optimize caching efficiency, and enhance the gateway's local caching to improve the availability and reliability of the gateway.
[0063] In one embodiment of the present invention, the status of service request processing is recorded for summarizing statistical information, including: recording service request information, service request status, time spent requesting the gateway, time spent requesting the backend service, response message length, etc.; the statistical information after service request processing can be used as the basis for adjusting configuration data hierarchical labels and caching strategies.
[0064] It should be noted that although the operation of the method of the present invention has been described in a specific order in the above embodiments and figures, this does not require or imply that the operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0065] The implementation of the service request processing apparatus can refer to the implementation of the method described above, and repeated details will not be repeated. The terms "module" or "unit" used below can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0066] Based on the same inventive concept, this invention also proposes a service request processing device, such as... Figure 4 As shown, the device includes:
[0067] The reading module 401 is used to read configuration data from an external configuration center.
[0068] The hierarchical module 402 is used to classify the configuration data into levels according to the hierarchical index of the configuration data, and determine the hierarchical label of the configuration data according to the hierarchical classification result; wherein, the hierarchical index is determined according to the importance, update frequency and usage frequency of the configuration data;
[0069] The determination module 403 is used to determine the caching strategy for each level of configuration data based on the hierarchical labels of the configuration data.
[0070] The caching module 404 is used to cache the configuration data that needs to be cached to the gateway locally according to the caching policy;
[0071] The processing module 405 is used to load and parse the configuration data required for processing the service request from the gateway if the gateway has the configuration data required for processing the service request locally after receiving the service request, and then process the service request.
[0072] In one embodiment of the present invention, the grading index includes an importance index, a change index, and a popularity index; the importance index is determined according to the importance of the configuration data; the change index is determined according to the update frequency of the configuration data; and the popularity index is determined according to the usage frequency of the configuration data.
[0073] In one embodiment of the present invention, the caching strategy includes whether caching is required, the caching duration, whether to force a cache refresh, and whether offline backup is required.
[0074] In one embodiment of the present invention, the cache module 404 is further configured to:
[0075] Back up the configuration data cached locally on the gateway.
[0076] In one embodiment of the present invention, the processing module 405 is further configured to:
[0077] Upon receiving a service request, if the gateway does not have the configuration data required to process the service request locally, it queries the external configuration center.
[0078] If the external configuration center has the configuration data required to process the service request and the external configuration center service is available, read the configuration data required to process the service request from the external configuration center and process the service request.
[0079] If the external configuration center does not have the configuration data required to process the service request or the external configuration center service is unavailable, the service request will fail to respond.
[0080] Figure 5 This is a specific example diagram of the service request processing device in an embodiment of the present invention. For example... Figure 5 As shown, in one embodiment of the present invention, Figure 4 The service request processing apparatus shown also includes:
[0081] The update module 501 is used to update the configuration data required for processing service requests in the gateway's local cache.
[0082] Figure 6 This is a specific example diagram of the service request processing device in an embodiment of the present invention. For example... Figure 6 As shown, in one embodiment of the present invention, Figure 4 The service request processing apparatus shown also includes:
[0083] Adjustment module 601 is used to adjust the hierarchical labels and caching strategies of configuration data according to the status of processing service requests.
[0084] In one embodiment of the present invention, the adjustment module 601 is specifically used for:
[0085] Analyze the status of service request processing to determine the usage frequency and update frequency of the configuration data cached locally on the gateway;
[0086] Adjust the hierarchical labels and caching strategies of the configuration data based on the usage and update frequency of the configuration data cached locally on the gateway.
[0087] Figure 7 This is an example diagram illustrating the service request processing device processing a service request in an embodiment of the present invention. In one embodiment of the present invention, reference is made to... Figure 7The reading module 401 reads configuration data from an external configuration center; the hierarchical module 402 classifies the configuration data into levels based on the hierarchical index and determines the hierarchical labels of the configuration data based on the hierarchical classification results; the determination module 403 determines a caching strategy for each level of configuration data based on the hierarchical labels of the configuration data; the caching module 404 caches the configuration data that needs to be cached to the gateway local according to the caching strategy and backs up the configuration data cached to the gateway local; and the processing module 405, upon receiving a service request, loads and parses the configuration data required to process the service request from the gateway local if the gateway local exists such data. The service request is processed; if the configuration data required to process the service request does not exist locally on the gateway, the external configuration center is queried, and the configuration data required to process the service request is read from the external configuration center. The service request is then processed, and the configuration data required to process the service request read from the external configuration center is synchronously cached locally on the gateway (i.e., proactive configuration data synchronization). The adjustment module 601 adjusts the hierarchical labels and caching strategies of the configuration data according to the status of the service request processing (i.e., gateway operation statistics). The update module 501 updates the configuration data required to process the service request cached locally on the gateway and updates the caching strategy of the backed-up configuration data.
[0088] It should be noted that although several modules of the service request processing apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above can be embodied in a single module. Conversely, the features and functions of a single module described above can be further divided and embodied by multiple modules.
[0089] Based on the aforementioned inventive concept, such as Figure 8 As shown, the present invention also proposes a computer device 800, including a memory 801, a processor 802, and a computer program 803 stored in the memory 801 and executable on the processor 802. When the processor 802 executes the computer program 803, it implements the aforementioned service request processing method.
[0090] Based on the aforementioned inventive concept, the present invention proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned service request processing method.
[0091] Based on the aforementioned inventive concept, the present invention proposes a computer program product, which includes a computer program that, when executed by a processor, implements a service request processing method.
[0092] The service request processing method and apparatus proposed in this invention can solve the problems in the prior art where the gateway relies entirely on an external configuration center to obtain configuration data, resulting in poor gateway availability, network risks, and time overhead, which adversely affects the reliability of the gateway. This invention reads configuration data from an external configuration center; classifies the configuration data into levels based on a classification index; and determines the classification label of the configuration data based on the classification results. The classification index is determined based on the importance, update frequency, and usage frequency of the configuration data. A caching strategy is determined for each level of configuration data based on the classification label. The configuration data that needs to be cached is cached locally on the gateway according to the caching strategy. Upon receiving a service request, if the gateway has the configuration data required to process the service request, it loads and parses the configuration data required to process the service request from the gateway and processes the service request. This invention reduces the gateway's dependence on an external configuration center. A caching strategy is determined for each level of configuration data, and caching the necessary configuration data locally on the gateway according to the caching strategy improves the gateway's availability, ensures stable processing of service requests, reduces network risks and time overhead, and enhances the reliability of gateway service request processing. Furthermore, intervention operations are performed on the configuration data cached locally on the gateway, the hierarchical tags of the configuration data, and the caching strategy to improve the gateway's emergency response capabilities.
[0093] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0096] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0097] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A service request processing method, characterized in that, The method is applied to a gateway, and the method includes: Read configuration data from an external configuration center; The configuration data is classified into different levels based on the classification index, and the classification label of the configuration data is determined based on the classification results; the classification index is determined based on the importance, update frequency and usage frequency of the configuration data. Based on the hierarchical labels of the configuration data, a caching strategy is determined for each level of configuration data; According to the caching strategy, the configuration data that needs to be cached is cached locally on the gateway; Upon receiving a service request, if the gateway has the configuration data required to process the service request locally, it loads and parses the configuration data required to process the service request from the gateway and processes the service request. Upon receiving a service request, if the gateway has the configuration data required to process the service request locally, it loads and parses the configuration data required to process the service request from the gateway. After processing the service request, it also includes: adjusting the hierarchical labels and caching strategies of the configuration data according to the status of the service request. Adjust the hierarchical labels and caching strategies of configuration data, including: analyzing the status of service request processing to determine the usage frequency and update frequency of configuration data cached locally on the gateway; and adjusting the hierarchical labels and caching strategies of configuration data based on the usage frequency and update frequency of configuration data cached locally on the gateway. Record the status of service request processing for summarizing statistical information, including: service request information, service request status, time spent requesting the gateway, time spent requesting the backend service, and response message length; the statistical information after service request processing serves as the basis for adjusting configuration data hierarchical labels and caching strategies. The tiered indices include an importance index, a change index, and a popularity index; the importance of each configuration data point is determined, and the importance of each configuration data point is quantitatively converted into an importance index; the update frequency of configuration data is statistically analyzed to determine the change index; and the usage frequency of configuration data is statistically analyzed to determine the popularity index. Based on the hierarchical labels of the configuration data, a caching strategy is determined for each level of configuration data, including: setting the caching strategy for configuration data with a hierarchical label of D to no caching; setting the caching strategy for configuration data with a hierarchical label of C to require caching, with a caching duration of 100 seconds, mandatory cache refresh after use, and no offline backup required; setting the caching strategy for configuration data with a hierarchical label of B to require caching, with a caching duration of 200 seconds, mandatory cache refresh after use, and offline backup required; and setting the caching strategy for configuration data with a hierarchical label of A to require caching, with a caching duration of 300 seconds, mandatory cache refresh after use, and offline backup required.
2. The method according to claim 1, characterized in that, According to the caching strategy, the configuration data that needs to be cached is cached locally on the gateway, which also includes: Back up the configuration data cached locally on the gateway.
3. The method according to claim 1, characterized in that, Also includes: Upon receiving a service request, if the gateway does not have the configuration data required to process the service request locally, it queries the external configuration center. If the external configuration center has the configuration data required to process the service request and the external configuration center service is available, read the configuration data required to process the service request from the external configuration center and process the service request. If the external configuration center does not have the configuration data required to process the service request or the external configuration center service is unavailable, the service request will fail to respond.
4. The method according to claim 1, characterized in that, Upon receiving a service request, if the gateway possesses the configuration data required to process the service request locally, it loads and parses the configuration data from the gateway, processes the service request, and then includes: Update the configuration data required for processing service requests in the gateway's local cache.
5. A service request processing apparatus, characterized in that, The device is used in a gateway, and the device includes: The read module is used to read configuration data from an external configuration center; The grading module is used to classify the configuration data into grades based on the grading index of the configuration data, and determine the grade label of the configuration data based on the grading results; wherein, the grading index is determined based on the importance, update frequency and usage frequency of the configuration data; The determination module is used to determine the caching strategy for each level of configuration data based on the hierarchical labels of the configuration data. The caching module is used to cache the configuration data that needs to be cached to the gateway locally according to the caching strategy; The processing module is used to load and parse the configuration data required to process the service request from the gateway if the gateway has the configuration data required to process the service request locally after receiving the service request, and then process the service request. It also includes: an adjustment module, used to adjust the hierarchical labels and caching strategies of configuration data according to the status of processing service requests; the adjustment module is specifically used to: analyze the status of processing service requests to determine the usage frequency and update frequency of the configuration data cached locally by the gateway; and adjust the hierarchical labels and caching strategies of configuration data according to the usage frequency and update frequency of the configuration data cached locally by the gateway. The processing module is specifically used to: record service request information, service request status, time spent requesting the gateway, time spent requesting the backend service, and response message length; and use the statistical information after service request processing as the basis for adjusting configuration data hierarchical labels and caching strategies. The tiered indices include an importance index, a change index, and a popularity index; the importance of each configuration data point is determined, and the importance of each configuration data point is quantitatively converted into an importance index; the update frequency of configuration data is statistically analyzed to determine the change index; and the usage frequency of configuration data is statistically analyzed to determine the popularity index. The determination module is used to: set the caching policy for configuration data with a level D rating to no caching required; set the caching policy for configuration data with a level C rating to require caching, with a caching duration of 100 seconds, mandatory cache refresh after use, and no offline backup required; set the caching policy for configuration data with a level B rating to require caching, with a caching duration of 200 seconds, mandatory cache refresh after use, and offline backup required; and set the caching policy for configuration data with a level A rating to require caching, with a caching duration of 300 seconds, mandatory cache refresh after use, and offline backup required.
6. The apparatus according to claim 5, characterized in that, The caching module is also used for: Back up the configuration data cached locally on the gateway.
7. The apparatus according to claim 5, characterized in that, The processing module is also used for: Upon receiving a service request, if the gateway does not have the configuration data required to process the service request locally, it queries the external configuration center. If the external configuration center has the configuration data required to process the service request and the external configuration center service is available, read the configuration data required to process the service request from the external configuration center and process the service request. If the external configuration center does not have the configuration data required to process the service request or the external configuration center service is unavailable, the service request will fail to respond.
8. The apparatus according to claim 5, characterized in that, Also includes: The update module is used to update the configuration data required for processing service requests in the gateway's local cache.
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, it implements the method of any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 4.
11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 4.