Thermal loading method and device
By obtaining and utilizing information about data table lists, data types and loading business rules, data tables are automatically loaded from buffer pools or databases, and the problem of adding new data table hot loading in the existing technology is solved, and intelligent automatic hot loading is realized, which improves R&D efficiency and reduces system risks.
Patent Information
- Application Number
- CN202110224430.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-01
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-03-01
AI Technical Summary
The existing hot loading technology requires writing code or adding configuration information when adding new data tables, which is quite cumbersome and cannot flexibly and automatically identify whether hot loading is required.
By obtaining the loading information of the loading data to be hot loaded, including the data table list, data type and pre-set loading business rules, query the buffer pool or read the corresponding loading data from the database for hot loading.
An intelligent automatic hot loading mechanism is realized, and the system can adaptively identify new data tables and perform hot loading, without the need for system developers to add new code or configuration information, which improves R&D efficiency and reduces system risks.
Smart Images

Figure CN113010513B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to data processing technology, in particular to a hot loading method and device. Background Art
[0002] In the prior art, the industry's common hot loading method loads data into memory. The hot loading of a new data table requires writing code or adding configuration information to implement it, which is relatively cumbersome and cannot flexibly and automatically identify whether a new data table needs to be hot loaded. Summary of the invention
[0003] In order to overcome at least one defect of the existing thermal loading technology, the present invention provides a thermal loading method, the method comprising:
[0004] Obtaining loading information of loading data to be hot loaded; wherein the loading information includes: a data table list;
[0005] According to the data table list, query whether there is loading data corresponding to the current data table list in the buffer pool, and if it is determined that there is loading data corresponding to the current data table list, hot loading is performed with the queried loading data;
[0006] It is determined that the loading data corresponding to the current data table list does not exist in the buffer pool, and the loading data corresponding to the current data table list is read from the database according to the loading information to perform hot loading.
[0007] In the embodiment of the present invention, the loading information further includes: data type and pre-set loading business rules;
[0008] The loading business rules include: a preset access frequency threshold and a data type loading strategy.
[0009] In the embodiment of the present invention, the obtaining of loading information of loading data to be hot loaded includes:
[0010] Acquire the data table list and data types from a storage device preset by a user;
[0011] The container is used to obtain the preset loading business rules from the loading configuration file.
[0012] In the embodiment of the present invention, the step of reading the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading includes:
[0013] Read the loading data corresponding to the current data table list from the database according to the data table list;
[0014] Counting the access frequencies of the data tables in the data table list to the database;
[0015] It is determined that the statistical access frequency is greater than a preset access frequency threshold, and the data corresponding to the current data table is stored in the buffer pool.
[0016] In the embodiment of the present invention, the step of reading the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading includes:
[0017] Determine a query data table according to the data type and a preset data type loading strategy;
[0018] According to the determined query data table, the load data corresponding to the current data table list is read from the database for hot loading.
[0019] At the same time, the present invention also provides a thermal loading device, comprising:
[0020] A loading information acquisition module is used to acquire loading information of loading data to be hot loaded; wherein the loading information includes: a data table list;
[0021] A hot loading module is used to query whether there is loading data corresponding to the current data table list in the buffer pool according to the data table list, and if it is determined that there is loading data corresponding to the current data table list, hot loading is performed with the queried loading data;
[0022] The asynchronous hot loading module is used to determine that the loading data corresponding to the current data table list does not exist in the buffer pool, and read the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading.
[0023] In the embodiment of the present invention, the loading information also includes: data type and pre-set loading business rules;
[0024] The loading business rules include: a preset access frequency threshold and a data type loading strategy.
[0025] In an embodiment of the present invention, the loading information acquisition module includes:
[0026] An acquisition unit, used for acquiring the data table list and data type from a storage device preset by a user;
[0027] The container loading unit is used to obtain preset loading business rules from the loading configuration file using the container.
[0028] In an embodiment of the present invention, the asynchronous hot loading module includes:
[0029] A database reading unit, used for reading the loading data corresponding to the current data table list from the database according to the data table list;
[0030] A statistical unit, used for counting the access frequency of the data tables in the data table list to the database;
[0031] The cache unit is used to determine that the statistical access frequency is greater than a preset access frequency threshold, and store the data corresponding to the current data table in the buffer pool.
[0032] In an embodiment of the present invention, the asynchronous hot loading module includes:
[0033] A query table determination unit, used to determine a query data table according to the data type and a preset data type loading strategy;
[0034] The loading unit is used to read the loading data corresponding to the current data table list from the database according to the determined query data table for hot loading.
[0035] At the same time, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the above method is implemented when the processor executes the computer program.
[0036] At the same time, the present invention also provides a computer-readable storage medium, which stores a computer program for executing the above method.
[0037] The present invention provides a hot loading method and device, which obtains loading information of loading data to be hot loaded; queries whether there is loading data corresponding to the current data table list in the buffer pool according to the data table list of the loading information, determines whether there is loading data corresponding to the current data table list, and then performs hot loading with the queried loading data; determines whether there is loading data corresponding to the current data table list in the buffer pool, and reads the loading data corresponding to the current data table list from the database according to the loading information for hot loading. Provides an intelligent automatic hot loading mechanism, based on which the data table list and data type corresponding to the application are automatically obtained and loaded into the memory, and a new data table is added. The system can adaptively identify the data to realize intelligent automatic hot loading, without the need for system developers to add new codes or configuration information, thereby improving R&D efficiency and reducing system risks.
[0038] In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A flow chart of the hot loading method provided by the present invention;
[0041] Figure 2 A flow chart of obtaining a data table list by starting a container of an intelligent automatic hot loading mechanism provided in an embodiment of the present invention;
[0042] Figure 3 A flow chart of automatic hot loading triggered by transaction of an intelligent automatic hot loading mechanism provided in an embodiment of the present invention;
[0043] Figure 4 A flowchart of asynchronous automatic hot loading of an intelligent automatic hot loading mechanism provided in an embodiment of the present invention;
[0044] Figure 5 A block diagram of a thermal loading device provided by the present invention;
[0045] Figure 6 is a block diagram in an embodiment of the present invention;
[0046] Figure 7 is a block diagram in an embodiment of the present invention;
[0047] Figure 8 is a block diagram in an embodiment of the present invention;
[0048] Fig. 9 It is a schematic diagram of an electronic device embodiment provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] 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.
[0050] The hot loading of the prior art loads data into the memory. The hot loading of the newly added data table must be implemented by writing code or adding configuration information, which is relatively cumbersome and cannot flexibly and automatically identify whether the newly added data table needs to be hot loaded. In this regard, the present invention provides a hot loading method, such as Figure 1 As shown, the method provided by the present invention comprises:
[0051] Step S1, obtaining loading information of loading data to be hot loaded; wherein the loading information includes: a data table list;
[0052] Step S2, querying whether there is loading data corresponding to the current data table list in the buffer pool according to the data table list, and if it is determined that there is loading data corresponding to the current data table list, hot loading is performed with the queried loading data;
[0053] Step S3, determining that the loading data corresponding to the current data table list does not exist in the buffer pool, and reading the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading.
[0054] The hot loading method provided by the present invention obtains the list of data tables to be hot loaded, obtains the loading data from the buffer pool and the database for hot loading, and overcomes the defect in the prior art that hot loading of newly added data tables must be implemented by writing code or adding configuration information. If the loading data corresponding to the current data table list does not exist in the buffer pool, the loading data corresponding to the current data table list is read from the database according to the loading information for hot loading, and overcomes the defect in the prior art that it cannot flexibly and automatically identify whether the newly added data table needs to be hot loaded.
[0055] Furthermore, in the embodiment of the present invention, the loading information further includes: data type and pre-set loading business rules;
[0056] The loading business rules include: a preset access frequency threshold and a data type loading strategy.
[0057] The hot loading method provided by the present invention uses different strategies according to the data type in the loading information and the pre-set loading business rules to automatically load the data frequently accessed by transactions into the buffer pool. When a new data table is added, the system can adaptively identify the data to realize intelligent automatic hot loading, without the need for system developers to add new codes or configuration information, thereby improving R&D efficiency and reducing system risks.
[0058] Further, in the embodiment of the present invention, the step S1 of obtaining the loading information of the loading data to be hot loaded includes:
[0059] Acquire the data table list and data types from a storage device preset by a user;
[0060] The container is used to obtain the preset loading business rules from the loading configuration file.
[0061] Specifically, in one embodiment of the present invention, starting the intelligent automatic hot loading mechanism in the container to obtain the hot loading configuration information specifically includes:
[0062] Obtaining a data table and a data type list corresponding to the application from a storage device preset by the user; in one embodiment of the present invention, a metadata and software resource information management system is called as a storage device preset by the user;
[0063] Load the acquired data table and data type list into memory;
[0064] Load business rules such as access frequency and data type intelligent loading strategy preset in the configuration file;
[0065] The container started successfully.
[0066] According to the container startup, the information to be hot loaded is obtained, the data table and data type list obtained are loaded into the memory, the business rules such as access frequency and data type intelligent loading strategy preset in the load configuration file are loaded, and the loading data is obtained from the buffer pool and database for hot loading according to the configured business rules, which overcomes the defect that the hot loading of the newly added data table in the existing technology must be implemented by writing code or adding configuration information, and different strategies are used according to the data type to automatically load the data frequently accessed by the transaction into the buffer pool. According to the preset access frequency and data type intelligent loading strategy in the business rules, the newly added data table system can adaptively identify data to realize intelligent automatic hot loading, without the need for system developers to add new code or configuration information, thereby improving R&D efficiency and reducing system risks.
[0067] In the embodiment of the present invention, in step S3, the step of reading the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading includes:
[0068] Read the loading data corresponding to the current data table list from the database according to the data table list;
[0069] Counting the access frequencies of the data tables in the data table list to the database;
[0070] It is determined that the statistical access frequency is greater than a preset access frequency threshold, and the data corresponding to the current data table is stored in the buffer pool.
[0071] Specifically, in the embodiment of the present invention, the queried data table and key value are obtained by identifying SQL statements.
[0072] The frequency of access to the database to obtain data table data is counted by minute.
[0073] Query the buffer pool to see if the data is found. If it is found, get the hot-loaded table data and return it; otherwise
[0074] Directly query the data table to obtain data from the database, and count whether the access frequency reaches the threshold. If the counted access frequency is greater than the preset access frequency threshold, the data corresponding to the current data table is stored in the buffer pool.
[0075] In the embodiment of the present invention, the step of reading the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading includes:
[0076] Determine a query data table according to the data type and a preset data type loading strategy;
[0077] According to the determined query data table, the load data corresponding to the current data table list is read from the database for hot loading.
[0078] Specifically, in the embodiment of the present invention, the determined query data table includes: a business table and a parameter table.
[0079] In this embodiment, a list of tables loaded in the memory and information on data types are obtained.
[0080] Determine the data type corresponding to the data table. If the data type is a parameter table, query all parameter data in the parameter table; if the data type is business data, query the data that meets the conditions in the business table.
[0081] In addition, the frequency of access to the database to obtain data table data is counted by minute. If it is greater than the preset threshold, sql is used as the key value and the found data is stored in the buffer pool as the value.
[0082] The embodiment of the present invention provides an intelligent automatic hot loading mechanism, which obtains the data table list and data type corresponding to the application from a preset storage device such as a metadata and software resource information management system and loads them into the memory, and automatically loads the data frequently accessed by transactions into the buffer pool using different strategies according to the data type. When a new data table is added, the system can adaptively identify the data to realize intelligent automatic hot loading, without the need for system developers to add new codes or configuration information, thereby improving R&D efficiency and reducing system risks.
[0083] The technical solution of the present invention is described in further detail below.
[0084] In this embodiment, when starting up, the system automatically obtains a list of data tables and data types corresponding to the application from the metadata and software resource information management system and loads them into the memory.
[0085] When querying transaction data, the system will query SQL and the access frequency accumulated in the distributed cache per minute to check whether the queried data exists in the buffer pool. If so, the data in the buffer pool will be directly retrieved and returned. If not, the database will be queried to obtain the data, and if the access frequency of the query database reaches the threshold, the asynchronous thread will be started to trigger the automatic hot loading process.
[0086] The automatic hot loading mechanism provided in this embodiment obtains the data type of the data table according to the data table name, and adopts different loading strategies according to the data type: if the data table is a parameter table, the entire table is loaded into the buffer pool; if the data table is a business table, only the data that meets the conditions is filtered and loaded into the buffer pool.
[0087] like Figure 2 As shown, a flow chart of obtaining a data table list when a container starts an intelligent automatic hot loading mechanism provided by the present embodiment includes:
[0088] S001: The container starts loading configuration information.
[0089] S002: Call the metadata and software resource information management system to obtain the data table and data type list corresponding to the application.
[0090] S003: Load the acquired data table and data type list into the memory.
[0091] S004: Load the business rules such as access frequency, data type intelligent loading strategy, etc. preset in the configuration file.
[0092] S005: The container was started successfully.
[0093] In an embodiment of the present invention, preset business rules such as access frequency and data type intelligent loading strategy are stored in a container loading configuration file, and the container is used to obtain the preset loading business rules from the loading configuration file, thereby overcoming the defects of the prior art that hot loading of new data tables must be implemented by writing code or adding configuration information, which is relatively cumbersome and cannot flexibly and automatically identify whether new data tables need to be hot loaded.
[0094] like Figure 3 As shown in the figure, it is a flow chart of automatic hot loading triggered by transaction of intelligent automatic hot loading provided in this embodiment, which includes:
[0095] S101: receiving a transaction request.
[0096] S102: Calling the intelligent automatic hot loading module to query data.
[0097] S103: Identify the SQL statement to obtain the queried data table and key value.
[0098] S104: Count the access frequency in the distributed cache by minute.
[0099] S105: Query the buffer pool to obtain data. If yes, jump to S106; otherwise, jump to S107.
[0100] S106: Get the hot-loaded table data and return it.
[0101] S107: directly query the data table to obtain data.
[0102] S108: Whether the access frequency reaches the threshold, if yes, jump to S109; otherwise, jump to S110.
[0103] S109: Start an asynchronous thread to perform automatic hot loading processing.
[0104] S110: The transaction continues to be processed.
[0105] like Figure 4 The flowchart of implementing the asynchronous automatic hot loading of the intelligent automatic hot loading mechanism in the embodiment of the present invention includes:
[0106] S201: The thread obtains the table list and data type information loaded in the memory.
[0107] S202: Determine the data type corresponding to the data table. If the data type is a parameter table, jump to S203; if the data type is business data, jump to S204.
[0108] S203: Query all parameter data in the parameter table.
[0109] S204: Query the business table for data that meets the conditions.
[0110] S205: Using sql as the key value, the found data is stored in the buffer pool as the value.
[0111] The embodiment of the present invention provides an intelligent automatic hot loading mechanism. Based on this mechanism, the system automatically obtains the data table list and data type corresponding to the application from the metadata and software resource information management system and loads them into the memory. According to the data type, different strategies are adopted to automatically load the data frequently accessed by the transaction into the buffer pool. When a new data table is added, the system can adaptively identify the data to realize intelligent automatic hot loading, without the need for system developers to add new codes or configuration information, thereby improving R&D efficiency and reducing system risks.
[0112] The present invention also provides a thermal loading device, such as Figure 5 As shown, it includes:
[0113] The loading information acquisition module 501 is used to acquire the loading information of the loading data to be hot loaded; wherein the loading information includes: a data table list;
[0114] The hot loading module 502 is used to query whether there is loading data corresponding to the current data table list in the buffer pool according to the data table list, and if it is determined that there is loading data corresponding to the current data table list, hot loading is performed with the queried loading data;
[0115] The asynchronous hot loading module 503 is used to determine that the loading data corresponding to the current data table list does not exist in the buffer pool, and read the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading.
[0116] In the embodiment of the present invention, data types and pre-set loading business rules;
[0117] The loading business rules include: a preset access frequency threshold and a data type loading strategy.
[0118] In the embodiment of the present invention, Figure 6 As shown, the loading information acquisition module 501 includes:
[0119] The acquisition unit 5011 is used to acquire the data table list and data type from a storage device preset by the user;
[0120] The container loading unit 5012 is used to obtain preset loading business rules from the loading configuration file using the container.
[0121] In the embodiment of the present invention, Figure 7 As shown, the asynchronous hot loading module 503 includes:
[0122] A database reading unit 5031 is used to read the loading data corresponding to the current data table list from the database according to the data table list;
[0123] A statistical unit 5032, used for counting the access frequency of the data tables in the data table list to the database;
[0124] The cache unit 5033 is used to determine that the statistical access frequency is greater than a preset access frequency threshold, and store the data corresponding to the current data table in the buffer pool.
[0125] In the embodiment of the present invention, Figure 8 As shown, the asynchronous hot loading module 503 also includes:
[0126] A query table determination unit 5034, configured to determine a query data table according to the data type and a preset data type loading strategy;
[0127] The loading unit 5035 is used to read the loading data corresponding to the current data table list from the database according to the determined query data table to perform hot loading.
[0128] For those skilled in the art, the implementation method of the heat loading device provided by the present invention can be clearly known from the description of the above embodiments, and will not be described in detail here.
[0129] It should be noted that the heat loading method and device provided by the present invention are applicable to the field of cloud computing technology to realize heat loading, and can also be used in the financial field or other fields. The heat loading method and device disclosed in the present invention can be used for heat loading in the financial field, and can also be used for heat loading in any field except the financial field. The application field of the heat loading method and device disclosed in the present invention is not limited.
[0130] This embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, etc., but this embodiment is not limited thereto. In this embodiment, the electronic device may refer to the embodiments of the aforementioned method and device, the contents of which are incorporated herein, and the repeated parts are not repeated.
[0131] Figure 8 FIG. 6 is a schematic block diagram of a system structure of an electronic device 600 according to an embodiment of the present invention. Figure 8 As shown, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. It should be noted that this figure is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0132] In one embodiment, the hot reload function may be integrated into the CPU 100. The CPU 100 may be configured to perform the following control:
[0133] Obtaining loading information of loading data to be hot loaded; wherein the loading information includes: a data table list;
[0134] According to the data table list, query whether there is loading data corresponding to the current data table list in the buffer pool, and if it is determined that there is loading data corresponding to the current data table list, hot loading is performed with the queried loading data;
[0135] It is determined that the loading data corresponding to the current data table list does not exist in the buffer pool, and the loading data corresponding to the current data table list is read from the database according to the loading information to perform hot loading.
[0136] In the embodiment of the present invention, the loading information further includes: data type and pre-set loading business rules;
[0137] The loading business rules include: a preset access frequency threshold and a data type loading strategy.
[0138] In the embodiment of the present invention, the obtaining of loading information of loading data to be hot loaded includes:
[0139] Acquire the data table list and data types from a storage device preset by a user;
[0140] The container is used to obtain the preset loading business rules from the loading configuration file.
[0141] In the embodiment of the present invention, the step of reading the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading includes:
[0142] Read the loading data corresponding to the current data table list from the database according to the data table list;
[0143] Counting the access frequencies of the data tables in the data table list to the database;
[0144] It is determined that the statistical access frequency is greater than a preset access frequency threshold, and the data corresponding to the current data table is stored in the buffer pool.
[0145] In the embodiment of the present invention, the step of reading the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading includes:
[0146] Determine a query data table according to the data type and a preset data type loading strategy;
[0147] According to the determined query data table, the load data corresponding to the current data table list is read from the database for hot loading.
[0148] In another embodiment, the heat loading device may be configured separately from the central processing unit 100. For example, the heat loading device may be configured as a chip connected to the central processing unit 100, and the heat loading function is implemented under the control of the central processing unit.
[0149] The electronic device provided by the embodiment of the present invention realizes an intelligent automatic hot loading mechanism. Based on this mechanism, the system automatically obtains the data table list and data type corresponding to the application and loads it into the memory. According to the data type, different strategies are adopted to automatically load the data frequently accessed by the transaction into the buffer pool. When a new data table is added, the system can adaptively identify the data to realize intelligent automatic hot loading, without the need for system developers to add new codes or configuration information, thereby improving R&D efficiency and reducing system risks.
[0150] like Fig. 9 As shown, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, and a power supply 170. It is worth noting that the electronic device 600 does not necessarily have to include Fig. 9In addition, the electronic device 600 may also include Fig. 9 For components not shown, reference may be made to the prior art.
[0151] like Fig. 9 As shown, the central processor 100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 100 receives inputs and controls the operations of various components of the electronic device 600.
[0152] The memory 140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 100 may execute the program stored in the memory 140 to implement information storage or processing.
[0153] The input unit 120 provides input to the CPU 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.
[0154] The memory 140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 140 may also be some other type of device. The memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application / function storage unit 142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 600 through the central processor 100.
[0155] The memory 140 may also include a data storage unit 143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 144 of the memory 140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0156] The communication module 110 is a transmitter / receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter / receiver) 110 is coupled to the central processor 100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0157] Based on different communication technologies, multiple communication modules 110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide an audio output via the speaker 131 and receive an audio input from the microphone 132, thereby realizing a common telecommunication function. The audio processor 130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 130 is also coupled to the central processor 100, so that the sound can be recorded on the local machine through the microphone 132, and the sound stored on the local machine can be played through the speaker 131.
[0158] An embodiment of the present invention further provides a computer-readable program, wherein when the program is executed in an electronic device, the program enables a computer to execute the hot loading method as described in the above embodiment in the electronic device.
[0159] An embodiment of the present invention further provides a storage medium storing a computer-readable program, wherein the computer-readable program enables a computer to execute the hot loading described in the above embodiment in an electronic device.
[0160] The embodiment of the present invention realizes an intelligent automatic hot loading mechanism. Based on this mechanism, the data table list and data type corresponding to the application are automatically obtained and loaded into the memory. According to the data type, different strategies are adopted to automatically load the data frequently accessed by the transaction into the buffer pool. When a new data table is added, the system can adaptively identify the data to realize intelligent automatic hot loading, without the need for system developers to add new codes or configuration information, thereby improving R&D efficiency and reducing system risks.
[0161] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings. Many features and advantages of these embodiments are clear from this detailed description, and therefore the appended claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. In addition, since many modifications and changes are readily apparent to those skilled in the art, the embodiments of the present invention are not intended to be limited to the precise structure and operation illustrated and described, but all suitable modifications and equivalents that fall within their scope may be included.
[0162] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0163] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0164] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0166] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A thermal loading method, characterized in that: The method includes: Obtaining loading information of the loading data to be hot loaded; wherein the loading information includes: a data table list, a data type, and a preset loading business rule; the loading business rule includes: a preset access frequency threshold and a data type loading strategy; According to the data table list, query whether there is loading data corresponding to the current data table list in the buffer pool, and if it is determined that there is loading data corresponding to the current data table list, hot loading is performed with the queried loading data; Determine that there is no loading data corresponding to the current data table list in the buffer pool, and read the loading data corresponding to the current data table list from the database according to the loading information to perform hot loading; The step of reading the loading data corresponding to the current data table list from the database according to the loading information for hot loading includes: Determine a query data table according to the data type and a preset data type loading strategy; the query data table includes: a business table or a parameter table; Read the load data corresponding to the current data table list from the database according to the determined query data table for hot loading; The step of reading the load data corresponding to the current data table list from the database according to the determined query data table for hot loading includes: If the query data table is a parameter table, all parameter data in the parameter table will be queried; if the query data table is a business table, the data that meets the conditions in the business table will be queried; Counting the access frequencies of the data tables in the data table list to the database; Determine whether the statistical access frequency is greater than the preset access frequency threshold, and store the data corresponding to the current data table in the buffer pool with sql as the key value and the found data as the value.
2. The thermal loading method according to claim 1, characterized in that: The method of obtaining the loading information of the loading data to be hot loaded includes: Acquire the data table list and data types from a storage device preset by a user; The container is used to obtain the preset loading business rules from the loading configuration file.
3. A thermal loading device, characterized in that: The device comprises: A loading information acquisition module, used to acquire loading information of loading data to be hot loaded; wherein the loading information includes: a data table list, a data type and a preset loading business rule; the loading business rule includes: a preset access frequency threshold and a data type loading strategy; A hot loading module is used to query whether there is loading data corresponding to the current data table list in the buffer pool according to the data table list, and if it is determined that there is loading data corresponding to the current data table list, hot loading is performed with the queried loading data; An asynchronous hot loading module, used for determining that the loading data corresponding to the current data table list does not exist in the buffer pool, and reading the loading data corresponding to the current data table list from the database according to the loading information for hot loading; The asynchronous hot loading module includes: A query table determination unit, used to determine a query data table according to the data type and a preset data type loading strategy; the query data table includes: a business table or a parameter table; A loading unit, used for reading the loading data corresponding to the current data table list from the database according to the determined query data table for hot loading; The loading unit is specifically used for: If the query data table is a parameter table, all parameter data in the parameter table will be queried; if the query data table is a business table, the data that meets the conditions in the business table will be queried; Counting the access frequencies of the data tables in the data table list to the database; Determine whether the statistical access frequency is greater than the preset access frequency threshold, and store the data corresponding to the current data table in the buffer pool with sql as the key value and the found data as the value.
4. The thermal loading device according to claim 3, characterized in that: The loading information acquisition module includes: An acquisition unit, used for acquiring the data table list and data type from a storage device preset by a user; The container loading unit is used to obtain preset loading business rules from the loading configuration file using the container.
5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 2 is implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method steps according to any one of claims 1 to 2.
Citation Information
Patent Citations
Data processing method and system, electronic equipment and storage medium
CN110109954A