Configuration information loading method, device and equipment

By splitting and deduplication of the configuration information in the data source and storing it in the preset storage middleware, the problem of slow loading configuration information and storage redundancy of the application is solved, and faster loading of configuration information and lower storage redundancy is achieved.

CN115529237BActive Publication Date: 2025-03-18AGRICULTURAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211220910.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-08
Publication Date
2025-03-18
Estimated Expiration
2042-10-08

AI Technical Summary

Technical Problem

In the prior art, the application is slow to load configuration information and the configuration information storage redundant.

Method used

After pre-split and deduplication of the configuration information in the data source, it is stored in the preset storage middleware. When the application loads configuration information, it selects a number of configuration information corresponding to the configuration information requirements from the preset storage middleware, and splices it and feeds it back to the application.

Benefits of technology

Improves the speed of the application loading configuration information and reduces the storage redundancy of configuration information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115529237B_ABST
    Figure CN115529237B_ABST
Patent Text Reader

Abstract

The present invention provides a configuration information loading method, device and equipment, the method comprising: obtaining a configuration information acquisition instruction carrying configuration information requirements sent by an application; obtaining multiple first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, the first configuration information being the configuration information obtained after splitting and deduplicating the second configuration information obtained from the preset data source; splicing multiple first configuration information corresponding to the configuration information requirements to obtain a splicing result; and feeding back the splicing result to the application. In this way, the speed of the application loading configuration information is improved and the storage redundancy of the configuration information is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of configuration information loading, and in particular to a configuration information loading method, device and equipment. Background Art

[0002] With the rapid development of Internet applications, users have higher and higher requirements for the response speed of applications, which in turn requires applications to improve the speed of loading configuration information. At present, the speed of loading configuration information by applications is improved by first loading the configuration information in the data source into a preset storage middleware, such as redis (Remote Dictionary Server), and then the application obtains the configuration information from the preset storage middleware.

[0003] Since applications with different functions may use similar configuration information, that is, there are common parts and different parts between the configuration information used by each application, a configuration template corresponding to the same configuration information of each application is currently generated in advance, and the configuration template is stored in the data source. Subsequently, after the application is connected to the data source, the configuration template in the data source is modified to obtain configuration information that meets its personalized configuration needs. Then, the configuration information is stored in the data source and loaded into the preset storage middleware. Finally, the configuration information is obtained from the preset storage middleware.

[0004] However, in the prior art, there are problems such as slow speed of loading configuration information by the application and redundant storage of configuration information. Summary of the invention

[0005] In order to solve the problems of slow speed of application loading configuration information and redundant storage of configuration information in the prior art, the present invention provides a configuration information loading method, device and equipment, which has the characteristics of being able to improve the speed of application loading configuration information and the redundant storage of configuration information

[0006] The following is the specific technical solution of the present invention:

[0007] The present invention provides a configuration information loading method, comprising:

[0008] Obtaining a configuration information acquisition instruction sent by an application; the configuration information acquisition instruction carries a configuration information requirement;

[0009] Acquire multiple pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, which is the configuration information obtained after splitting and deduplicating the second configuration information acquired from the preset data source;

[0010] splicing the multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result;

[0011] The splicing result is fed back to the application.

[0012] Furthermore, the second configuration information is split according to a preset splitting rule;

[0013] The acquiring, from the preset storage middleware, a plurality of first configuration information corresponding to the configuration information requirement may specifically include:

[0014] Splitting the configuration information requirement based on the preset splitting rule;

[0015] Generating, according to the split configuration information requirements, configuration information screening conditions corresponding to the multiple pieces of first configuration information corresponding to the configuration information requirements;

[0016] According to the configuration information screening condition, determining whether the plurality of first configuration information corresponding to the configuration information requirement is stored in the preset storage middleware;

[0017] If so, obtaining the plurality of first configuration information corresponding to the configuration information requirement from the preset storage middleware;

[0018] If not, then based on the configuration information carried in the configuration information acquisition instruction, generate the target first configuration information missing in the preset storage middleware; the target first configuration information is the configuration information indicated by the split configuration information requirement;

[0019] Loading the target first configuration information into the preset storage middleware;

[0020] The multiple pieces of first configuration information corresponding to the configuration information requirements are obtained from a preset storage middleware.

[0021] Furthermore, after generating the target first configuration information missing in the preset storage middleware, the method may further include:

[0022] The target first configuration information is loaded into the preset data source.

[0023] Furthermore, the method may also include:

[0024] Calculating the modification frequency of each item of configuration information stored in the preset storage middleware within a preset time period;

[0025] Determine the loading time interval of each configuration information stored in the preset storage middleware according to the modification frequency; the higher the modification frequency, the shorter the loading time interval corresponding to the modification frequency;

[0026] According to the loading time interval, the configuration information corresponding to the loading time interval in the preset storage middleware is updated regularly.

[0027] Furthermore, determining the loading time interval of each configuration information stored in the preset storage middleware according to the modification frequency may specifically include:

[0028] For any item of configuration information, obtaining a preset priority and a modification frequency of the configuration information;

[0029] Summing the preset priority and the modification frequency to obtain a target priority of the configuration information;

[0030] A loading time interval corresponding to the target priority is obtained to obtain the loading time interval of the configuration information.

[0031] Furthermore, after obtaining multiple pieces of first configuration information corresponding to the configuration information requirement from the preset storage middleware, the method may further include:

[0032] Generate the acquisition time of the multiple first configuration information corresponding to the configuration information requirements;

[0033] The expiration times of the multiple first configuration information corresponding to the configuration information requirements are generated according to the acquisition time and the preset expiration rule; the expiration time is used to reflect the time when the first configuration information corresponding to the expiration time is deleted from the preset storage middleware.

[0034] Furthermore, the method may also include:

[0035] Selecting a preset amount of configuration information from the preset storage middleware at a regular interval;

[0036] Obtaining the expiration time of the preset amount of configuration information;

[0037] Determining expired configuration information among the preset number of configuration information according to the expiration time of the preset number of configuration information;

[0038] The expired configuration information is deleted from the preset storage middleware.

[0039] Based on a general inventive concept, the present invention also provides a configuration information loading device, comprising:

[0040] An instruction acquisition module is used to acquire a configuration information acquisition instruction sent by an application; the configuration information acquisition instruction carries a configuration information requirement;

[0041] A configuration information acquisition module, used to acquire multiple pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, which is the configuration information obtained after splitting and deduplicating the second configuration information acquired from the preset data source;

[0042] A configuration information splicing module, used for splicing the multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result;

[0043] A result feedback module is used to feed back the splicing result to the application.

[0044] Furthermore, the device may also include:

[0045] A modification frequency calculation module, used to calculate the modification frequency of each configuration information stored in the preset storage middleware within a preset time period;

[0046] A loading time interval determination module, used to determine the loading time interval of each configuration information stored in the preset storage middleware according to the modification frequency; the higher the modification frequency, the shorter the loading time interval corresponding to the modification frequency;

[0047] The configuration information updating module is used to regularly update the configuration information corresponding to the loading time interval in the preset storage middleware according to the loading time interval.

[0048] Based on a general inventive concept, the present invention further provides a configuration information loading device, characterized in that it includes:

[0049] at least one processor; and,

[0050] a memory communicatively connected to the at least one processor; wherein,

[0051] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0052] Obtaining a configuration information acquisition instruction sent by an application; the configuration information acquisition instruction carries a configuration information requirement;

[0053] Acquire multiple pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, which is the configuration information obtained after splitting and deduplicating the second configuration information acquired from the preset data source;

[0054] splicing the multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result;

[0055] The splicing result is fed back to the application.

[0056] The present invention adopts the above technical solution and has the following beneficial effects:

[0057] The configuration information in the data source is pre-split and deduplicated, and then stored in the preset storage middleware. Subsequently, when the application needs to load configuration information, multiple pieces of configuration information corresponding to the configuration information requirements of the application are selected from the preset storage middleware according to the configuration information requirements of the application, and then the selected multiple pieces of configuration information corresponding to the configuration information requirements of the application are spliced, and the spliced ​​configuration information is fed back to the application. In this way, it is avoided that every time an application needs to load personalized configuration information, it needs to connect to the data source, and obtain the configuration information that meets the configuration requirements of the current application by modifying the configuration information in the data source, so that the present application can increase the speed of the application loading configuration information; and, in the present application, by storing the split and deduplicated configuration information in the preset storage middleware, compared with the prior art in which configuration information that meets the configuration requirements of multiple applications is stored in the data source and the preset storage middleware, the present application reduces the storage redundancy of the configuration information. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0059] Figure 1 It is a schematic diagram of an application scenario of a configuration information loading method provided by an embodiment of the present invention;

[0060] Figure 2 It is a flowchart of a configuration information loading method provided by an embodiment of the present invention;

[0061] Figure 3 is a structural diagram of a configuration information loading device provided by an embodiment of the present invention;

[0062] Figure 4 It is a structural diagram of a configuration information loading device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] Figure 1 Schematic diagram of an application scenario of a configuration information loading method provided by an embodiment of the present invention. Figure 1 As shown, the configuration information loading method of the embodiment of the present invention may include two stages, namely, a configuration information storage stage and a configuration information loading stage. In the configuration information storage stage, first, the configuration information loading device 11 obtains the configuration information from at least one data source 12, splits and deduplicates the obtained configuration information, and then stores the split and deduplicated configuration information in the preset storage middleware 111. In the configuration information loading stage, after the configuration information loading device 11 obtains the configuration information acquisition instruction carrying the configuration information requirement sent by the application 13, it parses the configuration information acquisition instruction to obtain the configuration information requirement, and selects the configuration information corresponding to the configuration information requirement from the preset storage middleware, and then splices the configuration information corresponding to the configuration information requirement, and feeds back the splicing result to the application, so that the application obtains the configuration information that meets its configuration requirement, and completes the process of the application loading the configuration information.

[0065] Next, a configuration information loading method provided in an embodiment of the specification will be specifically described in conjunction with the accompanying drawings:

[0066] Figure 2 1 is a flow chart of a configuration information loading method provided by an embodiment of the present invention. From the perspective of the device, the execution subject of the method may be a computer device, and from the perspective of the program, the execution subject of the method may be a computer program for loading configuration information installed on the computer device. Figure 2 As shown, the configuration information loading method provided by the embodiment of the present invention includes:

[0067] Step 201: Obtain a configuration information acquisition instruction sent by an application; the configuration information acquisition instruction carries configuration information requirements.

[0068] In the embodiments of this specification, the configuration information is parameter information used to control the running state of the application or the internal logic of the application, such as a restrictive list table, a province information table, and an operator number segment table. The configuration information is stored in the database of the data source. Since the traditional database cluster uses a disk to store data, there is a certain I / O bottleneck, which makes it difficult for the application to load the configuration information directly from the data source. There is a problem of slow loading of the configuration information. Based on this, at present, the configuration information is mostly pre-loaded into a preset storage middleware (such as redis), and then the application loads the required configuration information from the preset storage middleware. Since the preset storage middleware has the advantage of fast information loading speed, this method improves the loading speed of the configuration information.

[0069] In the embodiment of this specification, after obtaining the configuration information acquisition instruction sent by the application, the configuration information acquisition instruction is parsed to obtain the configuration information requirements of the application, and then the configuration information can be selected in the preset storage middleware according to the configuration information requirements.

[0070] Step 202: Obtain multiple first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, which is the configuration information obtained after splitting and deduplicating the second configuration information obtained from the preset data source.

[0071] In the embodiment of the present specification, the configuration information in the data source is stored in advance to the preset storage middleware, and subsequently, the application can load the configuration information through the preset storage middleware. In the process of pre-storing the configuration information in the data source to the preset storage middleware, first, the second configuration information is obtained from the preset data source. The second configuration information can be any configuration information stored in the preset data source. The second configuration information can be composed of multiple sub-configuration information. For example, the identity information of a user can include name, gender and age. Then, the identity information of the user is a second configuration information, and the name, gender and age are each a sub-configuration information. In practical applications, there are often repeated sub-configuration information between each second configuration information. Therefore, after splitting the second configuration information, if there is repeated sub-configuration information between each sub-configuration information obtained, it is necessary to perform deduplication processing on each sub-configuration information, and finally obtain the first configuration information; if there is no repeated sub-configuration information between each sub-configuration information, then after splitting the second configuration information, the first configuration information is directly obtained. Finally, the first configuration information is stored in the preset storage middleware. Specifically, multiple first configuration information can be stored in multiple memory storage devices of the preset storage middleware, and the first configuration information corresponds to the memory storage device one by one.

[0072] Subsequently, after obtaining the configuration information acquisition instruction carrying the configuration information requirement sent by the application, the configuration information acquisition instruction is parsed to obtain the configuration information requirement. The configuration information requirement may be a requirement that directly indicates each first configuration information required by the application. Thus, after obtaining the configuration information requirement, multiple first configuration information corresponding to the configuration information requirement may be directly selected from the preset storage middleware based on the configuration information requirement. Secondly, the configuration information requirement may also be a requirement that indicates the target configuration information required by the application, wherein the target configuration information is configuration information synthesized from multiple first configuration information. Thus, the configuration information requirement may first be split according to each first configuration information in the preset storage middleware, and then, based on the split configuration information requirement, multiple first configuration information corresponding to the configuration information requirement may be selected from the preset storage middleware.

[0073] Step 203: splicing the multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result.

[0074] In the embodiments of this specification, if the configuration information requirement is a requirement for directly indicating various first configuration information required by the application, the configuration information acquisition instruction may carry a splicing rule, and after acquiring multiple first configuration information corresponding to the configuration information requirement, the acquired first configuration information may be spliced ​​according to the splicing rule. Secondly, if the configuration information requirement is a requirement for indicating target configuration information required by the application, after acquiring multiple first configuration information corresponding to the configuration information requirement, the acquired first configuration information may be directly spliced ​​into the target configuration information.

[0075] Step 204: Feedback the splicing result to the application.

[0076] In the embodiment of this specification, the splicing result carries configuration information that meets the configuration requirements of the application program.

[0077] The embodiments of this specification adopt the above-mentioned technical solution, by pre-splitting and deduplicating the configuration information in the data source, and then storing it in the preset storage middleware. Subsequently, when the application needs to load configuration information, according to the configuration information requirements of the application, multiple pieces of configuration information corresponding to the configuration information requirements of the application are selected from the preset storage middleware, and then the selected multiple pieces of configuration information corresponding to the configuration information requirements of the application are spliced, and the spliced ​​configuration information is fed back to the application. In this way, it is avoided that every time an application needs to load personalized configuration information, it needs to connect to the data source, and obtain the configuration information that meets the configuration requirements of the current application by modifying the configuration information in the data source, so that the present application can increase the speed of the application loading configuration information; and, in the present application, by storing the split and deduplicated configuration information in the preset storage middleware, compared with the prior art in which configuration information that meets the configuration requirements of multiple applications is stored in the data source and the preset storage middleware, the present application reduces the storage redundancy of the configuration information.

[0078] Furthermore, the second configuration information is split according to a preset splitting rule.

[0079] Step 202: Acquiring multiple pieces of first configuration information corresponding to the configuration information requirement from the preset storage middleware may specifically include:

[0080] The configuration information requirements are split based on the preset splitting rule.

[0081] According to the split configuration information requirements, configuration information screening conditions corresponding to the multiple pieces of first configuration information corresponding to the configuration information requirements are generated.

[0082] According to the configuration information screening condition, it is determined whether the plurality of first configuration information corresponding to the configuration information requirement is stored in the preset storage middleware.

[0083] If so, the multiple pieces of first configuration information corresponding to the configuration information requirements are obtained from the preset storage middleware.

[0084] If not, then based on the configuration information carried in the configuration information acquisition instruction, the target first configuration information missing in the preset storage middleware is generated; the target first configuration information is the configuration information indicated by the split configuration information requirement.

[0085] The target first configuration information is loaded into the preset storage middleware.

[0086] The multiple pieces of first configuration information corresponding to the configuration information requirements are obtained from a preset storage middleware.

[0087] In the embodiments of this specification, the second configuration information in the preset data source is pre-split and stored, wherein the second configuration information is split according to a preset splitting rule, and the preset splitting rule can be set by a person skilled in the art according to actual needs. Subsequently, if the acquired configuration information requirement is a requirement for indicating the target configuration information required by the application, the configuration information requirement can be split based on the preset splitting rule so that the split configuration information requirement corresponds to the first configuration information, and the first configuration information can be successfully selected according to the split configuration information requirement.

[0088] In the embodiments of this specification, the same configuration information may be used between applications with different functions, and the same configuration information is defined as public configuration information. In addition to the public configuration information, in order to achieve different functions, each application will also use personalized configuration information, that is, the configuration information required by the application includes public configuration information and personalized configuration information. Based on this, in order to improve the success rate of the application loading configuration information, the configuration information acquisition instruction can carry personalized configuration information, so that when the personalized configuration information is not stored in the preset storage middleware, the personalized configuration information is loaded into the preset storage middleware, so that the first configuration information required by the application can be obtained from the preset storage middleware, and after splicing the first configuration information, the splicing result is fed back to the application, so that the application successfully loads the configuration information it needs.

[0089] In order to explain the above scheme more clearly, an example is given below.

[0090] In a specific example, it is assumed that six items of first configuration information, namely A, B, C, D, E and F, are stored in the preset storage middleware. The configuration information requirement indicates that the application needs to load the configuration information synthesized by A, B and H, and the H carried in the configuration information acquisition instruction, that is, H is the personalized configuration information of the application. In the process of obtaining the multiple items of first configuration information corresponding to the configuration information requirements from the preset storage middleware, firstly, the configuration information screening conditions corresponding to A, B and H respectively can be obtained by splitting the configuration information requirements, and then, according to the configuration information screening conditions, the preset storage middleware is screened, and the screening result indicates that A and B are stored in the preset storage middleware, but H is not stored. Then, H carried in the configuration information acquisition instruction is loaded into the preset storage middleware, and finally, A, B and H are obtained from the preset storage middleware to obtain multiple items of first configuration information corresponding to the configuration information requirements.

[0091] In another specific example, assume that six items of first configuration information A, B, C, D, E and F are stored in the preset storage middleware. The configuration information requirement indicates that the application needs to load the configuration information synthesized by A, B and D, and the D carried in the configuration information acquisition instruction, that is, D, is the personalized configuration information of the application. In the process of obtaining the multiple items of first configuration information corresponding to the configuration information requirements from the preset storage middleware, firstly, the configuration information filtering conditions corresponding to A, B and D respectively can be obtained by splitting the configuration information requirements, and then, the configuration information filtering conditions are filtered in the preset storage middleware according to the configuration information filtering conditions. The filtering result indicates that A, B and D are stored in the preset storage middleware. Therefore, A, B and D are directly obtained from the preset storage middleware to obtain the multiple items of first configuration information corresponding to the configuration information requirements.

[0092] In another specific example, assume that six items of first configuration information, namely A, B, C, D, E and F, are stored in the preset storage middleware. The configuration information requirement indicates that the application needs to load the configuration information synthesized by A, B and D, and the configuration information acquisition instruction does not carry any configuration information. In the process of obtaining the multiple items of first configuration information corresponding to the configuration information requirements from the preset storage middleware, firstly, the configuration information filtering conditions corresponding to A, B and D respectively can be obtained by splitting the configuration information requirements, and then, the configuration information filtering conditions are filtered in the preset storage middleware according to the configuration information filtering conditions. The filtering result indicates that A, B and D are stored in the preset storage middleware. Therefore, A, B and D are directly obtained from the preset storage middleware to obtain the multiple items of first configuration information corresponding to the configuration information requirements.

[0093] Further, after generating the target first configuration information missing in the preset storage middleware, the method of the embodiment of this specification may further include:

[0094] The target first configuration information is loaded into the preset data source.

[0095] In an embodiment of the present specification, if one or more items of first configuration information required by an application are not stored in the preset storage middleware, one or more items of first configuration information required by the application may not be stored in the preset data source. In order to ensure the real-time nature of the data in the preset data source, after generating one or more items of first configuration information required by the application, the one or more items of first configuration information may be loaded into the preset data source.

[0096] Furthermore, after step 201: obtaining the configuration information obtaining instruction sent by the application, the method of the embodiment of this specification may further include:

[0097] Determine whether the configuration information acquisition instruction is valid.

[0098] If the configuration information acquisition instruction is invalid, a prompt message is fed back to the application; the prompt message is used to prompt that the configuration information acquisition instruction is invalid.

[0099] If the configuration information acquisition instruction is valid, multiple pieces of first configuration information corresponding to the configuration information requirement are acquired from the preset storage middleware.

[0100] In the embodiments of the present specification, the configuration information in the preset data source may be modified. In order to ensure that the configuration information in the preset data source is consistent with the configuration information in the preset storage middleware and to avoid the application program obtaining erroneous configuration information (i.e., configuration information that is inconsistent with the configuration information in the preset data source) from the preset storage middleware, it is necessary to periodically update the configuration information in the preset storage middleware.

[0101] At present, the existing technology adopts a solution of regularly updating all configuration information in the preset storage middleware. However, in actual application, different configuration information often has different modification frequencies. In order to ensure the real-time performance of the configuration information in the preset storage middleware, a higher update frequency needs to be set, which causes a large amount of configuration information that has not been modified to be updated, resulting in a waste of computer resources and an increase in the update cost of the configuration information. If a lower update frequency is set in order to reduce the update cost, the modified configuration information may not be updated, resulting in inconsistency between the configuration information in the preset storage middleware and the configuration information in the preset data source.

[0102] In order to solve the problem in the prior art that it is difficult to balance the configuration information update cost and the real-time performance of the configuration information in the preset storage middleware, the method of the embodiment of this specification may further include:

[0103] The modification frequency of each item of configuration information stored in the preset storage middleware within a preset time period is calculated.

[0104] According to the modification frequency, a loading time interval of each configuration information stored in the preset storage middleware is determined; the higher the modification frequency is, the shorter the loading time interval corresponding to the modification frequency is.

[0105] According to the loading time interval, the configuration information corresponding to the loading time interval in the preset storage middleware is updated regularly.

[0106] In order to more clearly illustrate the above technical solution, an example is given below.

[0107] In a specific example, the modification frequency of each configuration information stored in the preset storage middleware within the last day from the current moment is calculated. For example, if the current moment is 24:00 on September 23, 2022, then the modification frequency of each configuration information between 24:00 on September 22, 2022 and 24:00 on September 23, 2022 is calculated. Then, according to the modification frequency of each configuration information, the loading time interval of each configuration information is determined. The specific determination method can be set by those skilled in the art according to actual needs, as long as it can meet the requirement that the higher the modification frequency, the shorter the loading time interval corresponding to the modification frequency. Finally, according to the loading time interval, the configuration information corresponding to the loading time interval in the preset storage middleware is regularly updated.

[0108] Furthermore, in order to ensure that the configuration information loading time interval always matches the actual modification frequency of the configuration information, the above scheme can be used to regularly update the configuration information loading time interval. Exemplarily, at 24:00 every day, the modification frequency of the current configuration information can be counted, and the configuration information loading time interval can be determined based on the modification frequency. The loading time interval will be used as the configuration information update time interval on the next day.

[0109] Furthermore, determining the loading time interval of each configuration information stored in the preset storage middleware according to the modification frequency may specifically include:

[0110] For any item of configuration information, obtain the preset priority and the modification frequency of the configuration information.

[0111] The preset priority and the modification frequency are summed to obtain the target priority of the configuration information.

[0112] A loading time interval corresponding to the target priority is obtained to obtain the loading time interval of the configuration information.

[0113] In the embodiment of this specification, the preset priority of each configuration information can be manually set in advance. Subsequently, after the modification frequency of each configuration information within the preset time period is obtained, the preset priority and modification frequency corresponding to the same configuration information are summed to obtain the target priority of the configuration information, wherein the unit of the modification frequency can be times / day. And, the embodiment of this specification pre-sets the loading time interval corresponding to each priority, and the higher the priority, the shorter the loading time interval corresponding to the priority. Exemplarily, when the priority is greater than 1 and less than or equal to 5, the loading time interval corresponding to the priority is 5 hours; when the priority is greater than 5 and less than or equal to 10, the loading time interval corresponding to the priority is 4 hours; when the priority is greater than 10 and less than or equal to 15, the loading time interval corresponding to the priority is 3 hours, etc. Further, after obtaining the target priority of a certain configuration information, the loading time interval corresponding to the target priority can be obtained according to the relationship between the preset priority and the loading time interval, that is, the loading time interval of the configuration information is obtained. Based on this, the scheme meets the needs of users to actively intervene in the loading time interval of configuration information by supporting users to pre-set the preset priority of configuration information.

[0114] In the embodiments of the present specification, the frequencies with which each configuration information in the preset storage middleware is acquired by the application program are also different. Some configuration information has not been acquired by the external application program for a long period of time. If it is stored in the preset storage middleware all the time, storage redundancy will be generated in the preset storage middleware, and the preset storage middleware with limited storage space will not be able to store more configuration information that is acquired by the external application program at a higher frequency.

[0115] Based on this, after obtaining multiple pieces of first configuration information corresponding to the configuration information requirement from the preset storage middleware, the method of the embodiment of this specification may further include:

[0116] Generate the multiple acquisition times of the first configuration information corresponding to the configuration information requirements.

[0117] The expiration times of the multiple first configuration information corresponding to the configuration information requirements are generated according to the acquisition time and the preset expiration rule; the expiration time is used to reflect the time when the first configuration information corresponding to the expiration time is deleted from the preset storage middleware.

[0118] In order to more clearly illustrate the above technical solution, a detailed description is given below.

[0119] In a specific example, at 12:00 on September 23, 2022, the application program obtains configuration information A, B, and C from the preset storage middleware. Therefore, the acquisition time of configuration information A, B, and C is 12:00 on September 23, 2022. The preset expiration rule may define that the configuration information expires after 12 hours. Therefore, according to the acquisition time and the preset expiration rule, the expiration time of configuration information A, B, and C is calculated to be 12:00 on September 24, 2022. Subsequently, if configuration information A, B, and C are not obtained again by the application program during the period between 12:00 on September 23, 2022 and 12:00 on September 24, 2022, configuration information A, B, and C are deleted from the preset storage middleware at 12:00 on September 24, 2022. However, if any configuration information is obtained by the application again between 12:00 on September 23, 2022 and 12:00 on September 24, 2022, and assuming that configuration information A is obtained by the application again at 24:00 on September 23, 2022, the expiration time of the updated configuration information A will be 24:00 on September 24, 2022. Finally, at 12:00 on September 24, 2022, configuration information B and C will be deleted from the preset storage middleware; at 24:00 on September 24, 2022, configuration information A will be deleted from the preset storage middleware.

[0120] In the embodiments of this specification, each first configuration information is stored in a corresponding memory storage device, and each memory storage device is connected to a corresponding timer, that is, the memory storage device can correspond to the timer one by one, and then the acquisition time of the first configuration information in the corresponding memory storage device can be obtained through the timer.

[0121] Furthermore, the method of the embodiment of this specification may also include:

[0122] A preset amount of configuration information is periodically selected from the preset storage middleware.

[0123] Obtain the expiration time of the preset amount of configuration information.

[0124] According to the expiration time of the preset number of configuration information, expired configuration information among the preset number of configuration information is determined.

[0125] The expired configuration information is deleted from the preset storage middleware.

[0126] In the embodiments of the present specification, the configuration information in the preset storage middleware can be deleted at regular intervals. In the specific deletion process, part of the configuration information in the preset storage middleware can be randomly selected, or part of the configuration information in the preset storage middleware can be selected according to a preset selection rule, for example, based on the time when each configuration information is loaded into the preset storage middleware, the K items of configuration information first loaded into the preset storage middleware are selected. Then, the expired configuration information in the part of the configuration information is deleted from the preset storage middleware. In this way, compared to the solution of selecting expired configuration information from all the configuration information in the preset storage middleware, this solution can avoid occupying too many CPU resources, and at the same time avoid too much expired configuration information occupying the storage resources of the preset storage middleware.

[0127] In the embodiments of the present specification, the preset storage middleware may also store unsplit third configuration information in the preset data source. Thus, if the configuration information that the application needs to obtain is the configuration information stored in the data source, the configuration information may be directly obtained from the preset storage middleware. If the configuration information is not stored in the preset storage middleware, the configuration information in the preset data source may be loaded into the preset storage middleware, and then the configuration information may be obtained from the preset storage middleware and sent directly to the application.

[0128] Based on a general inventive concept, an embodiment of this specification also provides a configuration information loading device. Figure 3 Schematic diagram of an application scenario of a configuration information loading device provided in an embodiment of this specification. Figure 3 As shown, the configuration information loading device of the embodiment of this specification includes: an instruction acquisition module 31, a configuration information acquisition module 32, a configuration information splicing module 33 and a result feedback module 34.

[0129] The instruction acquisition module 31 is used to acquire the configuration information acquisition instruction sent by the application; the configuration information acquisition instruction carries the configuration information requirement.

[0130] The configuration information acquisition module 32 is used to obtain multiple first configuration information corresponding to the configuration information requirements from the preset storage middleware; the preset storage middleware stores the first configuration information, and the first configuration information is the configuration information obtained after splitting and deduplicating the second configuration information obtained from the preset data source.

[0131] The configuration information splicing module 33 is used to splice the multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result.

[0132] The result feedback module 34 is used to feed back the splicing result to the application.

[0133] Furthermore, the second configuration information is split according to a preset splitting rule.

[0134] The configuration information acquisition module 32 can be specifically used for:

[0135] The configuration information requirements are split based on the preset splitting rule.

[0136] According to the split configuration information requirements, configuration information screening conditions corresponding to the multiple pieces of first configuration information corresponding to the configuration information requirements are generated.

[0137] According to the configuration information screening condition, it is determined whether the plurality of first configuration information corresponding to the configuration information requirement is stored in the preset storage middleware.

[0138] If the preset storage middleware stores the multiple pieces of first configuration information corresponding to the configuration information requirement, the multiple pieces of first configuration information corresponding to the configuration information requirement are acquired from the preset storage middleware.

[0139] If the preset storage middleware does not store any of the multiple first configuration information corresponding to the configuration information requirement, then based on the configuration information carried in the configuration information acquisition instruction, the target first configuration information missing in the preset storage middleware is generated; the target first configuration information is the configuration information indicated by the split configuration information requirement.

[0140] The target first configuration information is loaded into the preset storage middleware.

[0141] The multiple pieces of first configuration information corresponding to the configuration information requirements are obtained from a preset storage middleware.

[0142] Furthermore, the device of the embodiment of this specification may also include:

[0143] A data source updating module is used to load the target first configuration information into the preset data source.

[0144] Furthermore, the device of the embodiment of this specification may also include:

[0145] The modification frequency calculation module is used to calculate the modification frequency of each configuration information stored in the preset storage middleware within a preset time period.

[0146] The loading time interval determination module is used to determine the loading time interval of each configuration information stored in the preset storage middleware according to the modification frequency; the higher the modification frequency, the shorter the loading time interval corresponding to the modification frequency.

[0147] The configuration information updating module is used to regularly update the configuration information corresponding to the loading time interval in the preset storage middleware according to the loading time interval.

[0148] Furthermore, the loading time interval determination module can be specifically used for:

[0149] For any item of configuration information, obtain the preset priority and the modification frequency of the configuration information.

[0150] The preset priority and the modification frequency are summed to obtain the target priority of the configuration information.

[0151] A loading time interval corresponding to the target priority is obtained to obtain the loading time interval of the configuration information.

[0152] Furthermore, the device of the embodiment of this specification may also include:

[0153] The acquisition time generation module generates the acquisition time of the multiple items of first configuration information corresponding to the configuration information requirements.

[0154] An expiration time generation module is used to generate the expiration time of the multiple first configuration information corresponding to the configuration information requirements according to the acquisition time and the preset expiration rule; the expiration time is used to reflect the time when the first configuration information corresponding to the expiration time is deleted from the preset storage middleware.

[0155] Furthermore, the device of the embodiment of this specification may also include a configuration information deletion module, which is used to:

[0156] A preset amount of configuration information is periodically selected from the preset storage middleware.

[0157] Obtain the expiration time of the preset amount of configuration information.

[0158] According to the expiration time of the preset number of configuration information, expired configuration information among the preset number of configuration information is determined.

[0159] The expired configuration information is deleted from the preset storage middleware.

[0160] Based on a general inventive concept, an embodiment of this specification also provides a configuration information loading device. Figure 4 Schematic diagram of a configuration information loading device provided in an embodiment of this specification. Figure 4 As shown, the device 400 may include:

[0161] at least one processor 410; and,

[0162] A memory 430 is communicatively connected to the at least one processor; wherein,

[0163] The memory 530 stores instructions 420 executable by the at least one processor 410. The instructions are executed by the at least one processor 410 to enable the at least one processor 410 to:

[0164] Obtaining a configuration information acquisition instruction sent by an application; the configuration information acquisition instruction carries a configuration information requirement;

[0165] Acquire multiple pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, which is the configuration information obtained after splitting and deduplicating the second configuration information acquired from the preset data source;

[0166] splicing the multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result;

[0167] The splicing result is fed back to the application.

[0168] For the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0169] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0170] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted according to actual needs, and the technical features recorded in the embodiments may be replaced or combined.

[0171] The modules and sub-modules in the devices and terminals of the various embodiments of the present invention may be combined, divided, or deleted according to actual needs.

[0172] In the several embodiments provided by the present invention, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or submodules is only a logical function division, and there may be other division methods in actual implementation, such as multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0173] The modules or submodules described as separate components may or may not be physically separated, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place, or they may be distributed on multiple network modules or submodules. Some or all of the modules or submodules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0174] In addition, each functional module or submodule in each embodiment of the present invention may be integrated into one processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into one module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or in the form of software functional modules or submodules.

[0175] Professionals may further appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0176] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0177] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0178] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Many modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A configuration information loading method, characterized in that: include: Get the configuration information acquisition instruction sent by the application; The configuration information acquisition instruction carries the configuration information requirement; Acquire multiple pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, which is the configuration information obtained after splitting and deduplicating the second configuration information acquired from the preset data source; splicing multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result; Feeding back the splicing result to the application; The second configuration information is split according to a preset splitting rule; The obtaining of a plurality of first configuration information corresponding to the configuration information requirement from the preset storage middleware specifically includes: Splitting the configuration information requirement based on the preset splitting rule; Generating, according to the split configuration information requirements, configuration information screening conditions corresponding to the multiple pieces of first configuration information corresponding to the configuration information requirements; According to the configuration information screening condition, determining whether the plurality of first configuration information corresponding to the configuration information requirement is stored in the preset storage middleware; If so, obtaining the plurality of first configuration information corresponding to the configuration information requirement from the preset storage middleware; If not, then based on the configuration information carried in the configuration information acquisition instruction, generate the target first configuration information missing in the preset storage middleware; the target first configuration information is the configuration information indicated by the split configuration information requirement; Loading the target first configuration information into the preset storage middleware; The multiple pieces of first configuration information corresponding to the configuration information requirements are obtained from a preset storage middleware.

2. The method according to claim 1, characterized in that: After generating the target first configuration information missing in the preset storage middleware, the method further includes: The target first configuration information is loaded into the preset data source.

3. The method according to claim 1, characterized in that Also includes: Calculating the modification frequency of each item of configuration information stored in the preset storage middleware within a preset time period; Determine the loading time interval of each configuration information stored in the preset storage middleware according to the modification frequency; the higher the modification frequency, the shorter the loading time interval corresponding to the modification frequency; According to the loading time interval, the configuration information corresponding to the loading time interval in the preset storage middleware is updated regularly.

4. The method according to claim 3, characterized in that Determining the loading time interval of each configuration information stored in the preset storage middleware according to the modification frequency specifically includes: For any item of configuration information, obtaining a preset priority and a modification frequency of the configuration information; Summing the preset priority and the modification frequency to obtain a target priority of the configuration information; A loading time interval corresponding to the target priority is obtained to obtain the loading time interval of the configuration information.

5. The method according to claim 1, characterized in that After obtaining a plurality of first configuration information corresponding to the configuration information requirement from the preset storage middleware, the method further includes: Generate the acquisition time of the multiple first configuration information corresponding to the configuration information requirements; The expiration times of the multiple first configuration information corresponding to the configuration information requirements are generated according to the acquisition time and the preset expiration rule; the expiration time is used to reflect the time when the first configuration information corresponding to the expiration time is deleted from the preset storage middleware.

6. The method according to claim 5, characterized in that Also includes: Selecting a preset amount of configuration information from the preset storage middleware at a regular interval; Obtaining the expiration time of the preset amount of configuration information; Determining expired configuration information among the preset number of configuration information according to the expiration time of the preset number of configuration information; The expired configuration information is deleted from the preset storage middleware.

7. A configuration information loading device, characterized in that: include: An instruction acquisition module is used to acquire the configuration information acquisition instruction sent by the application; The configuration information acquisition instruction carries the configuration information requirement; A configuration information acquisition module, used to acquire multiple pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, which is the configuration information obtained after splitting and deduplicating the second configuration information acquired from the preset data source; A configuration information splicing module, used for splicing multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result; A result feedback module, used for feeding back the splicing result to the application; The second configuration information is split according to a preset splitting rule; The configuration information acquisition module acquires multiple pieces of first configuration information corresponding to the configuration information requirement from the preset storage middleware, specifically including: Splitting the configuration information requirement based on the preset splitting rule; Generating, according to the split configuration information requirements, configuration information screening conditions corresponding to the multiple pieces of first configuration information corresponding to the configuration information requirements; According to the configuration information screening condition, determining whether the plurality of first configuration information corresponding to the configuration information requirement is stored in the preset storage middleware; If so, obtaining the plurality of first configuration information corresponding to the configuration information requirement from the preset storage middleware; If not, then based on the configuration information carried in the configuration information acquisition instruction, generate the target first configuration information missing in the preset storage middleware; the target first configuration information is the configuration information indicated by the split configuration information requirement; Loading the target first configuration information into the preset storage middleware; The multiple pieces of first configuration information corresponding to the configuration information requirements are obtained from a preset storage middleware.

8. The device according to claim 7, characterized in that Also includes: A modification frequency calculation module, used to calculate the modification frequency of each configuration information stored in the preset storage middleware within a preset time period; A loading time interval determination module, used to determine the loading time interval of each configuration information stored in the preset storage middleware according to the modification frequency; the higher the modification frequency, the shorter the loading time interval corresponding to the modification frequency; The configuration information updating module is used to regularly update the configuration information corresponding to the loading time interval in the preset storage middleware according to the loading time interval.

9. A configuration information loading device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining a configuration information acquisition instruction sent by an application; the configuration information acquisition instruction carries a configuration information requirement; Acquire multiple pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores the first configuration information, which is the configuration information obtained after splitting and deduplicating the second configuration information acquired from the preset data source; splicing multiple pieces of first configuration information corresponding to the configuration information requirements to obtain a splicing result; and feeding back the splicing result to the application; The second configuration information is split according to a preset splitting rule; The obtaining of a plurality of first configuration information corresponding to the configuration information requirement from the preset storage middleware specifically includes: Splitting the configuration information requirement based on the preset splitting rule; Generating, according to the split configuration information requirements, configuration information screening conditions corresponding to the multiple pieces of first configuration information corresponding to the configuration information requirements; According to the configuration information screening condition, determining whether the plurality of first configuration information corresponding to the configuration information requirement is stored in the preset storage middleware; If so, obtaining the plurality of first configuration information corresponding to the configuration information requirement from the preset storage middleware; If not, then based on the configuration information carried in the configuration information acquisition instruction, generate the target first configuration information missing in the preset storage middleware; the target first configuration information is the configuration information indicated by the split configuration information requirement; Loading the target first configuration information into the preset storage middleware; The multiple pieces of first configuration information corresponding to the configuration information requirements are obtained from a preset storage middleware.

Citation Information

Patent Citations

  • Configuration file generation method and device and configuration method and device

    CN114115983A