CN115529237A - Configuration information loading method, device and equipment - Google Patents

Configuration information loading method, device and equipment Download PDF

Info

Publication number
CN115529237A
CN115529237A CN202211220910.1A CN202211220910A CN115529237A CN 115529237 A CN115529237 A CN 115529237A CN 202211220910 A CN202211220910 A CN 202211220910A CN 115529237 A CN115529237 A CN 115529237A
Authority
CN
China
Prior art keywords
configuration information
preset
preset storage
storage middleware
loading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211220910.1A
Other languages
Chinese (zh)
Inventor
张于华
赵英舒
赵晗妮
董春江
董霄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202211220910.1A priority Critical patent/CN115529237A/en
Publication of CN115529237A publication Critical patent/CN115529237A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a configuration information loading method, a configuration information loading device and configuration information loading equipment, wherein the method comprises the following steps: acquiring a configuration information acquisition instruction which is sent by an application program and carries configuration information requirements; acquiring a plurality of items of first configuration information corresponding to configuration information requirements from a preset storage middleware; the method comprises the steps that first configuration information is stored in a preset storage middleware, and the first configuration information is obtained after splitting and deduplication processing is carried out on second configuration information obtained from a preset data source; splicing a plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result; and feeding back the splicing result to the application program. Therefore, the speed of loading the configuration information by the application program is improved, and the storage redundancy of the configuration information is reduced.

Description

Configuration information loading method, device and equipment
Technical Field
The invention relates to the technical field of configuration information loading, in particular to a configuration information loading method, a configuration information loading device and configuration information loading equipment.
Background
With the rapid development of internet applications, the user has higher and higher requirements on the response speed of the application program, so that the application program needs to improve the loading speed of the configuration information. Currently, the speed of loading the configuration information by the application program is increased by first loading the configuration information in the data source into a preset storage middleware, for example, a Remote Dictionary service (rdis), and then acquiring the configuration information from the preset storage middleware by the application program.
Because similar configuration information may be used between application programs with different functions, that is, the same part and different parts exist between the configuration information used by each application program, a configuration template corresponding to the same configuration information of each application program is generated in advance and stored in a data source at present, and then after the application programs are connected with the data source, the configuration template in the data source is modified to obtain the configuration information meeting the personalized configuration requirements, and then the configuration information is stored in the data source and loaded into a preset storage middleware, and finally the configuration information is obtained from the preset storage middleware.
However, in the prior art, the speed of loading the configuration information by the application program is slow, and the storage redundancy of the configuration information exists.
Disclosure of Invention
In order to solve the problems of low speed of loading configuration information by an application program and storage redundancy of the configuration information in the prior art, the invention provides a configuration information loading method, a configuration information loading device and configuration information loading equipment, which have the characteristics of improving the speed of loading the configuration information by the application program, the storage redundancy of the configuration information and the like
The following is a specific technical scheme of the invention:
the invention provides a configuration information loading method, which comprises the following steps:
acquiring a configuration information acquisition instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement;
acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, wherein the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source;
splicing the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result;
and feeding back the splicing result to the application program.
Further, the second configuration information is split according to a preset splitting rule;
the obtaining, from a preset storage middleware, a plurality of pieces of first configuration information corresponding to the configuration information requirement may specifically include:
splitting the configuration information requirement based on the preset splitting rule;
generating configuration information screening conditions corresponding to the plurality of items of first configuration information corresponding to the configuration information requirements according to the split configuration information requirements;
judging whether the preset storage middleware stores the plurality of items of first configuration information corresponding to the configuration information requirements or not according to the configuration information screening conditions;
if yes, acquiring a plurality of items of first configuration information corresponding to the configuration information requirements from a preset storage middleware;
if not, generating missing target first configuration information in the preset storage middleware based on configuration information carried in the configuration information acquisition instruction; the target first configuration information is configuration information indicated by the split configuration information requirement;
loading the target first configuration information to the preset storage middleware;
and acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from a preset storage middleware.
Further, after the target first configuration information missing in the preset storage middleware is generated, the method may further include:
and loading the target first configuration information to the preset data source.
Further, the method may further include:
calculating the modification frequency of each item of configuration information stored in the preset storage middleware in a preset time period;
determining the loading time interval of each item of configuration information stored in the preset storage middleware according to the modification frequency; the higher the modification frequency is, the shorter the loading time interval corresponding to the modification frequency is;
and updating the configuration information corresponding to the loading time interval in the preset storage middleware at regular time according to the loading time interval.
Further, the determining, according to the modification frequency, a loading time interval of each item of configuration information stored in the preset storage middleware may specifically include:
aiming at any configuration information, acquiring a preset priority and the modification frequency of the configuration information;
summing the preset priority and the modification frequency to obtain a target priority of the configuration information;
and acquiring a loading time interval corresponding to the target priority to obtain the loading time interval of the configuration information.
Further, after acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirement from the preset storage middleware, the method may further include:
generating the acquisition time of the plurality of items of first configuration information corresponding to the configuration information requirements;
generating the expiration time of the plurality of items of first configuration information corresponding to the configuration information requirements according to the acquisition time and a preset expiration rule; the expiration time is used for reflecting the time for deleting the first configuration information corresponding to the expiration time from the preset storage middleware.
Further, the method may further include:
selecting a preset amount of configuration information from the preset storage middleware at regular time;
acquiring the expiration time of the preset amount of configuration information;
determining the overdue configuration information in the preset number of configuration information according to the overdue time of the preset number of configuration information;
and deleting the expired configuration information from the preset storage middleware.
Based on a general inventive concept, the present invention also provides a configuration information loading apparatus, including:
the instruction acquisition module is used for acquiring a configuration information acquisition instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement;
the configuration information acquisition module is used for acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, wherein the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source;
the configuration information splicing module is used for splicing the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result;
and the result feedback module is used for feeding back the splicing result to the application program.
Further, the device may further include:
the modification frequency calculation module is used for calculating the modification frequency of each item of configuration information stored in the preset storage middleware in a preset time period;
a loading time interval determining module, configured to determine, according to the modification frequency, a loading time interval of each item of configuration information stored in the preset storage middleware; the higher the modification frequency is, the shorter the loading time interval corresponding to the modification frequency is;
and the configuration information updating module is used for updating the configuration information corresponding to the loading time interval in the preset storage middleware at regular time according to the loading time interval.
Based on a general inventive concept, the present invention also provides a configuration information loading apparatus, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to cause the at least one processor to:
acquiring a configuration information acquisition instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement;
acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, wherein the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source;
splicing the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result;
and feeding back the splicing result to the application program.
By adopting the technical scheme, the invention has the following beneficial effects:
the configuration information in the data source is stored to a preset storage middleware after being split and deduplicated in advance. Subsequently, when the application program needs to load the configuration information, selecting a plurality of items of configuration information corresponding to the configuration information requirement of the application program from the preset storage middleware according to the configuration information requirement of the application program, splicing the plurality of items of configuration information corresponding to the configuration information requirement of the application program, and feeding back the spliced configuration information to the application program. Therefore, the situation that when an application program needs to load personalized configuration information, the application program needs to be connected with the data source every time is avoided, and the configuration information meeting the configuration requirement of the current application program is obtained by modifying the configuration information in the data source, so that the application program can be accelerated to load the configuration information; in addition, in the application, the configuration information after splitting and deduplication is stored in the preset storage middleware, and compared with the prior art that the configuration information meeting the configuration requirements of a plurality of application programs is stored in the data source and the preset storage middleware, the storage redundancy of the configuration information is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a configuration information loading method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a configuration information loading method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a configuration information loading apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a configuration information loading device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic view of an application scenario of a configuration information loading method according to an embodiment of the present invention. As shown in fig. 1, the configuration information loading method according to the embodiment of the present invention may include two stages, namely, a configuration information storing stage and a configuration information loading stage. In the configuration information storage phase, first, the configuration information loading device 11 obtains configuration information in at least one data source 12, performs splitting and deduplication processing on the obtained configuration information, and then stores the split and deduplicated configuration information into the preset storage middleware 111. In the configuration information loading stage, after acquiring a configuration information acquisition instruction carrying a configuration information requirement sent by an application program 13, a configuration information loading device 11 analyzes the configuration information acquisition instruction to obtain the configuration information requirement, selects configuration information corresponding to the configuration information requirement from a preset storage middleware, splices the configuration information corresponding to the configuration information requirement, and feeds back a splicing result to the application program, so that the application program acquires the configuration information meeting the configuration requirement, and the process of loading the configuration information by the application program is completed.
Next, a configuration information loading method provided in an embodiment of the specification will be specifically described with reference to the accompanying drawings:
fig. 2 is a schematic flowchart of a configuration information loading method according to an embodiment of the present invention. From a device perspective, the execution subject of the method may be a computer device, and from a program perspective, the execution subject of the method may be a computer program loaded at the computer device for loading configuration information. As shown in fig. 2, the configuration information loading method provided in the embodiment of the present invention includes:
step 201: acquiring a configuration information acquisition instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement.
In the embodiment of the present specification, the configuration information is parameter information used to control the operating state of the application or the internal logic of the application, such as a restrictive list table, a provincial information table, and an operator number field table. The configuration information is stored in a database of a data source, and a certain I/O bottleneck exists because a traditional database cluster uses a disk to store data, so that the problem of low loading speed of the configuration information exists when an application program directly loads the configuration information from the data source. Based on this, at present, it is often adopted to pre-load configuration information into a preset storage middleware (e.g., redis), and then the application program loads the configuration information it needs from the preset storage middleware. The preset storage middleware has the advantage of high information loading speed, so that the method improves the loading speed of the configuration information.
In the embodiment of the present specification, after a configuration information acquisition instruction sent by an application program is acquired, the configuration information acquisition instruction is analyzed to obtain a configuration information requirement of the application program, and then, configuration information can be selected in a preset storage middleware according to the configuration information requirement.
Step 202: acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, and the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source.
In this embodiment of the present description, the configuration information in the data source is stored in the preset storage middleware in advance, and subsequently, the application program may load the configuration information through the preset storage middleware. In the process of storing the configuration information in the data source in the preset storage middleware in advance, first, second configuration information is obtained from the preset data source, where the second configuration information may be any configuration information stored in the preset data source, and the second configuration information may be composed of multiple pieces of sub-configuration information, for example, the identity information of a certain user may include name, gender, and age, and then the identity information of the user is a piece of second configuration information, and the name, gender, and age are respectively a piece of sub-configuration information. In practical application, repeated sub-configuration information often exists between the second configuration information, so after the second configuration information is split, if repeated sub-configuration information exists between the obtained sub-configuration information, the sub-configuration information needs to be subjected to deduplication processing, and finally the first configuration information is obtained; if the repeated sub-configuration information does not exist among the sub-configuration information, the first configuration information is directly obtained after the second configuration information is split. And finally, storing the first configuration information into a preset storage middleware, specifically, storing a plurality of items of first configuration information into a plurality of memory storages of the preset storage middleware respectively, wherein the first configuration information corresponds to the memory storages one by one.
Subsequently, after the configuration information acquisition instruction which is sent by the application program and carries the configuration information requirement is acquired, the configuration information acquisition instruction is analyzed to obtain the configuration information requirement. The configuration information requirement can be a requirement of each first configuration information required by the application program, and thus after the configuration information requirement is obtained, a plurality of first configuration information corresponding to the configuration information requirement can be selected from the preset storage middleware directly according to the configuration information requirement. The configuration information requirement can also be a requirement of target configuration information required by an indication application program, wherein the target configuration information is configuration information synthesized by a plurality of items of first configuration information, so that the configuration information requirement can be firstly split according to each item of first configuration information in the preset storage middleware, and then a plurality of items of first configuration information corresponding to the configuration information requirement are selected from the preset storage middleware according to the split configuration information requirement.
Step 203: and splicing the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result.
In this embodiment of the present description, if the configuration information requirement is a requirement that directly indicates each piece of first configuration information required by the application, the configuration information acquisition instruction may carry a splicing rule, and when a plurality of pieces of first configuration information corresponding to the configuration information requirement are acquired, the acquired first configuration information may be spliced according to the splicing rule. Secondly, if the configuration information requirement is a requirement indicating target configuration information required by the application program, after a plurality of items of first configuration information corresponding to the configuration information requirement are obtained, the obtained first configuration information can be directly spliced into the target configuration information.
Step 204: and feeding back the splicing result to the application program.
In the embodiment of the present specification, the splicing result carries configuration information that meets the configuration requirement of the application program.
By adopting the technical scheme, the embodiment of the specification stores the configuration information in the data source to the preset storage middleware after the configuration information in the data source is split and deduplicated in advance. Subsequently, when the application program needs to load the configuration information, selecting a plurality of items of configuration information corresponding to the configuration information requirement of the application program from the preset storage middleware according to the configuration information requirement of the application program, splicing the plurality of items of configuration information corresponding to the configuration information requirement of the application program, and feeding back the spliced configuration information to the application program. Therefore, the situation that when the application program needs to load individualized configuration information, the application program needs to be connected with the data source every time is avoided, and the configuration information meeting the configuration requirement of the current application program is obtained by modifying the configuration information in the data source, so that the speed of loading the configuration information by the application program can be increased; in addition, in the application, the configuration information after splitting and deduplication is stored in the preset storage middleware, and compared with the prior art that the configuration information meeting the configuration requirements of a plurality of application programs is stored in the data source and the preset storage middleware, the storage redundancy of the configuration information is reduced.
Further, the second configuration information is split according to a preset splitting rule.
Step 202: the obtaining, from a preset storage middleware, a plurality of pieces of first configuration information corresponding to the configuration information requirement may specifically include:
and splitting the configuration information requirement based on the preset splitting rule.
And generating configuration information screening conditions corresponding to the plurality of items of first configuration information corresponding to the configuration information requirements according to the split configuration information requirements.
And judging whether the preset storage middleware stores the plurality of items of first configuration information corresponding to the configuration information requirements or not according to the configuration information screening conditions.
And if so, acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from a preset storage middleware.
If not, generating missing target first configuration information in the preset storage middleware based on configuration information carried in the configuration information acquisition instruction; the target first configuration information is configuration information indicated by the split configuration information requirement.
And loading the target first configuration information to the preset storage middleware.
And acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from a preset storage middleware.
In the embodiment of the present specification, second configuration information in a preset data source is split and stored in advance, where the second configuration information is split according to a preset splitting rule, and the preset splitting rule may be set by a person skilled in the art according to actual needs. Subsequently, if the acquired configuration information requirement indicates a requirement of target configuration information required by the application program, splitting the configuration information requirement based on the preset splitting rule so that the split configuration information requirement corresponds to the first configuration information, and then successfully selecting the first configuration information according to the split configuration information requirement.
In this embodiment of the present specification, the same configuration information may be used between application programs with different functions, the same configuration information is defined as common configuration information, and besides the common configuration information, in order to implement different functions, each application program may also use personalized configuration information, that is, the configuration information required by the application program includes the common configuration information and the personalized configuration information. Based on this, in order to improve the success rate of loading the configuration information by the application program, the configuration information acquisition instruction may 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 to the preset storage middleware, and then various items of first configuration information required by the application program can be acquired from the preset storage middleware, and after the various items of first configuration information are spliced, the splicing result is fed back to the application program, so that the application program can successfully load the required configuration information.
To illustrate the above more clearly, the following is exemplified.
In a specific example, it is assumed that the preset storage middleware stores six items of first configuration information, i.e., a, B, C, D, E, and F. The configuration information requirement indicates that the application program needs to load the configuration information synthesized by the components a, B and H, and the configuration information obtains the H carried in the instruction, that is, the H is the personalized configuration information of the application program. In the process of acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from the preset storage middleware, configuration information screening conditions respectively corresponding to A, B and H can be obtained by splitting the configuration information requirements, then, screening is performed in the preset storage middleware according to the configuration information screening conditions, and the screening result indicates that A and B are stored in the preset storage middleware and H is not stored in the preset storage middleware. And then, loading H carried in the configuration information acquisition instruction to a preset storage middleware, and finally, acquiring A, B and H from the preset storage middleware to obtain a plurality of items of first configuration information corresponding to the configuration information requirements.
In another specific example, it is assumed that the preset storage middleware stores six items of first configuration information, i.e., a, B, C, D, E, and F. The configuration information requirement indicates that the application program needs to load the configuration information synthesized by the a, the B and the D, and the configuration information acquisition instruction carries the D, that is, the D is the personalized configuration information of the application program. In the process of acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from the preset storage middleware, firstly, configuration information screening conditions respectively corresponding to A, B and D can be obtained by splitting the configuration information requirements, then, screening is carried out in the preset storage middleware according to the configuration information screening conditions, and a screening result indicates that A, B and D are stored in the preset storage middleware, so that A, B and D are directly acquired from the preset storage middleware to obtain the plurality of items of first configuration information corresponding to the configuration information requirements.
In another specific example, it is assumed that the preset storage middleware stores six items of first configuration information, i.e., a, B, C, D, E, and F. The configuration information requirement indicates that the application program needs to load the configuration information synthesized by the A, the B and the D, and the configuration information acquisition instruction does not carry any configuration information. In the process of acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from the preset storage middleware, firstly, configuration information screening conditions respectively corresponding to A, B and D can be obtained by splitting the configuration information requirements, then, screening is carried out in the preset storage middleware according to the configuration information screening conditions, and a screening result indicates that A, B and D are stored in the preset storage middleware, so that A, B and D are directly acquired from the preset storage middleware to obtain the plurality of items of first configuration information corresponding to the configuration information requirements.
Further, after generating the target first configuration information missing in the preset storage middleware, the method in the embodiment of the present specification may further include:
and loading the target first configuration information to the preset data source.
In this embodiment of the specification, if the preset storage middleware does not store the one or more first configuration information required by the application program, the preset data source may also not store the one or more first configuration information required by the application program, and in order to ensure real-time performance of data in the preset data source, the one or more first configuration information may be loaded to the preset data source after the one or more first configuration information required by the application program is generated.
Further, step 201: after the configuration information obtaining instruction sent by the application program is obtained, the method in this embodiment may further include:
and judging whether the configuration information acquisition instruction is effective or not.
If the configuration information acquisition instruction is invalid, feeding back prompt information to an application program; the prompt message is used for prompting that the configuration information acquisition instruction is invalid.
And if the configuration information acquisition instruction is valid, acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirement from a preset storage middleware.
In this embodiment of the present specification, the configuration information in the preset data source may be modified, and 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 avoid that the application program acquires wrong configuration information (i.e., configuration information inconsistent with the configuration information in the preset data source) from the preset storage middleware, the configuration information in the preset storage middleware needs to be updated regularly.
At present, the prior art adopts a scheme of updating all configuration information in the preset storage middleware regularly. However, in the actual application process, the modification frequencies of different configuration information are often different, and 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, so that a large amount of configuration information which is not modified is updated, the waste of computer resources is caused, and the update cost of the configuration information is increased; if the update frequency is set to be low in order to reduce the update cost, the modified configuration information may not be updated, so that the configuration information in the preset storage middleware is inconsistent with the configuration information in the preset data source.
In order to solve the problem that it is difficult to consider both the update cost of the configuration information and the real-time property of the configuration information in the preset storage middleware in the prior art, the method according to the embodiment of the present specification may further include:
and calculating the modification frequency of each item of configuration information stored in the preset storage middleware in a preset time period.
Determining the loading time interval of each item of 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.
And updating the configuration information corresponding to the loading time interval in the preset storage middleware at regular time according to the loading time interval.
In order to more clearly illustrate the above technical solution, the following examples are given.
In a specific example, the modification frequency of each item of configuration information stored in the preset storage middleware within the latest day from the current time is calculated, for example, the current time is 24 points at 9/23/2022 year, and then the modification frequency of each item of configuration information between 24 points at 22/2022 year and 24 points at 9/23/2022 year is calculated. Then, the loading time interval of each item of configuration information is determined according to the modification frequency of each item of configuration information, and the specific determination manner can be set by a person skilled in the art according to actual needs, as long as it can be satisfied that the higher the modification frequency is, the shorter the loading time interval corresponding to the modification frequency is. And finally, updating the configuration information corresponding to the loading time interval in the preset storage middleware at regular time according to the loading time interval.
Further, in order to ensure that the loading time interval of the configuration information is always matched with the actual modification frequency of the configuration information, the loading time interval of the configuration information may be updated regularly by using the above scheme. For example, at 24 o' clock per day, the modification frequency of the current configuration information may be counted, and the loading time interval of the configuration information may be determined according to the modification frequency, and the loading time interval will be used as the update time interval of the configuration information on the next day.
Further, the determining, according to the modification frequency, a loading time interval of each item of configuration information stored in the preset storage middleware may specifically include:
and aiming at any item of configuration information, acquiring the preset priority and the modification frequency of the configuration information.
And summing the preset priority and the modification frequency to obtain the target priority of the configuration information.
And acquiring a loading time interval corresponding to the target priority to obtain the loading time interval of the configuration information.
In this embodiment of the present specification, the preset priority of each configuration information may be manually set in advance, and then, after the modification frequency of each acquired configuration information in a preset time period, the preset priority and the modification frequency corresponding to the same configuration information are summed to obtain the target priority of the configuration information, where a unit of the modification frequency may be times/day. And, the loading time interval corresponding to each priority is preset in the embodiments of this specification, and the higher the priority is, the shorter the loading time interval corresponding to the priority is. Illustratively, 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 more 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, and the like. Furthermore, after the target priority of a certain configuration information is obtained, the loading time interval corresponding to the target priority, that is, the loading time interval of the configuration information, may be obtained according to the preset relationship between the priority and the loading time interval. Based on the scheme, the requirement of the user for actively interfering the loading time interval of the configuration information is met by supporting the user to preset the preset priority of the configuration information.
In this embodiment of the present specification, frequencies of acquiring, by an application program, configuration information in a preset storage middleware are different, and some configuration information is not acquired by an external application program for a long time, and if it is always stored in the preset storage middleware, the preset storage middleware will generate storage redundancy, so that the preset storage middleware with limited storage space cannot store more configuration information acquired by the external application program at a higher frequency.
Based on this, after acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirement from the preset storage middleware, the method in the embodiment of the present specification may further include:
and generating the acquisition time of the plurality of items of first configuration information corresponding to the configuration information requirements.
Generating the expiration time of the plurality of items of first configuration information corresponding to the configuration information requirements according to the acquisition time and a preset expiration rule; the expiration time is used for reflecting the time for deleting the first configuration information corresponding to the expiration time from the preset storage middleware.
In order to more clearly illustrate the above technical solution, the following is specifically described.
In a specific example, at 12/9/23/2022, the application program obtains the configuration information a, B, and C from the preset storage middleware, so that the obtaining time of the configuration information a, B, and C is 12/9/23/2022. The preset expiration rule may define that the configuration information expires after 12 hours, and therefore, according to the acquisition time and the preset expiration rule, the expiration time of the configuration information a, B, and C is calculated to be 2022, 9, 24, and 12. Subsequently, if the configuration information a, B, and C is not acquired again by the application program during the period from 9/23/12/2022 to 9/24/12/2022, the configuration information a, B, and C is deleted from the preset storage middleware at 9/24/12/2022. However, if configuration information is acquired again by the application program in the period from 9/23/12/2022 to 9/24/12/2022, and it is assumed that configuration information a is acquired again by the application program in 9/23/24/2022, the expiration time of updating configuration information a is 2022, 9/24, and finally, configuration information B and C are deleted from the preset storage middleware in 9/24/12/2022; at 24/9/2022, the configuration information a is deleted from the preset storage middleware.
In this embodiment of the present specification, each piece of first configuration information is stored in a corresponding memory storage, and each memory storage is connected to a corresponding timer, that is, the memory storages may correspond to the timers one to one, and then the acquisition time of the first configuration information in the corresponding memory storage may be acquired by the timers.
Further, the method in the embodiments of the present specification may further include:
and selecting a preset amount of configuration information from the preset storage middleware at regular time.
And acquiring the expiration time of the preset amount of configuration information.
And determining the overdue configuration information in the preset number of configuration information according to the overdue time of the preset number of configuration information.
And deleting the expired configuration information from the preset storage middleware.
In this embodiment of the present description, the configuration information in the preset storage middleware may be deleted at regular time. In the specific deletion process, part of the configuration information in the preset storage middleware may be randomly selected, or part of the configuration information in the preset storage middleware may be selected according to a preset selection rule, for example, K pieces of configuration information that are first loaded in the preset storage middleware are selected according to the time for loading each piece of configuration information in the preset storage middleware. And then deleting the expired configuration information in the part of configuration information from the preset storage middleware. Therefore, compared with the scheme of selecting the overdue configuration information from all the configuration information in the preset storage middleware, the scheme can avoid occupying too much CPU resource, and simultaneously avoid occupying the storage resource of the preset storage middleware by too much overdue configuration information.
In this embodiment of the present description, the preset storage middleware may further store third configuration information that is not split in the preset data source, so that, if the configuration information that the application program needs to obtain is the configuration information stored in the data source, the configuration information may be directly obtained from the preset storage middleware, and if the preset storage middleware does not store the configuration information, the configuration information in the preset data source may be loaded into the preset storage middleware, and then the configuration information is obtained from the preset storage middleware and directly sent to the application program.
Based on a general inventive concept, the embodiments of the present specification further provide a configuration information loading apparatus. Fig. 3 is a schematic view of an application scenario of a configuration information loading apparatus according to an embodiment of the present specification. As shown in fig. 3, the configuration information loading apparatus according to the embodiment of the present 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.
The instruction obtaining module 31 is configured to obtain a configuration information obtaining instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement.
The configuration information acquisition module 32 is configured to acquire multiple pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, and the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source.
And the configuration information splicing module 33 is configured to splice the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result.
And a result feedback module 34, configured to feed back the splicing result to the application program.
Further, the second configuration information is split according to a preset splitting rule.
The configuration information obtaining module 32 may specifically be configured to:
and splitting the configuration information requirement based on the preset splitting rule.
And generating configuration information screening conditions corresponding to the plurality of items of first configuration information corresponding to the configuration information requirements according to the split configuration information requirements.
And judging whether the preset storage middleware stores the plurality of items of first configuration information corresponding to the configuration information requirements or not according to the configuration information screening conditions.
If the plurality of items of first configuration information corresponding to the configuration information requirements are stored in the preset storage middleware, the plurality of items of first configuration information corresponding to the configuration information requirements are obtained from the preset storage middleware.
If the preset storage middleware does not store each first configuration information in the plurality of first configuration information corresponding to the configuration information requirements, acquiring configuration information carried in an instruction based on the configuration information, and generating target first configuration information missing in the preset storage middleware; the target first configuration information is configuration information indicated by the split configuration information requirement.
And loading the target first configuration information to the preset storage middleware.
And acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from a preset storage middleware.
Further, the apparatus in this specification may further include:
and the data source updating module is used for loading the target first configuration information to the preset data source.
Further, the apparatus in this specification may further include:
and the modification frequency calculation module is used for calculating the modification frequency of each item of configuration information stored in the preset storage middleware in a preset time period.
A loading time interval determining module, configured to determine, according to the modification frequency, a loading time interval of each item of configuration information stored in the preset storage middleware; the higher the modification frequency, the shorter the loading time interval corresponding to the modification frequency.
And the configuration information updating module is used for updating the configuration information corresponding to the loading time interval in the preset storage middleware at regular time according to the loading time interval.
Further, the loading time interval determination module may be specifically configured to:
and aiming at any configuration information, acquiring the preset priority and the modification frequency of the configuration information.
And summing the preset priority and the modification frequency to obtain the target priority of the configuration information.
And acquiring a loading time interval corresponding to the target priority to obtain the loading time interval of the configuration information.
Further, the apparatus in this specification may further include:
and the acquisition time generation module is used for generating acquisition time of the plurality of items of first configuration information corresponding to the configuration information requirements.
The expiration time generating module is used for generating the expiration times of the plurality of items of first configuration information corresponding to the configuration information requirements according to the acquisition time and a preset expiration rule; the expiration time is used for reflecting the time for deleting the first configuration information corresponding to the expiration time from the preset storage middleware.
Further, the apparatus in this embodiment of the present specification may further include a configuration information deleting module, configured to:
and selecting a preset amount of configuration information from the preset storage middleware at regular time.
And acquiring the expiration time of the preset amount of configuration information.
And determining the overdue configuration information in the preset number of configuration information according to the overdue time of the preset number of configuration information.
And deleting the expired configuration information from the preset storage middleware.
Based on a general inventive concept, the embodiments of the present specification further provide a configuration information loading apparatus. Fig. 4 is a schematic structural diagram of a configuration information loading device according to an embodiment of the present specification. As shown in fig. 4, the apparatus 400 may include:
at least one processor 410; and (c) a second step of,
a memory 430 communicatively coupled to the at least one processor; wherein,
the memory 530 stores instructions 420 executable by the at least one processor 410 to enable the at least one processor 410 to:
acquiring a configuration information acquisition instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement;
acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, wherein the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source;
splicing the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result;
and feeding back the splicing result to the application program.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The steps in the method of each embodiment of the present invention may be sequentially adjusted, combined, and deleted according to actual needs, and the technical features described in each embodiment may be replaced or combined.
The modules and sub-modules in the device and the terminal of the embodiments of the invention can be combined, divided and deleted according to actual needs.
In the embodiments provided in the present invention, it should be understood that the disclosed terminal, apparatus and method may be implemented in other ways. For example, the above-described terminal embodiments are merely illustrative, and for example, the division of a module or a sub-module is only one logical division, and there may be other divisions when the terminal is actually implemented, for example, a plurality of sub-modules or modules may be combined or integrated into another module, or some features may be omitted or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection between devices or modules, and may be in an electrical, mechanical or other form.
The modules or sub-modules described as separate parts may or may not be physically separate, and parts that are modules or sub-modules may or may not be physical modules or sub-modules, may be located in one place, or may be distributed over a plurality of network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, each functional module or sub-module in each embodiment of the present invention may be integrated into one processing module, or each module or sub-module may exist alone physically, or two or more modules or sub-modules may be integrated into one module. The integrated modules or sub-modules may be implemented in the form of hardware, or may be implemented in the form of software functional modules or sub-modules.
Those of skill would further appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for loading configuration information is characterized by comprising the following steps:
acquiring a configuration information acquisition instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement;
acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, wherein the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source;
splicing the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result;
and feeding back the splicing result to the application program.
2. The method of claim 1, wherein the second configuration information is split according to a preset splitting rule;
the acquiring multiple pieces of first configuration information corresponding to the configuration information requirement from a preset storage middleware specifically includes:
splitting the configuration information requirement based on the preset splitting rule;
generating configuration information screening conditions corresponding to the plurality of items of first configuration information corresponding to the configuration information requirements according to the split configuration information requirements;
judging whether the preset storage middleware stores the plurality of items of first configuration information corresponding to the configuration information requirements or not according to the configuration information screening conditions;
if yes, acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from a preset storage middleware;
if not, acquiring configuration information carried in the instruction based on the configuration information, and generating first target configuration information missing in the preset storage middleware; the target first configuration information is configuration information indicated by the split configuration information requirement;
loading the target first configuration information to the preset storage middleware;
and acquiring the plurality of items of first configuration information corresponding to the configuration information requirements from a preset storage middleware.
3. The method according to claim 2, wherein after generating the target first configuration information missing from the preset storage middleware, the method further comprises:
and loading the target first configuration information to the preset data source.
4. The method of claim 1, further comprising:
calculating the modification frequency of each item of configuration information stored in the preset storage middleware in a preset time period;
determining the loading time interval of each item of configuration information stored in the preset storage middleware according to the modification frequency; the higher the modification frequency is, the shorter the loading time interval corresponding to the modification frequency is;
and updating the configuration information corresponding to the loading time interval in the preset storage middleware at regular time according to the loading time interval.
5. The method according to claim 4, wherein the determining, according to the modification frequency, a loading time interval of each item of configuration information stored in the preset storage middleware specifically includes:
aiming at any configuration information, acquiring a preset priority and the modification frequency of the configuration information;
summing the preset priority and the modification frequency to obtain a target priority of the configuration information;
and acquiring a loading time interval corresponding to the target priority to obtain the loading time interval of the configuration information.
6. The method according to claim 1, wherein after acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirement from a preset storage middleware, the method further comprises:
generating the acquisition time of the plurality of items of first configuration information corresponding to the configuration information requirements;
generating the expiration times of the plurality of items of first configuration information corresponding to the configuration information requirements according to the acquisition time and a preset expiration rule; the expiration time is used for reflecting the time for deleting the first configuration information corresponding to the expiration time from the preset storage middleware.
7. The method of claim 6, further comprising:
selecting a preset amount of configuration information from the preset storage middleware at regular time;
acquiring the expiration time of the preset amount of configuration information;
determining the overdue configuration information in the preset number of configuration information according to the overdue time of the preset number of configuration information;
and deleting the overdue configuration information from the preset storage middleware.
8. A configuration information loading apparatus, comprising:
the instruction acquisition module is used for acquiring a configuration information acquisition instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement;
the configuration information acquisition module is used for acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, wherein the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source;
the configuration information splicing module is used for splicing the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result;
and the result feedback module is used for feeding back the splicing result to the application program.
9. The apparatus of claim 8, further comprising:
the modification frequency calculation module is used for calculating the modification frequency of each item of configuration information stored in the preset storage middleware in a preset time period;
a loading time interval determining module, configured to determine, according to the modification frequency, a loading time interval of each item of configuration information stored in the preset storage middleware; the higher the modification frequency is, the shorter the loading time interval corresponding to the modification frequency is;
and the configuration information updating module is used for updating the configuration information corresponding to the loading time interval in the preset storage middleware at regular time according to the loading time interval.
10. A configuration information loading apparatus characterized by comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to cause the at least one processor to:
acquiring a configuration information acquisition instruction sent by an application program; the configuration information acquisition instruction carries a configuration information requirement;
acquiring a plurality of pieces of first configuration information corresponding to the configuration information requirements from a preset storage middleware; the preset storage middleware stores first configuration information, wherein the first configuration information is obtained by splitting and removing duplicate of second configuration information acquired from a preset data source;
splicing the plurality of items of first configuration information corresponding to the configuration information requirements to obtain a splicing result;
and feeding back the splicing result to the application program.
CN202211220910.1A 2022-10-08 2022-10-08 Configuration information loading method, device and equipment Pending CN115529237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211220910.1A CN115529237A (en) 2022-10-08 2022-10-08 Configuration information loading method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211220910.1A CN115529237A (en) 2022-10-08 2022-10-08 Configuration information loading method, device and equipment

Publications (1)

Publication Number Publication Date
CN115529237A true CN115529237A (en) 2022-12-27

Family

ID=84700796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211220910.1A Pending CN115529237A (en) 2022-10-08 2022-10-08 Configuration information loading method, device and equipment

Country Status (1)

Country Link
CN (1) CN115529237A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538542A (en) * 2020-03-24 2020-08-14 中国平安人寿保险股份有限公司 System configuration method and related device
CN111726249A (en) * 2020-06-02 2020-09-29 中盈优创资讯科技有限公司 Configuration file processing method and device for network equipment
CN114070737A (en) * 2021-11-26 2022-02-18 中国工商银行股份有限公司 Method and device for checking configuration data of equipment, storage medium and electronic equipment
CN114115983A (en) * 2021-12-03 2022-03-01 北京天融信网络安全技术有限公司 A configuration file generation method and device, and configuration method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538542A (en) * 2020-03-24 2020-08-14 中国平安人寿保险股份有限公司 System configuration method and related device
CN111726249A (en) * 2020-06-02 2020-09-29 中盈优创资讯科技有限公司 Configuration file processing method and device for network equipment
CN114070737A (en) * 2021-11-26 2022-02-18 中国工商银行股份有限公司 Method and device for checking configuration data of equipment, storage medium and electronic equipment
CN114115983A (en) * 2021-12-03 2022-03-01 北京天融信网络安全技术有限公司 A configuration file generation method and device, and configuration method and device

Similar Documents

Publication Publication Date Title
CN109901918B (en) Method and device for processing overtime task
CN110555078A (en) Distributed ID generation
US9542173B2 (en) Dependency handling for software extensions
CN111552899A (en) Method and system for improving display performance of front-end report
CN115827646B (en) Index configuration method and device and electronic equipment
CN114168595A (en) Data analysis method and device
CN110795259A (en) Method and device for analyzing application collapse
CN110807058A (en) Method and system for exporting data
CN113535206B (en) Multi-version code upgrading method and system
CN113901021A (en) Method, device and electronic device for generating upgrade script for multi-version database
CN115529237A (en) Configuration information loading method, device and equipment
CN113111072A (en) Business data file generation method and device
US20220229821A1 (en) Data restoration using dynamic data structure altering
CN104317820B (en) Statistical method and device for report forms
CN114780536B (en) A method, device, electronic device and storage medium for creating a SQL Server database index
CN112883009A (en) Method and apparatus for processing data
CN113779000B (en) Database updating method and system, storage medium and electronic device
CN110659042A (en) Server firmware management method and device
US20180341521A1 (en) Managing job schedules
CN115131067A (en) Data processing method and device, electronic equipment and storage medium
US9026589B1 (en) Stubbing techniques in distributed-services environments
CN112363819A (en) Big data task dynamic scheduling method and device and computing equipment
CN113760600A (en) Database backup method, database restoration method and related device
CN117827252B (en) Function demonstration method, server and storage medium for system update
CN116719971B (en) Pull chain table data loading method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination