CN113448962B - Database data management method and device - Google Patents

Database data management method and device Download PDF

Info

Publication number
CN113448962B
CN113448962B CN202110615938.4A CN202110615938A CN113448962B CN 113448962 B CN113448962 B CN 113448962B CN 202110615938 A CN202110615938 A CN 202110615938A CN 113448962 B CN113448962 B CN 113448962B
Authority
CN
China
Prior art keywords
address
current
configuration information
service
channel number
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.)
Active
Application number
CN202110615938.4A
Other languages
Chinese (zh)
Other versions
CN113448962A (en
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.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology Co ltd
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 Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202110615938.4A priority Critical patent/CN113448962B/en
Publication of CN113448962A publication Critical patent/CN113448962A/en
Application granted granted Critical
Publication of CN113448962B publication Critical patent/CN113448962B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements

Abstract

The invention provides a database data management method and a device, wherein the method comprises the following steps: receiving a configuration starting instruction; responding to the configuration starting instruction, and requesting configuration information; storing the configuration information in an internal storage table; calculating to obtain service information according to the configuration information, and storing the service information into an internal cache register; and outputting the service information in the internal cache register after receiving the service request. Through the scheme, the technical problem that the existing data table is difficult to manage is solved, and the technical effect of effectively improving the management efficiency of the data table is achieved.

Description

Database data management method and device
Technical Field
The invention relates to the field of accelerators special for databases, in particular to a database data management method and device.
Background
As the amount of data increases, the latency of database access increases. The fastest SSD storage currently can reach 12GB/s read speed, but even at such read speed, if the database has a size of 15TB, it still takes 33 hours to complete a query by a complete search. In order to accelerate the query speed of the database, a method of designing a special processor for the database is mostly adopted to improve the performance.
The accelerator special for the database generally adopts a multi-core parallel mode to improve the processing speed, and a plurality of data tables in the database can be mapped to different processing cores for parallel processing. Most of the data tables in the database are stored in the main memory, and how to efficiently extract the data tables from the memory and distribute the data tables to each processing core for processing becomes a key and bottleneck of the design of the accelerator special for the database.
Disclosure of Invention
The embodiment of the invention provides a database data management method and a database data management device, which aim to efficiently manage the storage of each data table in a database in a memory and fully utilize memory bandwidth to provide data for each processing core.
In one aspect, a database data management method is provided, including:
receiving a configuration starting instruction;
requesting configuration information in response to the configuration start instruction;
storing the configuration information in an internal storage table;
calculating to obtain service information according to the configuration information, and storing the service information into an internal cache register;
and outputting the service information in the internal cache register after receiving the service request.
In one embodiment, in the process of receiving a configuration starting instruction, responding to the configuration starting instruction, requesting configuration information, storing the configuration information in an internal storage table, and outputting a busy indication; and calculating to obtain service information according to the configuration information, storing the service information into an internal cache register, and outputting a service ready indication to the outside.
In one embodiment, the configuration start instruction carries: table number, column number, and channel number;
responding to the configuration starting instruction, and requesting configuration information, wherein the configuration information comprises:
according to the table number and the column number, first configuration information is requested to the outside, wherein the first configuration information comprises: a current first address, a current last address, a next block number, a first valid indication of a next address;
storing the first configuration information in a row corresponding to the channel number in an internal storage table, where a second configuration information and a current address are also stored in the row corresponding to the channel number, the second configuration information is set to 0, and the current address is set to a current head address, where the second configuration information includes: a second valid indication of a next first address, a next last address, a next address;
requesting second configuration information and the number of the next block to the outside according to the number of the next block in the first configuration information;
and updating the second configuration information stored in the row corresponding to the channel number in the internal storage table through the second configuration information obtained by the request, and updating the number of the next block to the number of the next block.
In one embodiment, calculating service information according to the configuration information and fixed parameters, and storing the service information into an internal cache register includes:
reading a channel number from a first-in first-out memory and placing the channel number into a channel number cache register;
according to the channel number, the information of the first configuration information except the serial number of the next block, the second configuration information and the current address are taken out from the corresponding line in the internal storage table;
summing the current address and the fixed parameters to obtain a sum value;
judging the size between the sum value and the current last address;
if the sum value is smaller than the current last address, the current address is added with 1 and then stored into a current first address cache register, the sum value is stored into a current last address cache register, the current address of the row corresponding to the channel number in the internal storage table is updated by using the sum value, the taken channel number is stored into a first-in first-out memory again, and a service ready indication is output outwards;
and if the sum value is larger than or equal to the current last address, adding 1 to the current address and storing the current address into a current first address cache register, and storing the current last address into a current last address cache register.
In one embodiment, after fetching the first configuration information, the second configuration information, and the current address from the corresponding row in the internal storage table according to the fetched channel number, the method further includes:
when the sum value is larger than or equal to the current last address and the first effective indication of the next address is 0, storing the taken channel number into a first-in first-out memory again and outputting a service ready indication outwards;
and under the condition that the sum value is greater than or equal to the current end address and the first effective indication of the next address is 1, updating the current end address stored in the row corresponding to the channel number in the internal storage table to the next taken first address, updating the current end address to the next taken end address, updating the current address to the next taken first address, and updating the first effective indication of the next address to the second effective indication of the next taken address.
In one embodiment, when the sum value is greater than or equal to the current end address and the first valid indicator of the next address is 1, the method further includes the steps of updating the current head address stored in the row corresponding to the channel number in the internal storage table to the fetched next head address, updating the current end address to the fetched next end address, updating the current address to the fetched next head address, and updating the first valid indicator of the next address to the second valid indicator of the fetched next address:
determining whether a second valid indication for an address is 0;
under the condition that the second effective indication of the next address is 0, the taken channel number is stored in the first-in first-out memory again, and a service ready indication is output outwards;
and in the case that the second effective indication of the next address is 1, requesting configuration information, updating the information in the internal storage table through the received configuration information, storing the channel number into the first-in first-out memory, and outputting a service ready indication outwards.
In one embodiment, the method comprises: a configuration step, a service preparation step and a service providing step;
wherein the configuring step comprises: receiving a configuration starting instruction; responding to the configuration starting instruction, and requesting configuration information; and storing the configuration information in an internal storage table;
the service preparation step includes: calculating to obtain service information according to the configuration information, and storing the service information into an internal cache register;
the step of providing the service includes: outputting the service information in the internal cache register after receiving the service request;
the configuring step, the service preparing step, and the providing step are performed serially or in parallel.
In another aspect, a database data management apparatus is provided, including:
the receiving module is used for receiving a configuration starting instruction;
a request module, configured to request configuration information in response to the configuration start instruction;
the storage module is used for storing the configuration information in an internal storage table;
the computing module is used for computing service information according to the configuration information and storing the service information into an internal cache register;
and the output module is used for outputting the service information in the internal cache register after receiving the service request.
In one embodiment, the request module comprises:
a first requesting unit, configured to request first configuration information from the outside according to a table number and a column number, where the first configuration information includes: a current head address, a current end address, a next block number, and a first valid indication of a next address, where the configuration start instruction carries: table number, column number, and channel number;
the storage module includes:
a storing unit, configured to store the first configuration information in a row corresponding to the channel number in an internal storage table, where a second configuration information and a current address are also stored in the row corresponding to the channel number, the second configuration information is set to 0, and the current address is set to a current head address, where the second configuration information includes: a second valid indication of a next first address, a next last address, a next address;
the request module further comprises:
a second requesting unit, configured to request, to the outside, second configuration information and a number of a next block according to the number of the next block in the first configuration information;
the memory module further includes:
and the updating unit is used for updating the second configuration information stored in the row corresponding to the channel number in the internal storage table through the second configuration information obtained by the request, and updating the number of the next block into the number of the next block.
In one embodiment, the computing module includes:
the information reading unit is used for reading a channel number from the first-in first-out memory and putting the channel number into the channel number cache register; according to the channel number, the information of the first configuration information except the serial number of the next block, the second configuration information and the current address are taken out from the corresponding line in the internal storage table;
the calculation judgment unit is used for summing the current address and the fixed parameters to obtain a sum value; judging the size between the sum value and the current last address; if the sum value is smaller than the current last address, adding 1 to the current address and storing the current address into a current first address cache register, storing the sum value into the current last address cache register, updating the current address of the line corresponding to the channel number in the internal storage table by using the sum value, storing the taken channel number into a first-in first-out memory, and outputting a service ready instruction outwards; and if the sum value is larger than or equal to the current last address, adding 1 to the current address and storing the current address into a current first address cache register, and storing the current last address into a current last address cache register.
In the embodiment of the invention, a database data management method is provided, which comprises the steps of responding to a configuration starting instruction, requesting configuration information, storing the configuration information in an internal storage table, calculating service information according to the configuration information, storing the service information in an internal cache register, and outputting the service information in the internal cache register after receiving a service request. By means of the method, the technical problem that the existing data table is difficult to manage is solved, and the technical effect of effectively improving the management efficiency of the data table is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principle of the invention. In the drawings:
FIG. 1 is a method flow diagram of a database data management method according to an embodiment of the invention;
FIG. 2 is a flow chart of configuration operations according to an embodiment of the present invention;
FIG. 3 is a flow diagram of service preparation operations according to an embodiment of the present invention;
FIG. 4 is a flow diagram of a service request response operation according to an embodiment of the present invention;
fig. 5 is a block diagram of a database data management apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the following embodiments and accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
FIG. 1 is a flow chart of a method of one embodiment of a database data management method as described herein. Although the present application provides method operational steps or apparatus configurations as illustrated in the following examples or figures, more or fewer operational steps or modular units may be included in the methods or apparatus based on conventional or non-inventive efforts. In the case of steps or structures which do not logically have the necessary cause and effect relationship, the execution sequence of the steps or the module structure of the apparatus is not limited to the execution sequence or the module structure described in the embodiments and shown in the drawings of the present application. When the described method or module structure is applied in an actual device or end product, the method or module structure according to the embodiments or shown in the drawings can be executed sequentially or executed in parallel (for example, in a parallel processor or multi-thread processing environment, or even in a distributed processing environment).
Specifically, as shown in fig. 1, a database data management method provided in an embodiment of the present invention may include the following steps:
step 101: receiving a configuration starting instruction;
step 102: requesting configuration information in response to the configuration start instruction;
step 103: storing the configuration information in an internal storage table;
step 104: calculating to obtain service information according to the configuration information, and storing the service information into an internal cache register;
step 105: and outputting the service information in the internal cache register after receiving the service request.
In the above embodiment, a database data management method is provided, in which configuration information is requested in response to a configuration start instruction, the configuration information is stored in an internal storage table, then service information is obtained by calculation according to the configuration information, the service information is stored in an internal cache register, and after a service request is received, the service information in the internal cache register is output. By means of the method, the technical problem that the existing data table is difficult to manage is solved, and the technical effect of effectively improving the management efficiency of the data table is achieved.
In some embodiments, a database data management method may include a configuration step, a service preparation step, and a provision service step. Wherein, the configuration step may include the above steps 101 to 103, that is, receiving a configuration start instruction; requesting configuration information in response to the configuration start instruction; and a step of storing the configuration information in an internal storage table. The service preparation step may include the step 104 of calculating service information according to the configuration information and storing the service information in an internal cache register. The step of providing service may comprise the step 105 of outputting the service information in the internal cache register after receiving the service request. Wherein the configuring step, the service preparing step, and the providing step are performed serially or in parallel.
The data to be processed can be grouped by the configuration information, each group of data to be processed is divided into small segments of data with equal length according to the calculated service information, and the small segments of data are distributed to a plurality of processing units for parallel processing (a configuration step, a service preparation step and a service providing step). In this way, since the configuration operation speed is fast, the speed of processing data by the processing units according to the service information is slow, so that each processing unit can be ensured to be in a high-efficiency working state of full load, and even if the number of processing paths is expanded to thousands of paths or higher, the working efficiency of the processing units cannot be reduced. Therefore, the problems that the data to be processed possibly come from the same group of input ports, the length of each group of data to be processed is not fixed and the like can be solved, and when hundreds, thousands or higher-order paths of data are processed in parallel, each processing unit can still be ensured to be in a full-load efficient working state, so that the capacity of data management can be improved.
In this embodiment, the speed of data processing can be increased by multiplexing parallel processing with a dedicated processor.
Specifically, in actual implementation, the current working state may be indicated by outputting a busy indication and a ready indication. That is, in the process of receiving a configuration start instruction, requesting configuration information in response to the configuration start instruction, and storing the configuration information in an internal storage table, a busy indication is output; and outputting a service ready indication to the outside in the process of calculating to obtain service information according to the configuration information and storing the service information into an internal cache register. That is, the busy indication and the ready-to-service indication are output to indicate the status of the data table, and when the busy indication is output, the data table indicates that the configuration operation is being performed, and the data table does not temporarily respond to the next configuration start instruction. When a service ready indication is output, it indicates that a service can be provided.
In response to the configuration start instruction, the process of requesting configuration information may specifically include:
s1: according to the table number and the column number, first configuration information is requested to the outside, wherein the first configuration information comprises: a current head address, a current end address, a next block number, and a first valid indication of a next address, where the configuration start instruction carries: table number, column number, and channel number;
s2: storing the first configuration information in a row corresponding to the channel number in an internal storage table, where a second configuration information and a current address are also stored in the row corresponding to the channel number, the second configuration information is set to 0, and the current address is set to a current head address, where the second configuration information includes: a second valid indication of a next first address, a next last address, a next address;
s3: requesting second configuration information and the number of the next block to the outside according to the number of the next block in the first configuration information;
s4: and updating the second configuration information stored in the row corresponding to the channel number in the internal storage table through the second configuration information obtained by the request, and updating the number of the next block to the number of the next block.
Correspondingly, calculating to obtain service information according to the configuration information and the fixed parameters, and storing the service information in an internal cache register, may include:
s1: reading a channel number from a first-in first-out memory and placing the channel number into a channel number cache register;
s2: according to the extracted channel number, extracting the information of the first configuration information except the serial number of the next block, the second configuration information and the current address from the corresponding line in the internal storage table;
s3: summing the current address and the fixed parameters to obtain a sum value;
s4: judging the size between the sum value and the current last address;
s5: if the sum value is smaller than the current last address, adding 1 to the current address and storing the current address into a current first address cache register, storing the sum value into the current last address cache register, updating the current address of the line corresponding to the channel number in the internal storage table by using the sum value, storing the taken channel number into a first-in first-out memory, and outputting a service ready instruction outwards;
s6: and if the sum value is larger than or equal to the current last address, adding 1 to the current address and storing the current address into a current first address cache register, and storing the current last address into a current last address cache register.
After the first configuration information, the second configuration information and the current address are fetched from the corresponding row in the internal storage table according to the fetched channel number, based on the first valid indication of the next address and the second valid indication of the next address in the configuration information, the following policies may be implemented:
1) When the sum value is larger than or equal to the current last address and the first effective indication of the next address is 0, storing the taken channel number into a first-in first-out memory again and outputting a service ready indication outwards;
2) And under the condition that the sum value is greater than or equal to the current end address and the first effective indication of the next address is 1, updating the current end address stored in the row corresponding to the channel number in the internal storage table to the next taken first address, updating the current end address to the next taken end address, updating the current address to the next taken first address, and updating the first effective indication of the next address to the second effective indication of the next taken address.
Further, after 2), the method may further include:
2-1) under the condition that the second effective indication of the next address is 0, storing the taken channel number into the first-in first-out memory again, and outputting a service ready indication outwards;
2-2) under the condition that the second effective indication of the next address is 1, updating the second configuration information through the first configuration information of the line corresponding to the channel number, storing the taken channel number into the first-in first-out memory again, and outputting a service ready indication outwards.
The above method is described below with reference to a specific embodiment, however, it should be noted that the specific embodiment is only for better describing the present application and is not to be construed as a limitation of the present application.
In this example, a method for configuring a data storage table and controlling a response to a service request is provided, which may include: configuration, service preparation and service request response. These three operations may be independent of each other and may be performed in parallel. Specifically, for example, configuration information is obtained and stored in the internal storage table through two configuration requests according to an externally input start configuration instruction and corresponding parameters, and a "busy" instruction is always output outwards in the process. And then, calculating service information according to the configuration information and the fixed parameters and a certain rule, storing the service information into an internal cache register, and simultaneously outputting a service ready indication outwards. And finally, after receiving the service request, outputting the service information in the internal cache register and simultaneously outputting a service information effective indication outwards.
The three successive operations described above are described below:
as shown in fig. 2, the configuration operation may include:
1) Receiving a configuration starting instruction, wherein the configuration starting instruction carries parameters such as a table number, a column number, a channel number and the like required by configuration, and then outputting a busy indication to the outside, wherein the busy indication is used for indicating that configuration operation is being performed.
2) According to the 'table number' and 'column number' carried in the configuration instruction, first configuration information is requested to the outside: current first address, current last address, next block number, first valid indication of next address.
3) And storing the received configuration information in an internal storage table and storing the configuration information in a row corresponding to the channel number. The row also stores the "next first address", "next last address", and the "second valid indication of the next address", which are temporarily 0, and also stores the "current address", which is temporarily the same value as the "current first address".
4) Requesting second configuration information and the number of the next block to the outside through the "number of the next block" received for the first time, wherein the second configuration information includes: a next first address, a next last address, a second valid indication of a next address.
5) And updating the data of the line corresponding to the channel number in the internal storage table by using the received configuration information, and sequentially updating the data by using the current first address, the current last address, the number of the next block, and the first valid indication of the next address, namely the data of the next first address, the next last address, the number of the next block and the second valid indication of the next address. And after the updating is finished, canceling the busy indication output to the outside, and finishing the configuration operation.
As shown in fig. 3, the service preparation operation may include:
1) The channel number is stored by an internal first-in-first-out memory.
2) If the configuration is just completed, the service is not ready, and the FIFO has data, a channel number is fetched from the FIFO and placed into the channel number cache register.
3) According to the fetched channel number, the "current first address", "current last address", "current address", "first valid indication of next address", "next first address", "next last address", "second valid indication of next address" are fetched from the corresponding row in the internal memory table.
4) And summing the current address and the fixed parameter, and judging the sum of the current address and the fixed parameter and the size of the current end address.
5) And if the sum value is smaller than the current last address, adding 1 to the current address and storing the added value into a current first address cache register, and storing the sum value into a current last address cache register. And updating the current address of the row corresponding to the channel number in the internal storage table by using the sum value. And storing the taken channel number into the first-in first-out memory, and outputting a service ready indication to the outside to finish service preparation operation.
6) If the sum value is larger than or equal to the current last address, adding 1 to the current address and storing the current address into the current first address cache register, and storing the current last address into the current last address cache register.
Determination 3) "first valid indication of next address:
if the channel number is 0, the taken channel number is stored in the first-in first-out memory again, and the service ready indication is output to the outside, so that the service preparation operation is completed.
If the address is 1, the "current head address" stored in the row corresponding to the channel number in the internal storage table is updated to the "next head address" taken out from 3), the "current tail address" is updated to the "next tail address" taken out from 3), the "current address" is updated to the "next head address" taken out from 3), and the "first valid indication of the next address" is updated to the "second valid indication of the next address" taken out from 3).
And taking out a second effective indication of the next address for further judgment under the condition that the first effective indication of the next address is 1:
if the second effective indication of the next address is 0, the taken channel number is stored in the first-in first-out memory again, and the external output service ready indication is used to complete the service preparation operation.
If the "second valid indication of next address" is 1, the configuration information is requested to the outside by the "number of next block" taken out in 3): "current head address", "current end address", "first valid indication of next address", "number of next block". After receiving the configuration information, the information is used in turn to update the 'next first address', 'next last address', 'next block number' and 'second valid indication of the next address' in the row corresponding to the channel number in the internal storage table. And storing the taken channel number into a first-in first-out memory, and outputting a service ready indication to the outside to finish service preparation operation.
As shown in fig. 4, the service request response operation may include:
when the service is ready, the service request can be responded, and after the external service request is received, the current first address, the current last address and the channel number in the cache register are output, and the effective indication of the service information is output.
Based on the same inventive concept, the embodiment of the present invention further provides a database data management apparatus, as described in the following embodiments. Because the principle of the database data management device for solving the problems is similar to the database data management method, the implementation of the database data management device can refer to the implementation of the database data management method, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of hardware that implements a predetermined function. A structural block diagram of the database data management apparatus according to an embodiment of the present invention may include: the device comprises a receiving module, a request module, a storage module, a calculation module and an output module, and the structure is explained below.
The receiving module is used for receiving a configuration starting instruction;
a request module, configured to request configuration information in response to the configuration start instruction;
the storage module is used for storing the configuration information in an internal storage table;
the computing module is used for computing service information according to the configuration information and storing the service information into an internal cache register;
and the output module is used for outputting the service information in the internal cache register after receiving the service request.
The receiving module receives not only the configuration start command but also the parameters and configuration information for requesting configuration.
In one embodiment, the request module may specifically output a busy indication during a process of receiving a configuration start instruction, requesting configuration information in response to the configuration start instruction, and storing the configuration information in an internal storage table; the calculation module may specifically calculate service information according to the configuration information, and output a service ready indication to the outside after storing the service information in the internal cache register.
In one embodiment, the request module may include: a first requesting unit, configured to request first configuration information to the outside according to a table number and a column number, where the first configuration information includes: a current first address, a current last address, a number of a next block, and a first valid indication of a next address, where the configuration start instruction carries: table number, column number, and channel number; the storage module may include: a storing unit, configured to store the first configuration information in a row corresponding to the channel number in an internal storage table, where a second configuration information and a current address are also stored in the row corresponding to the channel number, the second configuration information is set to 0, and the current address is set to a current head address, where the second configuration information includes: a second valid indication of a next first address, a next last address, a next address; the request module may further include: a second requesting unit, configured to request, to the outside, second configuration information and a number of a next block according to the number of the next block in the first configuration information; the storage module may further include: and the updating unit is used for updating the second configuration information stored in the row corresponding to the channel number in the internal storage table through the second configuration information obtained by the request, and updating the number of the next block to the number of the next block.
In one embodiment, the calculation module may specifically read a channel number from the fifo memory and put the channel number into the channel number cache register; according to the extracted channel number, extracting the information of the first configuration information except the number of the next block, the information of the second configuration information except the number of the next block and the current address from the corresponding line in the internal storage table; summing the current address and the fixed parameters to obtain a sum value; judging the size between the sum value and the current last address; if the sum value is smaller than the current last address, the current address is added with 1 and then stored into a current first address cache register, the sum value is stored into a current last address cache register, the current address of the row corresponding to the channel number in the internal storage table is updated by using the sum value, the taken channel number is stored into a first-in first-out memory again, and a service ready indication is output outwards; and if the sum value is larger than or equal to the current last address, adding 1 to the current address and storing the current address into a current first address cache register, and storing the current last address into a current last address cache register.
In one embodiment, after the first configuration information, the second configuration information and the current address are taken out from the corresponding row in the internal storage table according to the taken channel number, the taken channel number may be stored in the first-in first-out memory again and a service ready indication may be output to the outside when the sum value is greater than or equal to the current end address and the first valid indication of the next address is 0; and under the condition that the sum value is greater than or equal to the current end address and the first effective indication of the next address is 1, updating the current end address stored in the row corresponding to the channel number in the internal storage table to the next taken first address, updating the current end address to the next taken end address, updating the current address to the next taken first address, and updating the first effective indication of the next address to the second effective indication of the next taken address.
In one embodiment, when the sum value is greater than or equal to the current end address and the first valid indicator of the next address is 1, the method further includes the following steps of updating the current head address stored in the row corresponding to the channel number in the internal storage table to the next head address to be fetched, updating the current end address to the next end address to be fetched, updating the current address to the next head address to be fetched, and updating the first valid indicator of the next address to the second valid indicator of the next address to be fetched: determining whether a second valid indication for a next address is 0; under the condition that the second effective indication of the next address is 0, storing the taken channel number into the first-in first-out memory again, and outputting a service ready indication outwards; and in the case that the second effective indication of the next address is 1, requesting configuration information, updating the information in the internal storage table through the received configuration information, storing the channel number into the first-in first-out memory, and outputting a service ready indication outwards.
In some embodiments, the calculation module comprises: an information reading unit and a calculation judging unit. The information reading unit may be configured to: and reading a channel number from the first-in first-out memory, placing the channel number into a channel number cache register, and taking out the information of the first configuration information except the serial number of the next block, the second configuration information and the current address from the corresponding line in the internal storage table according to the taken out channel number. The calculation judgment unit may be operable to: summing the current address and the fixed parameters to obtain a sum value; judging the size between the sum value and the current end address; if the sum value is smaller than the current last address, the current address is added with 1 and then stored into a current first address cache register, the sum value is stored into a current last address cache register, the current address of the row corresponding to the channel number in the internal storage table is updated by using the sum value, the taken channel number is stored into a first-in first-out memory again, and a service ready indication is output outwards; and if the sum value is larger than or equal to the current last address, adding 1 to the current address and storing the current address into a current first address cache register, and storing the current last address into a current last address cache register.
An embodiment of the present application further provides a specific implementation manner of an electronic device, which is capable of implementing all steps in the database data management method in the foregoing embodiment, where the electronic device specifically includes the following contents: a processor (processor), a memory (memory), a communication Interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete mutual communication through the bus; the processor is configured to call a computer program in the memory, and when executing the computer program, the processor implements all the steps in the database data management method in the foregoing embodiment, for example, when executing the computer program, the processor implements the following steps:
step 1: receiving a configuration starting instruction;
step 2: requesting configuration information in response to the configuration start instruction;
and step 3: storing the configuration information in an internal storage table;
and 4, step 4: calculating to obtain service information according to the configuration information, and storing the service information into an internal cache register;
and 5: and outputting the service information in the internal cache register after receiving the service request.
As can be seen from the above description, a database data management method is provided, in which configuration information is requested in response to a configuration start instruction, the configuration information is stored in an internal storage table, service information is obtained by calculation according to the configuration information, the service information is stored in an internal cache register, and the service information in the internal cache register is output after a service request is received. By means of the method, the technical problem that the existing data table is difficult to manage is solved, and the technical effect of effectively improving the management efficiency of the data table is achieved.
Embodiments of the present application further provide a computer-readable storage medium capable of implementing all steps in the database data management method in the foregoing embodiments, where the computer-readable storage medium stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements all steps of the database data management method in the foregoing embodiments, for example, when the processor executes the computer program, the processor implements the following steps:
step 1: receiving a configuration starting instruction;
and 2, step: requesting configuration information in response to the configuration start instruction;
and 3, step 3: storing the configuration information in an internal storage table;
and 4, step 4: calculating to obtain service information according to the configuration information, and storing the service information into an internal cache register;
and 5: and outputting the service information in the internal cache register after receiving the service request.
As can be seen from the above description, a database data management method is provided, in which configuration information is requested in response to a configuration start instruction, the configuration information is stored in an internal storage table, service information is obtained by calculation according to the configuration information, the service information is stored in an internal cache register, and the service information in the internal cache register is output after a service request is received. By means of the mode, the technical problem that an existing data table is difficult to manage is solved, and the technical effect of effectively improving the management efficiency of the data table is achieved.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
The foregoing description of specific embodiments has been presented for purposes of illustration and description. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Although the present application provides method steps as described in an embodiment or flowchart, additional or fewer steps may be included based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When implemented in practice, the apparatus or client products may be executed sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the methods shown in the embodiments or figures.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. In particular, it may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Although embodiments of the present description provide method steps as described in embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of sequences, and does not represent a unique order of performance. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. 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, the presence of additional identical or equivalent elements in processes, methods, articles, or apparatus that include the recited elements is not excluded.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. It is to be understood that, in implementing the embodiments of the present specification, functions of each module may be implemented in the same hardware or multiple hardware, or a module that implements the same function may be implemented by a combination of multiple sub-modules or sub-units, or the like. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Those skilled in the art will also appreciate that the same functionality can be implemented by the controller in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like, all by logically programming method steps. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be conceived to be both a software module implementing the method and a structure within a hardware component.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially 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. In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is only an example of the embodiments of the present disclosure, and is not intended to limit the embodiments of the present disclosure. Various modifications and alterations to the embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the embodiments of the present invention should be included in the scope of the claims of the embodiments of the present invention.

Claims (8)

1. A database data management method, comprising:
receiving a configuration starting instruction;
requesting configuration information in response to the configuration start instruction;
storing the configuration information in an internal storage table;
calculating to obtain service information according to the configuration information, and storing the service information into an internal cache register;
after receiving a service request, outputting service information in the internal cache register;
the configuration start instruction carries: table number, column number and channel number of the data table;
the requesting configuration information in response to the configuration start instruction includes:
according to the table number and the column number, first configuration information is requested to the outside, wherein the first configuration information comprises: a current first address, a current last address, a next block number, a first valid indication of a next address;
storing the first configuration information in a row corresponding to a channel number in an internal storage table, wherein second configuration information and a current address are also stored in the row corresponding to the channel number, and the second configuration information comprises: a second valid indication of a next first address, a next last address, a next address;
according to the number of the next block in the first configuration information, requesting second configuration information and the number of the next block to the outside;
and updating the second configuration information stored in the row corresponding to the channel number in the internal storage table through the second configuration information obtained by the request, and updating the number of the next block to the number of the next block.
2. The method of claim 1, wherein:
in the process of receiving a configuration starting instruction, responding to the configuration starting instruction, requesting configuration information, and storing the configuration information in an internal storage table, outputting a busy instruction outwards;
and calculating to obtain service information according to the configuration information, storing the service information into an internal cache register, and outputting a service ready indication to the outside.
3. The method of claim 1, wherein calculating service information according to the configuration information and storing the service information in an internal cache register comprises:
reading a channel number from a first-in first-out memory and placing the channel number into a channel number cache register;
according to the channel number, the information of the first configuration information except the serial number of the next block, the second configuration information and the current address are taken out from the corresponding line in the internal storage table;
summing the current address and the fixed parameters to obtain a sum value;
judging the size between the sum value and the current end address;
if the sum value is smaller than the current last address, adding 1 to the current address and storing the current address into a current first address cache register, storing the sum value into the current last address cache register, updating the current address of the line corresponding to the channel number in the internal storage table by using the sum value, storing the taken channel number into a first-in first-out memory, and outputting a service ready instruction outwards;
and if the sum value is larger than or equal to the current last address, adding 1 to the current address and storing the current address into a current first address cache register, and storing the current last address into a current last address cache register.
4. The method of claim 3, further comprising, after fetching the first configuration information, the second configuration information, and the current address in addition to the number of the next block, from the corresponding row in the internal storage table according to the fetched lane number:
when the sum value is more than or equal to the current last address and the first effective indication of the next address is 0, storing the taken channel number into the first-in first-out memory again, and outputting a service ready indication outwards;
and under the condition that the sum value is greater than or equal to the current last address and the first effective indication of the next address is 1, updating the current first address stored in the row corresponding to the channel number in the internal storage table to the next fetched first address, updating the current last address to the next fetched last address, updating the current address to the next fetched first address, and updating the first effective indication of the next address to the second effective indication of the next fetched address.
5. The method of claim 4, wherein if the sum is greater than or equal to the current end address and the first valid indicator of the next address is 1, updating the current head address stored in the row corresponding to the channel number in the internal storage table to the fetched next head address, updating the current end address to the fetched next end address, updating the current address to the fetched next head address, and updating the first valid indicator of the next address to the second valid indicator of the fetched next address, further comprising:
determining whether a second valid indication for a next address is 0;
under the condition that the second effective indication of the next address is 0, storing the taken channel number into the first-in first-out memory again, and outputting a service ready indication outwards;
and in the case that the second effective indication of the next address is 1, requesting configuration information, updating the information in the internal storage table through the received configuration information, storing the channel number into the first-in first-out memory, and outputting a service ready indication outwards.
6. The method of claim 1, comprising: a configuration step, a service preparation step and a service providing step;
wherein the configuring step comprises: receiving a configuration starting instruction; responding to the configuration starting instruction, and requesting configuration information; and storing the configuration information in an internal storage table;
the service preparation step includes: calculating to obtain service information according to the configuration information, and storing the service information into an internal cache register;
the step of providing the service includes: outputting the service information in the internal cache register after receiving the service request;
the configuring step, the service preparing step, and the providing step are performed in parallel.
7. A database data management apparatus, comprising:
the receiving module is used for receiving a configuration starting instruction;
a request module, configured to request configuration information in response to the configuration start instruction; the storage module is used for storing the configuration information in an internal storage table;
the computing module is used for computing service information according to the configuration information and storing the service information into an internal cache register;
the output module is used for outputting the service information in the internal cache register after receiving the service request;
the request module comprises: a first requesting unit, configured to request first configuration information from the outside according to a table number and a column number, where the first configuration information includes: a current first address, a current last address, a number of a next block, and a first valid indication of a next address, where the configuration start instruction carries: the table number, column number and channel number of the data table;
the memory module includes: a storing unit, configured to store the first configuration information in a row corresponding to the channel number in an internal storage table, where a second configuration information and a current address are also stored in the row corresponding to the channel number, and the second configuration information includes: a second valid indication of a next first address, a next last address, a next address;
the request module further comprises: a second requesting unit, configured to request, to the outside, second configuration information and a number of a next block according to the number of the next block in the first configuration information;
the memory module further includes: and the updating unit is used for updating the second configuration information stored in the row corresponding to the channel number in the internal storage table through the second configuration information obtained by the request, and updating the number of the next block to the number of the next block.
8. The apparatus of claim 7, wherein the service information is computed, and wherein the computing module comprises:
the information reading unit is used for reading a channel number from the first-in first-out memory and putting the channel number into the channel number cache register; according to the channel number, the information of the first configuration information except the serial number of the next block, the second configuration information and the current address are taken out from the corresponding line in the internal storage table;
the calculation judgment unit is used for summing the current address and the fixed parameters to obtain a sum value; judging the size between the sum value and the current end address; if the sum value is smaller than the current last address, the current address is added with 1 and then stored into a current first address cache register, the sum value is stored into a current last address cache register, the current address of the row corresponding to the channel number in the internal storage table is updated by using the sum value, the taken channel number is stored into a first-in first-out memory again, and a service ready indication is output outwards; and if the sum value is larger than or equal to the current last address, adding 1 to the current address and storing the current address into a current first address cache register, and storing the current last address into a current last address cache register.
CN202110615938.4A 2021-06-02 2021-06-02 Database data management method and device Active CN113448962B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110615938.4A CN113448962B (en) 2021-06-02 2021-06-02 Database data management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110615938.4A CN113448962B (en) 2021-06-02 2021-06-02 Database data management method and device

Publications (2)

Publication Number Publication Date
CN113448962A CN113448962A (en) 2021-09-28
CN113448962B true CN113448962B (en) 2022-10-28

Family

ID=77810827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110615938.4A Active CN113448962B (en) 2021-06-02 2021-06-02 Database data management method and device

Country Status (1)

Country Link
CN (1) CN113448962B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102011100969A1 (en) * 2011-05-09 2012-11-15 Dieter Weiler Method for operating at least one database on a hardware pool
CN105353669A (en) * 2014-08-21 2016-02-24 中兴通讯股份有限公司 Data processing method and data processing device
CN109828976A (en) * 2018-11-19 2019-05-31 中国石油大学(华东) A kind of frame of the configurable dynamic algorithm based on Redis caching
CN110209535A (en) * 2013-03-15 2019-09-06 亚马逊科技公司 Quick collapse for distributed data base system restores
CN110555041A (en) * 2018-03-30 2019-12-10 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and storage medium
WO2020083189A1 (en) * 2018-10-24 2020-04-30 北京金山云网络技术有限公司 Request processing method and device, api gateway, and readable storage medium
CN111198872A (en) * 2020-01-06 2020-05-26 中科驭数(北京)科技有限公司 Method and device for processing transactions by database
CN111427885A (en) * 2020-03-03 2020-07-17 中科驭数(北京)科技有限公司 Database management method and device based on lookup table
CN112035481A (en) * 2020-08-31 2020-12-04 中国平安财产保险股份有限公司 Data processing method, data processing device, computer equipment and storage medium
CN112631767A (en) * 2019-10-09 2021-04-09 华控清交信息科技(北京)有限公司 Data processing method, system, device, electronic equipment and readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8429313B2 (en) * 2004-05-27 2013-04-23 Sandisk Technologies Inc. Configurable ready/busy control
DE102007033992A1 (en) * 2007-07-19 2009-01-22 Biotronik Crm Patent Ag Programmable personal medical apparatus e.g. implantable pacemaker, data i.e. aftercare data, managing device, has administration unit determining existence of communication between management unit and devices
CN112368676A (en) * 2019-09-29 2021-02-12 深圳市大疆创新科技有限公司 Method and apparatus for processing data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102011100969A1 (en) * 2011-05-09 2012-11-15 Dieter Weiler Method for operating at least one database on a hardware pool
CN110209535A (en) * 2013-03-15 2019-09-06 亚马逊科技公司 Quick collapse for distributed data base system restores
CN105353669A (en) * 2014-08-21 2016-02-24 中兴通讯股份有限公司 Data processing method and data processing device
CN110555041A (en) * 2018-03-30 2019-12-10 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and storage medium
WO2020083189A1 (en) * 2018-10-24 2020-04-30 北京金山云网络技术有限公司 Request processing method and device, api gateway, and readable storage medium
CN109828976A (en) * 2018-11-19 2019-05-31 中国石油大学(华东) A kind of frame of the configurable dynamic algorithm based on Redis caching
CN112631767A (en) * 2019-10-09 2021-04-09 华控清交信息科技(北京)有限公司 Data processing method, system, device, electronic equipment and readable storage medium
CN111198872A (en) * 2020-01-06 2020-05-26 中科驭数(北京)科技有限公司 Method and device for processing transactions by database
CN111427885A (en) * 2020-03-03 2020-07-17 中科驭数(北京)科技有限公司 Database management method and device based on lookup table
CN112035481A (en) * 2020-08-31 2020-12-04 中国平安财产保险股份有限公司 Data processing method, data processing device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Programmable Caches with a Data Management Language and Policy Engine;Michael A. Sevilla 等;《2018 18th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGRID)》;20180716;203-212 *
面向数据库查询加速的异构体系结构设计与实现;李仁刚 等;《计算机工程与科学》;20201215;第42卷(第12期);2169-2178 *

Also Published As

Publication number Publication date
CN113448962A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN108416433B (en) Neural network heterogeneous acceleration method and system based on asynchronous event
US8381230B2 (en) Message passing with queues and channels
US10002023B2 (en) Method and apparatus for managing one or more tasks of a many-core system using one or more task descriptor entries
US20130036426A1 (en) Information processing device and task switching method
CN103336672B (en) Method for reading data, device and computing device
CN113313247B (en) Operation method of sparse neural network based on data flow architecture
CN115880132A (en) Graphics processor, matrix multiplication task processing method, device and storage medium
US8543722B2 (en) Message passing with queues and channels
CN111813517A (en) Task queue allocation method and device, computer equipment and medium
CN104573112A (en) Page query method and data processing node for OLTP cluster database
US10896056B2 (en) Cluster expansion method and apparatus, electronic device and storage medium
CN116069480B (en) Processor and computing device
CN113448962B (en) Database data management method and device
CN116795503A (en) Task scheduling method, task scheduling device, graphic processor and electronic equipment
CN111260043A (en) Data selector, data processing method, chip and electronic equipment
CN115065366A (en) Compression method, device and equipment of time sequence data and storage medium
GB2582868A (en) Hardware implementation of convolution layer of deep neural network
CN111381875B (en) Data comparator, data processing method, chip and electronic equipment
CN111260042B (en) Data selector, data processing method, chip and electronic equipment
JPH04288638A (en) Computer system
CN111915014B (en) Processing method and device of artificial intelligent instruction, board card, main board and electronic equipment
CN115328892B (en) Business form data structure processing method, system, electronic device and medium
JP2003244190A (en) Processor for data flow control switch and data flow control switch
JP2004133939A (en) Data sorting apparatus with query mechanism and method of operation
CN111124312B (en) Method and device for data deduplication

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
GR01 Patent grant
GR01 Patent grant