Parameter use method, apparatus, device, and medium

CN112948443BActive Publication Date: 2026-06-05CHINA CONSTRUCTION BANK

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2021-03-31
Publication Date
2026-06-05

Smart Images

  • Figure CN112948443B_ABST
    Figure CN112948443B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a parameter use method, device, equipment and medium, and relate to the technical field of automatic programming. The method is applied to a parameter user, and includes the following steps: in the process of executing a target operation, a parameter loading request is sent to a parameter cache server; a target parameter fed back by the parameter cache server according to the parameter loading request is acquired, and the target operation is continuously executed according to the target parameter; wherein the target parameter in the parameter cache server is loaded in a database server of a parameter provider. The above technical solution reduces the access pressure of the parameter user on the application program server and the database server of the parameter provider.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of automatic programming technology, and in particular to a method, apparatus, device and medium for using parameters. Background Technology

[0002] With the accelerated pace of interest rate liberalization and the intensification of financial disintermediation, new financial business models are rapidly evolving under the impetus of internet technology. In fintech business scenarios, access volume often experiences a tenfold or even hundredfold increase. When database servers face massive data access, disk I / O (input / output) often becomes a performance bottleneck. In distributed scenarios with demands for high concurrency, high scalability, and high availability, how to alleviate the access pressure on the parameter provider's application server and database server from parameter users is a pressing issue that needs to be addressed. Summary of the Invention

[0003] This invention provides a method, apparatus, device, and medium for using parameters, thereby reducing the access pressure on the application server and database server of the parameter provider by the parameter user.

[0004] In a first aspect, embodiments of the present invention provide a method for using parameters, applicable to a parameter user, including:

[0005] During the execution of the target operation, a parameter loading request is sent to the parameter caching server;

[0006] The parameter caching server retrieves the target parameters fed back by the parameter loading request, and continues to execute the target operation based on the target parameters; wherein the target parameters in the parameter caching server are loaded from the database server of the parameter provider.

[0007] Secondly, embodiments of the present invention provide a parameter usage method applied to a parameter caching server, comprising:

[0008] Receive parameter loading requests sent by the parameter user during the execution of the target operation;

[0009] In response to the parameter loading request, the parameter user is provided with the target parameters loaded in the database server of the parameter provider, so that the parameter provider can continue to perform the target operation based on the target parameters.

[0010] Thirdly, embodiments of the present invention also provide a parameter using device, applied to a parameter user, comprising:

[0011] The parameter loading request sending module is used to send a parameter loading request to the parameter caching server during the execution of the target operation;

[0012] The parameter loading module is used to obtain the target parameters fed back by the parameter caching server according to the parameter loading request, and to continue to execute the target operation according to the target parameters; wherein, the target parameters in the parameter caching server are loaded from the database server of the parameter provider.

[0013] Fourthly, embodiments of the present invention also provide a parameter usage apparatus, applied to a parameter caching server, comprising:

[0014] The parameter loading request receiving module is used to receive parameter loading requests sent by the parameter user during the execution of the target operation;

[0015] A parameter providing module is used to respond to the parameter loading request by providing the parameter user with target parameters loaded in the database server of the parameter provider, so that the parameter provider can continue to perform the target operation based on the target parameters.

[0016] Fifthly, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a parameter usage method applied to a parameter user as described in any embodiment of the present invention.

[0017] In a sixth aspect, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the parameter usage method applied to a parameter user as described in any embodiment of the present invention.

[0018] In a seventh aspect, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a parameter usage method applied to a parameter caching server as described in any embodiment of the present invention.

[0019] Eighthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the parameter usage method applied to a parameter caching server as described in any embodiment of the present invention.

[0020] The technical solution provided by this invention involves a parameter caching server loading target parameters into the database server of the parameter provider. When the parameter user needs to obtain the target parameters to perform a target operation, the target parameters are loaded into the parameter caching server to perform the target operation. This reduces the access pressure on the parameter user's application server and database server of the parameter provider, and improves the overall availability and reliability of the system. Attached Figure Description

[0021] Figure 1 This is a flowchart of a parameter usage method according to Embodiment 1 of the present invention;

[0022] Figure 2 This is a flowchart of a parameter usage method according to Embodiment 2 of the present invention;

[0023] Figure 3 This is a schematic diagram of the multi-level caching mechanism startup loading process applicable to a parameter usage method in Embodiment 3 of the present invention;

[0024] Figure 4 This is a schematic diagram of a parameter using device according to Embodiment 4 of the present invention;

[0025] Figure 5 This is a schematic diagram of a parameter using device according to Embodiment 5 of the present invention;

[0026] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to Embodiment Six of the present invention. Detailed Implementation

[0027] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0028] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it may also have additional steps not included in the figures. The process may correspond to a method, function, procedure, subroutine, subroutine, etc.

[0029] Example 1

[0030] Figure 1 This is a flowchart of a parameter usage method provided in Embodiment 1 of the present invention. It is applicable to situations where parameters are cached at multiple levels. This method can be executed by a parameter usage device provided in the embodiment of the present invention for the parameter user. This device can be implemented in software and / or hardware and is generally integrated into a computer device.

[0031] A parameter, also called a parameter variable, is a variable. For a specific application, it can be a constant value; in general, it can be a variable used to control other quantities (or events) that change as the parameter changes.

[0032] The parameter user refers to the party that uses the parameter, while the parameter provider refers to the party that provides the parameter; both are application layer concepts.

[0033] like Figure 1 As shown, the parameter usage method provided in this embodiment is applied to the parameter user and specifically includes:

[0034] S110. During the execution of the target operation, a parameter loading request is sent to the parameter cache server.

[0035] A target operation refers to any kind of operation, which can be any procedure. Taking financial transactions as an example, a target operation could be a transfer operation, a withdrawal operation, etc.

[0036] A parameter caching server is a server used to cache parameters. For example, it can be a Redis-based parameter caching server or a cache-based parameter caching server.

[0037] During the execution of the target operation by the parameter user, if it is necessary to read the target parameter (any parameter involved in the target operation), a parameter loading request can be sent to the parameter caching server to retrieve the target parameter from the parameter caching server. The parameter loading request carries unique identification information of the target parameter to be read. Optionally, the target parameter can be a frequently used parameter.

[0038] Optionally, before sending the parameter loading request to the parameter caching server, the method further includes: reading parameter caching configuration information in the configuration center; correspondingly, sending the parameter loading request to the parameter caching server can specifically be: sending the parameter loading request to the parameter caching server according to the parameter caching configuration information.

[0039] The configuration center stores configuration information related to parameter usage methods, such as server IP addresses, port information, and URLs of related services. Optionally, the configuration information stored in the configuration center may include parameter caching configuration information and parameter storage configuration information. Parameter caching configuration information can be used to access a parameter caching server to retrieve relevant parameter values; parameter storage configuration information can be used to access the parameter provider's database server to cache the corresponding parameters. The configuration center's user interface allows users to add and / or modify configuration information.

[0040] After the configuration center starts, the parameter user reads the parameter cache configuration information from the configuration center. When it needs to access the parameter cache server to obtain the target parameter, it accesses the parameter cache server based on the read parameter cache configuration information and sends a parameter loading request to the parameter cache server.

[0041] S120. Obtain the target parameters fed back by the parameter caching server according to the parameter loading request, and continue to execute the target operation according to the target parameters; wherein, the target parameters in the parameter caching server are loaded from the database server of the parameter provider.

[0042] The parameter caching server pre-loads the target parameters in the database server of the parameter provider. When it receives a parameter loading request from the parameter user, it parses the request to determine the target parameters to be returned and then returns the locally cached target parameters to the parameter user. Subsequently, after the parameter user receives the target parameters returned by the parameter caching server, it can continue to execute the target operation based on those parameters.

[0043] During this process, there is no information exchange between the parameter user and the parameter provider. Instead, information is exchanged with the parameter caching server, thereby reducing the access pressure on the parameter provider's application server and database server. Especially when a large number of parameter users correspond to the same parameter provider, setting up the parameter caching server to provide parameters to the users can significantly reduce the access pressure on the parameter provider's application server and database server.

[0044] Optionally, the parameter caching server is a distributed caching server that supports elastic scaling. It can dynamically increase or decrease the number of nodes to cope with changing data access loads. By utilizing the principle of accessing parameters from the nearest point, it can also indirectly improve the overall throughput of the system and meet the requirements of high concurrency, high scalability, and high availability.

[0045] Optionally, before providing the target parameters loaded from the database server of the parameter provider to the parameter user, the parameter caching server reads the parameter storage configuration information from the configuration center and accesses the database server of the parameter provider to load the target parameters based on the parameter storage configuration information.

[0046] After the configuration center starts, the parameter caching server reads the parameter storage configuration information from the configuration center. When it needs to access the database server of the parameter provider to load the target parameters, it accesses the database server of the parameter provider according to the read parameter storage configuration information and loads the target parameters in the database server.

[0047] As an optional implementation, after obtaining the target parameters fed back by the parameter caching server according to the parameter loading request, the method further includes: if the target parameters meet preset conditions, then storing the target parameters in the local cache.

[0048] After obtaining the target parameter, the parameter user determines whether the target parameter meets preset conditions. If yes, the target parameter is cached locally; otherwise, no processing is performed. The preset conditions refer to conditions suitable for local caching, such as the parameter value being a constant value and the parameter usage frequency exceeding a preset threshold.

[0049] As an optional implementation, sending a parameter loading request to the parameter caching server can specifically involve: sending a parameter loading request to the parameter access interface of the parameter caching server; correspondingly, obtaining the target parameter fed back by the parameter caching server can specifically involve: if the parameter loading response fed back by the parameter access interface according to the parameter loading request indicates that the parameter caching server has not stored the target parameter, then waiting for the parameter caching server to load the target parameter from the database server of the parameter provider and then feeding back a parameter loading response again through the parameter access interface; obtaining the target parameter carried in the parameter loading response fed back again through the parameter access interface.

[0050] In this embodiment, the parameter caching server provides a universal parameter access interface that is transparent to all parameter users. It is used to receive parameter loading requests sent by parameter users and respond to the parameter loading requests.

[0051] The parameter user sends a parameter loading request to the parameter access interface of the parameter caching server. After receiving the parameter loading request, the parameter access interface of the parameter caching server parses the parameter loading request, obtains the target parameter that matches the parameter loading request, and generates a parameter loading response carrying the target parameter and sends it back to the parameter user.

[0052] After parsing the parameter loading request, if the parameter caching server cannot find the target parameter matching the parameter loading request in its local cache, it can first send a parameter loading response to the parameter user to indicate that the parameter caching server does not store the target parameter. This instructs the parameter user to wait for the parameter provider's database server to load the parameter. At the same time, the parameter provider's database server is accessed to perform the loading operation on the target parameter, and after the loading is completed, a parameter loading response carrying the target parameter is generated and sent back to the parameter user.

[0053] After receiving the parameter loading response from the parameter caching server, if the parameter loading response indicates that the parameter caching server has not stored the target parameter, the parameter user can wait for the parameter caching server to send another parameter loading response carrying the target parameter.

[0054] Optionally, the parameter access interface supports key-value pair operations.

[0055] The parameter loading request can carry the key value of the parameter to be loaded. The parameter caching server parses the received parameter loading request through the parameter access interface to obtain the key value of the parameter to be loaded. Then, it queries the corresponding value in the local cache based on the key value, or queries the corresponding value in the database server of the parameter provider based on the key value and loads it into the local cache. Finally, it generates a parameter loading response based on the value value and sends it back to the parameter user.

[0056] The cached records in the parameter caching server can be processed through the parameter access interface. Optionally, in response to a cached record processing request, the parameter caching server performs an operation matching the cached record processing request through the parameter access interface; the cached record processing request includes at least: a cached record addition request, a cached record deletion request, a cached record update request, and a cached record query request.

[0057] When responding to a request to add a cached record, the parameter caching server can add one cached record at a time or add multiple cached records in batches, and count the number of newly added cached records. Specifically, the addition of cached records can be processed based on the key and value of the target parameter. Optionally, the expiration time (in milliseconds) of the newly added cached record can also be included. If a cached record matching the request already exists in the parameter caching server, the existing cached record can be overwritten.

[0058] When responding to a cache record deletion request, the parameter caching server can delete one cache record at a time or delete multiple cache records in batches, and count the number of cache records deleted. Specifically, the cache record deletion process can be based on the key value of the target parameter.

[0059] When responding to a cache record update request, the parameter caching server can either add a new value if the parameter key is the same, or replace the original value with the updated value. If adding a new value when the parameter key is the same, the update request can be ignored if a cache record matching both the key and the new value already exists in the caching server. If replacing the original value with the updated value when the parameter key is the same, the update request can also be ignored if no matching cache record exists in the caching server. In the case of replacing the original value with the updated value when the parameter key is the same, the update request can also include the original value. The updated value will only replace the original value if a matching cache record exists in the caching server.

[0060] When responding to a cache record query request, the parameter caching server can query one cache record at a time or multiple cache records in batches, depending on the key value of the target parameter. The cache record query request can be generated based on a parameter loading request received by the parameter caching server.

[0061] In addition, the parameter caching server can also clear all cached records and submit cached record processing requests waiting in the queue to the data persistence layer through the parameter access interface.

[0062] In one alternative implementation, in response to a parameter update request, the parameter caching server evicts cached data in the parameter caching server that matches the parameter update request; after writing the updated parameters that match the parameter update request into the database server of the parameter provider, the updated parameters are loaded into the database server of the parameter provider.

[0063] When updating parameters, a method of first evicting the cache and then writing to the database is adopted. Specifically, when the parameter cache server receives a parameter update request, it first evicts the cached data that matches the parameter to be updated carried in the parameter update request. Then, it waits for the parameter provider's database server to perform the parameter update operation that matches the parameter update request. Only when the parameter user loads the parameter in the parameter cache server will the corresponding updated parameter in the parameter provider's database server be loaded into the local cache.

[0064] In this implementation, the method of first evicting the cache and then writing to the database is adopted, which will not cause inconsistency between the parameter caching server and the database.

[0065] The technical solution provided by this invention involves a parameter caching server loading target parameters into the database server of the parameter provider. When the parameter user needs to obtain the target parameters to perform a target operation, the target parameters are loaded into the parameter caching server to perform the target operation. This reduces the access pressure on the parameter user's application server and database server of the parameter provider, and improves the overall availability and reliability of the system.

[0066] Example 2

[0067] Figure 2 This is a flowchart of a parameter usage method provided in Embodiment 2 of the present invention, which is applicable to the case of multi-level caching of parameters. The method can be executed by the parameter usage device applied to the parameter caching server provided in the embodiment of the present invention. The device can be implemented in software and / or hardware and is generally integrated into a computer device.

[0068] like Figure 2 As shown, the parameter usage method provided in this embodiment is applied to a parameter caching server, and specifically includes:

[0069] S210. Receive a parameter loading request sent by the parameter user during the execution of the target operation.

[0070] Among them, the parameter caching server refers to the server used to cache parameters, such as a Redis-based parameter caching server or a Cache-based parameter caching server.

[0071] Optionally, the parameter caching server is a distributed caching server that supports elastic scaling, and can thus cope with changing data access loads by dynamically increasing or decreasing the number of nodes.

[0072] Optionally, before sending a parameter loading request to the parameter caching server, the parameter user may read the parameter caching configuration information in the configuration center and send the parameter loading request to the parameter caching server according to the parameter caching configuration information.

[0073] S220. In response to the parameter loading request, provide the parameter user with the target parameter loaded in the database server of the parameter provider, so that the parameter provider can continue to perform the target operation according to the target parameter.

[0074] Optionally, before providing the target parameters loaded in the database server of the parameter provider to the parameter user, the method further includes: reading parameter storage configuration information in the configuration center; and accessing the database server of the parameter provider to load the target parameters based on the parameter storage configuration information.

[0075] Optionally, after the parameter user obtains the target parameter fed back by the parameter caching server according to the parameter loading request, if the target parameter meets the preset conditions, the target parameter can be stored in the local cache.

[0076] As an optional implementation, receiving a parameter loading request sent by the parameter user during the execution of a target operation can specifically involve: receiving the parameter loading request sent by the parameter user during the execution of the target operation through a parameter access interface; correspondingly, in response to the parameter loading request, providing the parameter user with the target parameter loaded from the database server of the parameter provider can also specifically involve: if it is determined that the parameter caching server does not store the target parameter, then sending a parameter loading response indicating that the parameter caching server does not store the target parameter to the parameter user through the parameter access interface, and performing the operation of loading the target parameter from the database server of the parameter provider; after completing the loading of the target parameter, sending a parameter loading response carrying the target parameter to the parameter user again through the parameter access interface.

[0077] In this embodiment, the parameter caching server provides a universal parameter access interface that is transparent to all parameter users. It is used to receive parameter loading requests sent by parameter users and respond to the parameter loading requests.

[0078] Optionally, the parameter access interface supports key-value pair operations.

[0079] The parameter loading request can carry the key value of the parameter to be loaded. The parameter caching server parses the received parameter loading request through the parameter access interface to obtain the key value of the parameter to be loaded. Then, it queries the corresponding value in the local cache based on the key value, or queries the corresponding value in the database server of the parameter provider based on the key value and loads it into the local cache. Finally, it generates a parameter loading response based on the value value and sends it back to the parameter user.

[0080] Optionally, in response to a cache record processing request, the parameter caching server performs an operation matching the cache record processing request through a parameter access interface; the cache record processing request includes at least: a cache record addition request, a cache record deletion request, a cache record update request, and a cache record query request.

[0081] Optionally, in response to a parameter update request, the parameter caching server evicts cached data in the parameter caching server that matches the parameter update request; after writing the updated parameters that match the parameter update request into the database server of the parameter provider, the updated parameters are loaded into the database server of the parameter provider.

[0082] For any details not explained in this embodiment, please refer to the foregoing embodiments; they will not be repeated here.

[0083] The technical solution provided by this invention involves a parameter caching server loading target parameters into the database server of the parameter provider. When the parameter user needs to obtain the target parameters to perform a target operation, the target parameters are loaded into the parameter caching server to perform the target operation. This reduces the access pressure on the parameter user's application server and database server of the parameter provider, and improves the overall availability and reliability of the system.

[0084] Example 3

[0085] Figure 3 This is a schematic diagram illustrating the startup loading process of a multi-level caching mechanism applicable to a parameter usage method in Embodiment 3 of the present invention. This embodiment provides a specific implementation method based on the foregoing embodiments.

[0086] Reference Figure 3 The multi-level parameter caching mechanism provided in this embodiment is jointly implemented by the parameter user and the parameter provider. The caching involves multiple levels, including the parameter user's local cache, distributed cache, the parameter provider's local cache, and the parameter provider's database. The distributed cache provides a general processing mode and parameter access interface, freeing the parameter user from concern themselves with the specific implementation logic. This reduces application complexity and alleviates the access pressure on the parameter provider's application server and database server, thereby improving the overall availability and reliability of the system.

[0087] like Figure 3 As shown, the multi-level caching mechanism used in the parameter usage method provided in this embodiment to start the loading process includes:

[0088] S310, The parameter provider database server starts.

[0089] S320, Configuration Center starts.

[0090] The S330 distributed cache server starts and reads the configuration center.

[0091] S340, the distributed cache server loads parameters from the parameter provider database server.

[0092] The S350 and parameter provider application server start and read the configuration center.

[0093] S360, the parameter provider application server loads parameters from the parameter provider database server.

[0094] For parameter providers, loading frequently used parameters into the local cache can reduce the access pressure on the parameter provider's database server.

[0095] S370, the parameter user application server starts and reads the configuration center.

[0096] S380, The application server that uses the parameters loads the parameters on the distributed cache server.

[0097] The parameter loading source for the application server (the parameter user) is the distributed cache server, which in turn loads parameters from the parameter provider's database server. The database server, in turn, loads parameters from other modules, such as batch imports or single-item maintenance from the web management interface. The configuration center stores parameter cache configuration information, which may include parameter cache configuration information and parameter storage configuration information, but does not store any parameter values.

[0098] The distributed caching server provides a generic parameter access interface, which is independent of any specific distributed caching server product and transparent to all parameter users. It receives and responds to parameter loading requests from users. Caching applications developed based on this generic parameter access interface can seamlessly switch between supported distributed caching servers.

[0099] Optionally, the parameter access interface supports key-value pair operations. The parameter access interface can be uniformly encapsulated to support various cache record processing operations, including cache record addition, deletion, update, query, and clearing.

[0100] For any details not explained in this embodiment, please refer to the foregoing embodiments; they will not be repeated here.

[0101] The technical solution provided in this embodiment designs a multi-level parameter caching mechanism for the distributed core, providing a unified cache access interface and communication protocol for the application layer (parameter users and parameter providers). This eliminates the need for the application layer to concern itself with the specific implementation logic, reducing application complexity and alleviating the access pressure on the parameter provider's application server and database server from the parameter users. This improves the overall availability and reliability of the system and lays a solid foundation for the implementation of the distributed core in the financial industry, eliminating the need to rely on third-party products and ensuring complete autonomy and controllability.

[0102] The following will illustrate this with specific application scenarios:

[0103] In scenarios where "a single account cannot make more than N transfers simultaneously," it's necessary to count the number of transfers. Counting is a very heavy workload for the database, requiring querying a large number of rows to arrive at the count. When the data changes, this process needs to be repeated, significantly impacting performance. To address this, a counting service can be designed. The counting results are written to the database and loaded into a distributed cache server. When the data changes, the counting service is called to increment or decrement the count, updating the results in both the database and the distributed cache server. During single-account transfer operations, when the single-account transfer count is needed, it's loaded from the distributed cache server, eliminating the need to access the database or perform statistical analysis through it. This reduces the access pressure on the application server and database server providing the parameters.

[0104] In a "list sorting and pagination" scenario, it's necessary to obtain list data and sort and paginate it. For example, you might need to retrieve the most frequently accessed data in real time for sorting and pagination. In this case, the data structure in the cache is completely different from that in the database. If implemented entirely using the database, all rows would be retrieved based on certain conditions, sorted by a specific field, and then paginated. This approach would severely impact performance when dealing with large datasets or peak transaction volumes. However, in the cache, it's unnecessary to have a key for each row. A Redis list can be used for storage. While the list's length is limited and cannot hold all the data in the database, users or clients often only care about the first few pages, with only tens or hundreds, or at most around a thousand, rows. If the service ID is maintained, the list can easily accommodate this data. Therefore, the already sorted data from the database can be stored in a distributed cache server (Redis). During pagination operations, the data can be directly loaded from the distributed cache server, significantly improving page-turning speed without accessing the database. This reduces the access pressure on the application server and database server providing the parameters. Meanwhile, the background can also asynchronously initialize and refresh the cache through a thread, and save a data timestamp in the distributed cache server. When there is a data update, the cache refresh operation is triggered by an asynchronous task based on the data timestamp in the distributed cache server.

[0105] Example 4

[0106] Figure 4 This is a schematic diagram of a parameter usage device provided in Embodiment 4 of the present invention. It is applicable to situations where parameters are cached at multiple levels. The device can be implemented in software and / or hardware and is generally integrated into computer equipment.

[0107] like Figure 4 As shown, this parameter-using device is applied to the parameter user and specifically includes: a parameter loading request sending module 410 and a parameter loading and using module 420. Among them,

[0108] The parameter loading request sending module 410 is used to send a parameter loading request to the parameter caching server during the execution of the target operation.

[0109] The parameter loading module 420 is used to obtain the target parameters fed back by the parameter caching server according to the parameter loading request, and to continue to execute the target operation according to the target parameters; wherein, the target parameters in the parameter caching server are loaded from the database server of the parameter provider.

[0110] The technical solution provided by this invention involves a parameter caching server loading target parameters into the database server of the parameter provider. When the parameter user needs to obtain the target parameters to perform a target operation, the target parameters are loaded into the parameter caching server to perform the target operation. This reduces the access pressure on the parameter user's application server and database server of the parameter provider, and improves the overall availability and reliability of the system.

[0111] Optionally, the above device further includes: a parameter local cache module, used to store the target parameter in the local cache if the target parameter meets preset conditions after obtaining the target parameter fed back by the parameter cache server according to the parameter loading request.

[0112] Optionally, the above apparatus further includes: a parameter cache configuration information reading module, used to read parameter cache configuration information in the configuration center before sending a parameter loading request to the parameter cache server; correspondingly, the parameter loading request sending module 410 is specifically used to send a parameter loading request to the parameter cache server according to the parameter cache configuration information during the execution of the target operation.

[0113] Optionally, a parameter loading request is sent to the parameter access interface of the parameter caching server; correspondingly, the parameter loading module 420 is specifically used to wait for the parameter caching server to load the target parameter from the database server of the parameter provider and then send back a parameter loading response through the parameter access interface if the parameter loading response fed back through the parameter access interface indicates that the parameter caching server has not stored the target parameter; and to obtain the target parameter carried in the parameter loading response fed back through the parameter access interface.

[0114] Optionally, the parameter access interface supports key-value pair operations.

[0115] Optionally, the parameter caching server is a distributed caching server.

[0116] The parameter usage device described above, applied to the parameter user, can execute the parameter usage method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the parameter usage method applied to the parameter user.

[0117] Example 5

[0118] Figure 5 This is a schematic diagram of a parameter usage device provided in Embodiment 5 of the present invention. It is applicable to situations where parameters are cached at multiple levels. The device can be implemented in software and / or hardware and is generally integrated into computer equipment.

[0119] like Figure 5 As shown, this parameter-using device is applied to a parameter caching server, specifically including: a parameter loading request receiving module 510 and a parameter providing module 520. Among them,

[0120] The parameter loading request receiving module 510 is used to receive parameter loading requests sent by the parameter user during the execution of the target operation;

[0121] The parameter providing module 520 is configured to, in response to the parameter loading request, provide the parameter user with target parameters loaded in the database server of the parameter provider, so that the parameter provider can continue to perform the target operation based on the target parameters.

[0122] The technical solution provided by this invention involves a parameter caching server loading target parameters into the database server of the parameter provider. When the parameter user needs to obtain the target parameters to perform a target operation, the target parameters are loaded into the parameter caching server to perform the target operation. This reduces the access pressure on the parameter user's application server and database server of the parameter provider, and improves the overall availability and reliability of the system.

[0123] Optionally, the above apparatus further includes: a parameter storage configuration information reading and parameter loading module, used to read parameter storage configuration information in the configuration center before providing the target parameter loaded in the database server of the parameter provider to the parameter user; and to access the database server of the parameter provider to load the target parameter according to the parameter storage configuration information.

[0124] Optionally, the parameter loading request receiving module 510 is specifically used to receive a parameter loading request sent by the parameter user during the execution of the target operation through the parameter access interface; correspondingly, the parameter providing module 520 is specifically used to, if it is determined that the parameter caching server does not store the target parameter, send a parameter loading response indicating that the parameter caching server does not store the target parameter to the parameter user through the parameter access interface, and perform the operation of loading the target parameter from the database server of the parameter provider; after completing the loading of the target parameter, send a parameter loading response carrying the target parameter to the parameter user again through the parameter access interface.

[0125] Optionally, the parameter access interface supports key-value pair operations.

[0126] Optionally, the parameter caching server is a distributed caching server.

[0127] Optionally, the above apparatus further includes: a cache record processing module, used to respond to a cache record processing request by performing an operation matching the cache record processing request through a parameter access interface; wherein the cache record processing request includes at least: a cache record addition request, a cache record deletion request, a cache record update request, and a cache record query request.

[0128] Optionally, the above apparatus further includes: a cache data update module, configured to, in response to a parameter update request, evict cache data in the parameter cache server that matches the parameter update request; and, after writing the update parameters that match the parameter update request into the database server of the parameter provider, load the update parameters into the database server of the parameter provider.

[0129] The parameter usage device applied to the parameter caching server described above can execute the parameter usage method applied to the parameter caching server provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the parameter usage method applied to the parameter caching server.

[0130] Example 6

[0131] Figure 6 This is a schematic diagram of the hardware structure of a computer device provided in Embodiment Six of the present invention. Figure 6 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 6 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0132] like Figure 6 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0133] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0134] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0135] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 6 Not shown; usually referred to as a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0136] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0137] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 6As not shown, it can be used in conjunction with computer device 12 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0138] The processing unit 16 executes various functional applications and data processing by running a program stored in the system memory 28. For example, it implements a parameter usage method for a parameter user provided in this embodiment of the invention. That is, when the processing unit executes the program, it performs the following: during the execution of a target operation, it sends a parameter loading request to a parameter caching server; obtains the target parameters fed back by the parameter caching server according to the parameter loading request; and continues to execute the target operation according to the target parameters. The target parameters in the parameter caching server are loaded from the database server of the parameter provider.

[0139] For example, in implementing a parameter usage method for a parameter caching server provided in an embodiment of the present invention, the processing unit executes the program by: receiving a parameter loading request sent by the parameter user during the execution of a target operation; and in response to the parameter loading request, providing the parameter user with target parameters loaded in the database server of the parameter provider, so that the parameter provider can continue to execute the target operation based on the target parameters.

[0140] Example 7

[0141] Embodiment 7 of the present invention provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the program implements a parameter usage method for a parameter user as provided in all embodiments of the present application. Specifically, when executed by a processor, the program implements the following: during the execution of a target operation, sending a parameter loading request to a parameter caching server; obtaining the target parameters fed back by the parameter caching server according to the parameter loading request; and continuing to execute the target operation according to the target parameters. The target parameters in the parameter caching server are loaded from the database server of the parameter provider.

[0142] Alternatively, as provided in the embodiments of the present invention, a parameter usage method applied to a parameter caching server is implemented, that is, when the program is executed by the processor, it implements: receiving a parameter loading request sent by the parameter user during the execution of a target operation; in response to the parameter loading request, providing the parameter user with target parameters loaded in the database server of the parameter provider, so that the parameter provider continues to execute the target operation according to the target parameters.

[0143] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0144] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0145] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0146] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​(such as Java, Smalltalk, C++) and conventional procedural programming languages ​​(such as the "C" language or similar programming languages). The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0147] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for using a parameter, characterized in that, Applied to the users of the parameters, including: Read parameter cache configuration information from the configuration center; During the execution of the target operation, a parameter loading request is sent to the parameter access interface of the parameter cache server according to the parameter cache configuration information; wherein, the target operation includes a transfer operation and a withdrawal operation; the parameter access interface supports key-value pair operations; The parameter caching server retrieves the target parameters fed back by the parameter loading request, and continues to execute the target operation based on the target parameters; wherein the target parameters in the parameter caching server are loaded from the database server of the parameter provider; The step of obtaining the target parameter fed back by the parameter caching server according to the parameter loading request includes: if the parameter loading response fed back by the parameter access interface according to the parameter loading request indicates that the parameter caching server has not stored the target parameter, then waiting for the parameter caching server to load the target parameter in the database server of the parameter provider and then feeding back the parameter loading response again through the parameter access interface; and obtaining the target parameter carried in the parameter loading response fed back again through the parameter access interface.

2. The method according to claim 1, characterized in that, After obtaining the target parameters returned by the parameter caching server based on the parameter loading request, the process further includes: If the target parameter meets the preset conditions, the target parameter is stored in the local cache.

3. The method according to claim 1, characterized in that, The parameter caching server is a distributed caching server.

4. A method for using a parameter, characterized in that, Applied to parameter caching servers, including: The parameter access interface receives parameter loading requests sent by the parameter user during the execution of the target operation; wherein, the target operation includes a transfer operation and a withdrawal operation; the parameter access interface supports key-value pair operations; In response to the parameter loading request, the parameter user is provided with the target parameter loaded in the database server of the parameter provider, so that the parameter provider can continue to perform the target operation based on the target parameter; Before providing the target parameters loaded in the database server of the parameter provider to the parameter user, the method further includes: reading parameter storage configuration information in the configuration center; and accessing the database server of the parameter provider to load the target parameters according to the parameter storage configuration information. Specifically, in response to the parameter loading request, providing the parameter user with the target parameter loaded from the parameter provider's database server includes: if it is determined that the parameter caching server does not store the target parameter, then sending a parameter loading response indicating that the parameter caching server does not store the target parameter to the parameter user through the parameter access interface, and performing the operation of loading the target parameter from the parameter provider's database server; after completing the loading of the target parameter, sending another parameter loading response carrying the target parameter to the parameter user through the parameter access interface.

5. The method according to claim 4, characterized in that, The parameter caching server is a distributed caching server.

6. The method according to claim 4, characterized in that, Also includes: In response to a cache record processing request, an operation matching the cache record processing request is executed through the parameter access interface; wherein, the cache record processing request includes at least: a cache record addition request, a cache record deletion request, a cache record update request, and a cache record query request.

7. The method according to claim 4, characterized in that, Also includes: In response to a parameter update request, cached data in the parameter cache server that matches the parameter update request is evicted; After the update parameters matching the parameter update request are written into the database server of the parameter provider, the update parameters are loaded into the database server of the parameter provider.

8. A parameter using device, characterized in that, Applied to the users of the parameters, including: The parameter cache configuration information reading module is used to read parameter cache configuration information from the configuration center. The parameter loading request sending module is used to send a parameter loading request to the parameter access interface of the parameter cache server according to the parameter cache configuration information during the execution of the target operation; wherein, the target operation includes a transfer operation and a withdrawal operation; the parameter access interface supports key-value pair operations; The parameter loading module is used to obtain the target parameters fed back by the parameter caching server according to the parameter loading request, and to continue to execute the target operation according to the target parameters; wherein, the target parameters in the parameter caching server are loaded from the database server of the parameter provider; Specifically, the parameter loading module is used to: if the parameter loading response fed back through the parameter access interface according to the parameter loading request indicates that the parameter caching server has not stored the target parameter, then wait for the parameter caching server to load the target parameter in the database server of the parameter provider and then feed back the parameter loading response through the parameter access interface again; and obtain the target parameter carried in the parameter loading response fed back through the parameter access interface again.

9. A parameter using device, characterized in that, Applied to parameter caching servers, including: The parameter loading request receiving module is used to receive parameter loading requests sent by the parameter user during the execution of a target operation through a parameter access interface; wherein, the target operation includes a transfer operation and a withdrawal operation; and the parameter access interface supports key-value pair operations. A parameter providing module is used to respond to the parameter loading request by providing the parameter user with target parameters loaded in the database server of the parameter provider, so that the parameter provider can continue to perform the target operation according to the target parameters; The parameter storage configuration information reading and parameter loading module is used to read parameter storage configuration information in the configuration center before providing the target parameter loaded in the database server of the parameter provider to the parameter user; and to access the database server of the parameter provider to load the target parameter according to the parameter storage configuration information. Specifically, the parameter providing module is used to: if it is determined that the parameter caching server does not store the target parameter, then send a parameter loading response indicating that the parameter caching server does not store the target parameter to the parameter user through the parameter access interface, and perform the operation of loading the target parameter in the database server of the parameter provider; after the target parameter loading is completed, send another parameter loading response carrying the target parameter to the parameter user through the parameter access interface.

10. 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 program, it implements the method as described in any one of claims 1-3, or the method as described in any one of claims 4-7.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-3, or the method as described in any one of claims 4-7.