Method and apparatus for storing service data, electronic device and storage medium

By constructing horizontal and vertical index tables and querying storage addresses using target field values, the problem of data imbalance in business data storage was solved, achieving efficient storage and retrieval.

CN115757432BActive Publication Date: 2026-05-26BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING TOPSEC NETWORK SECURITY TECH
Filing Date
2022-12-07
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively manage data imbalances when storing business data, leading to wasted storage resources and low query efficiency.

Method used

By constructing horizontal and vertical index tables, and using target field values ​​to query storage addresses, efficient storage and retrieval of business data can be achieved.

Benefits of technology

It enables efficient storage and retrieval of business data, reducing the problems of wasted storage resources and prolonged query time caused by data imbalance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757432B_ABST
    Figure CN115757432B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and storage medium for storing business data. The method includes: determining a target field value of a related field in a horizontal index table by querying the horizontal index table; querying a vertical index table using the target field value to obtain the storage address of a target data table; and storing the business data to be stored in the target data table pointed to by the storage address. Therefore, this method enables the storage of business data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and more specifically, to methods, apparatus, electronic devices, and storage media for storing business data. Background Technology

[0002] With the development of technology, users are generating more and more business data in their online activities, including social data from online social networking, e-commerce data, entertainment information data, and so on. In practical applications, it is usually necessary to store this business data. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for storing business data.

[0004] The first aspect of this application provides a method for storing business data, including:

[0005] The target field value of the associated field in the horizontal index table is determined by querying the horizontal index table.

[0006] Use the target field value to query the vertical index table to obtain the storage address of the target data table;

[0007] The business data to be stored is stored in the target data table pointed to by the storage address.

[0008] In one embodiment, the horizontal index table further includes a time field, wherein the value of the time field reflects the business data generated at the time indicated by the field value in the corresponding data table; and,

[0009] By querying the horizontal index table, the target field value of the associated field in the horizontal index table is determined, specifically including:

[0010] Query the time field of the horizontal index table by the generation time of the business data to be stored;

[0011] Based on the value of the time field obtained from the query, the values ​​of related fields under the same record are obtained and used as the target field value.

[0012] In one embodiment, based on the value of the time field obtained from the query, the value of the associated field under the same record is retrieved, specifically including:

[0013] If multiple records contain the value of the time field obtained from the query, then the latest record among the multiple records is obtained based on the value of the time field obtained from the query.

[0014] Retrieve the field values ​​of the associated fields in the latest record.

[0015] In one embodiment, the horizontal index table further includes a start field, an end field, and a maximum data storage field, wherein the value of the start field reflects the number of the first business data item stored in the corresponding data table; the value of the end field reflects the number of the last business data item stored in the corresponding data table; and the value of the maximum data storage field reflects the maximum amount of data that the corresponding data table can store.

[0016] Before retrieving the field values ​​of the associated fields under the latest record, the method further includes:

[0017] Retrieve the values ​​of the start field, end field, and maximum data storage field for the latest record; and...

[0018] Retrieve the values ​​of the associated fields in the latest record, specifically including:

[0019] If the difference between the obtained end field value and the start field value is less than the field value of the maximum data storage volume field, then obtain the field value of the associated field under the latest record.

[0020] In one embodiment, if the difference between the obtained end field value and the start field value is equal to the field value of the maximum data storage size field, the field value of the associated field under the latest record is obtained, specifically including:

[0021] Create a new data table and generate a new record in the corresponding horizontal index table;

[0022] Obtain the field value of the associated field in the newly generated record, and use it as the target field value.

[0023] In one embodiment, the vertical index table includes a second association field, the field value of which corresponds to the field value of the association field in the horizontal index table; and the vertical index table also includes a storage address information field for the data table.

[0024] Using the target field value to query the vertical index table to obtain the storage address of the target data table, specifically including:

[0025] Use the target field value to query the second related field in the vertical index table to obtain the corresponding record in the vertical index table;

[0026] Based on the field value of the storage address information field in the record, obtain the storage address of the target data table.

[0027] A second aspect of this application provides a storage device for business data, including:

[0028] The target field value determination unit is used to determine the target field value of the associated field in the horizontal index table by querying the horizontal index table.

[0029] The storage address acquisition unit is used to query the vertical index table using the target field value to obtain the storage address of the target data table;

[0030] A storage unit is used to store business data to be stored in the target data table pointed to by the storage address.

[0031] In one embodiment, the horizontal index table further includes a time field, wherein the value of the time field reflects the business data generated at the time indicated by the field value in the corresponding data table; and,

[0032] The target field value determination unit specifically includes a target field value determination subunit, which is used to query the time field of the horizontal index table through the generation time of the business data to be stored; and to obtain the field value of the associated field under the same record based on the field value of the time field obtained by the query, as the target field value.

[0033] A third aspect of this application provides an electronic device, including:

[0034] processor;

[0035] A memory for storing processor-executable instructions; wherein the processor is configured to perform the method described in any one of the first aspects of the embodiments of this application.

[0036] A fourth aspect of this application provides a storage medium storing a computer program that can be executed by a processor to perform the method described in any one of the first aspects of this application.

[0037] The business data storage method provided in this application first determines the target field value of the associated field in the horizontal index table by querying the horizontal index table, then uses the target field value to query the vertical index table to obtain the storage address of the target data table, and then stores the business data to be stored in the target data table pointed to by the storage address. Therefore, this method can be used to store business data. Attached Figure Description

[0038] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0040] Figure 2 A schematic diagram of the interaction between a terminal and an electronic device provided in an embodiment of this application;

[0041] Figure 3 A schematic diagram illustrating the specific process of a business data storage method provided in one embodiment of this application;

[0042] Figure 4 This is a schematic diagram of the specific structure of a business data storage device provided in an embodiment of this application. Detailed Implementation

[0043] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. In the description of this application, terms such as "first," "second," and "third" are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance or order.

[0044] As mentioned earlier, in practical applications, it is usually necessary to store business data.

[0045] Based on this, embodiments of this application provide a method, apparatus, electronic device, and storage medium for storing business data, which can be used to store business data. For example... Figure 1 As shown, this embodiment provides an electronic device 1, which includes at least one processor 11 and a memory 12. Figure 1 Taking a processor as an example, the processor 11 and the memory 12 can be connected via a bus 10. The memory 12 stores instructions that can be executed by the processor 11. The instructions are executed by the processor 11 to enable the electronic device 1 to perform all or part of the process of the method in the following embodiments.

[0046] In practical applications, the electronic device 1 can be a mobile phone, laptop, desktop computer, or a large server or server cluster composed of them. For example, depending on the specific application scenario, when storing business data, the electronic device 1 can be a server or server cluster used to store that business data.

[0047] like Figure 2As shown, electronic device 1 can also interface with one or more terminals 2, and electronic device 1 can communicate with each terminal 2 separately. Terminal 2 can generate service data; for example, terminal 2 can be a user's mobile phone, computer, or other type of terminal, so that the user can perform network activities on terminal 2, thereby generating service data. Therefore, in one embodiment, when the user's network activities on terminal 2 generate service data, the electronic device 1 stores the service data.

[0048] This application provides a method for storing business data, which can be used to store business data. The method can be implemented by... Figure 1 The electronic device 1 shown acts as a server.

[0049] like Figure 3 The diagram shows the specific flow of this method, which includes the following steps:

[0050] Step S31: Determine the target field value of the associated field in the horizontal index table by querying the horizontal index table.

[0051] Step S32: Use the target field value to query the vertical index table to obtain the storage address of the target data table.

[0052] Step S33: Store the business data to be stored in the target data table pointed to by the storage address.

[0053] Here we can provide a unified explanation of steps S31 to S33 above.

[0054] In this embodiment, multiple data tables can be pre-built to store business data. The target data table in step S32 can be one of these data tables, used to store the business data to be stored. For example, in practical applications, after the server obtains the business data, it can use this business data as the business data to be stored, and then execute the method of this embodiment to store the business data to be stored in the target data table.

[0055] Of course, after the server obtains the business data, it can first determine the type of the business data. For example, the type can be divided into customer data, merchant data, or commodity data based on the object from which the data is generated. The type can also be divided into social data, e-commerce data, or entertainment information data based on different network activities. After determining the type of the obtained business data, if the type is a specified type, the method of this application embodiment is executed to store the business data to be stored in the target data table. Wherein, depending on actual needs, the specified type can be any one or more of customer data, merchant data, commodity data, social data, e-commerce data, and entertainment information data.

[0056] It should be noted that the data table in this application is used to store business data. However, in addition to the data table, the embodiments of this application also construct a horizontal index table and a vertical index table. In this way, in the above steps S31 to S32, the storage address of the target data table is obtained by querying the horizontal index table and the vertical index table respectively. Then, in step S33, the business data to be stored is stored in the target data table pointed to by the storage address.

[0057] The horizontal index table includes a correlation field, the vertical index table includes a second correlation field, and the field value of the second correlation field corresponds to the field value of the correlation field in the horizontal index table. The vertical index table also includes a storage address information field for the data table, and the field value of the storage address information field reflects the storage address of the corresponding data table.

[0058] In step S32 above, the target field value of the associated field can be used to query the vertical index table. Specifically, the target field value of the associated field can be used to query the second associated field in the vertical index table, thereby obtaining the field value of the second associated field corresponding to the target field value, and further obtaining the record containing the field value of the second associated field. That is, the record is the corresponding record in the vertical index table. After obtaining the record, the storage address of the target data table can be obtained based on the field value of the storage address information field in the record.

[0059] For example, Table 1 shows a horizontal index table in practical applications, and Table 2 shows a vertical index table in practical applications.

[0060] Table 1

[0061] interval_id1 1 2 ……

[0062] Table 2

[0063] interval_id2 Storage address information 1 a 2 b …… ……

[0064] Table 1 includes the `interval_id1` field, which is the associated field, and Table 2 includes the `interval_id2` field, which is the second associated field. The value of the `interval_id2` field in Table 2 corresponds to the value of the `interval_id1` field in Table 1. For example, the value of the `interval_id2` field in Table 2 is obtained through a one-to-one mapping of the value of the `interval_id1` field in Table 1. This one-to-one mapping can be achieved by adding a specific value, using other one-to-one mapping methods, or directly using the value of the `interval_id1` field as the corresponding value of the `interval_id2` field. Alternatively, the value of the `interval_id1` field can be encrypted, and the ciphertext can be used as the corresponding value of the `interval_id2` field.

[0065] In the examples in Tables 1 and 2 above, the field value of interval_id1 is directly used as the field value corresponding to the field of interval_id2. For example, if the field value of interval_id1 (as the target field value) is 1, the field value of the corresponding field of interval_id2 is also 1. Then, the records with the field value of interval_id2 being 1 are obtained, thereby obtaining the field value 'a' of the storage address information field in that record.

[0066] It should be further explained that, in practical applications, the storage address information field included in the vertical index table can specifically be a table type field, a table schema field, and a database field. The table type field's value is the type of business data stored in the corresponding data table; the table schema field's value is the schema of the corresponding data table, which includes winder, summer, public, etc.; and the database field's value is the name of the database to which the corresponding table belongs.

[0067] For example, Table 3 shows a vertical index table used in practical applications.

[0068] Table 3

[0069] interval_id2 table_type scheam database 1 customer winder order 2 merchants summer test …… …… …… ……

[0070] As shown in Table 3 above, the storage address information fields of this vertical index table specifically include table_type (i.e., the table type field), schema (i.e., the schema field to which the table belongs), and database (i.e., the database field to which the table belongs).

[0071] At this point, for example, if the value of the interval_id1 field in Table 1 (as the target field value) is 1, and the value of the corresponding interval_id2 field in Table 3 is also 1, then the records with the value of the interval_id2 field being 1 are obtained. In this case, the value of the table_type field "customer", the value of the schema field "winder", and the value of the database field "order" are obtained. Then, in step S33 above, the business data to be stored is stored in the target data table with the database name "order", the data table schema "winder", and is used to store business data of the "customer" type.

[0072] Of course, the vertical index table may also include a primary key field, a table version record field, and a table creation time field. The primary key field is the primary key of the vertical index table; the table version record field is the version identifier of the corresponding table; and the table creation time field is the timestamp of the creation of the corresponding table.

[0073] It should be further explained that the horizontal index table mentioned above can include a related field. This related field is typically the primary key field of the horizontal index table, but it can also be set in addition to the primary key field. Furthermore, the horizontal index table can also include a time field. The value of this time field reflects the business data generated at the time pointed to by the corresponding data table. In this case, step S31 can specifically include: first, obtaining the generation time of the business data to be stored; then, querying the time field of the horizontal index table using the generation time of the business data to be stored. Since the value of this time field reflects the business data generated at the time pointed to by the corresponding data table, the value of the related field under the same record is obtained based on the value of the time field obtained from the query.

[0074] In practical applications, in this horizontal index table, there may be only one record that includes the field value of the time field obtained from the query. In this case, you can directly retrieve that record and then further retrieve the field values ​​of the associated fields under that record. Of course, there may also be multiple records that include the field value of the time field obtained from the query. In this case, you can retrieve the latest record among the multiple records based on the field value of the time field obtained from the query, and then retrieve the field values ​​of the associated fields under the latest record.

[0075] For example, Table 4 shows a horizontal index table used in practical applications.

[0076] Table 4

[0077] interval_id1 record_date seq start_id end_id entry_num 1 202208 1 1 100 500000 2 202209 1 101 500100 500000 3 202209 2 500101 900100 500000 4 202210 1 900101 912101 1000000 …… …… …… …… …… ……

[0078] As shown in Table 4 above, this horizontal index table includes the interval_id1 field (association field) and the record_date field (i.e., time field). For example, the record_date field value of 202208 indicates that the corresponding data table is used to store business data generated at the time pointed to by the field value 202208, that is, business data generated in August 2022; the record_date field value of 202209 indicates that the corresponding data table is used to store business data generated in September 2022; and the record_date field value of 202210 indicates that the corresponding data table is used to store business data generated in October 2022.

[0079] Therefore, we can first obtain the generation time of the business data to be stored, for example, the generation time of the business data to be stored is August 2022. Then, using the generation time August 2022, we can query the record_date field in Table 4 above. Therefore, based on the field value 202208 of the record_date field obtained by the query, there is only one record that includes the field value 202208. We can then obtain the field value 1 of the interval_id1 field under that record as the target field value of the interval_id1 field.

[0080] For example, if the data to be stored was generated in September 2022, we can query the record_date field in Table 4 based on the generation time of September 2022. According to the value 202209 of the record_date field obtained from the query, there are two records that include the value 202209. Then, we can get the latest record and further get the value 3 of the interval_id1 field in the latest record as the target value of the interval_id1 field.

[0081] Of course, as shown in Table 4 above, this horizontal index table can also include a table number field (i.e., the seq field in Table 4), where the value of the table number field is the number of the table generated in the same month. Additionally, this horizontal index table can also include a table creation time field, where the value of the creation time field is the time the corresponding table was created.

[0082] In practical applications, this horizontal index table can also include a start field, an end field, and a maximum data storage size field. For example, in Table 4 above, start_id is the start field, end_id is the end field, and entry_num is the maximum data storage size field.

[0083] The value of the "Start" field reflects the ID of the first business data record stored in the corresponding data table; the value of the "End" field reflects the ID of the last business data record stored in the corresponding data table; and the value of the "Maximum Data Storage Capacity" field reflects the maximum amount of data that the corresponding data table can store.

[0084] For example, in the first record of Table 4 above, the values ​​of the start_id field are 1, the end_id field is 100, and the entry_num field is 500000, indicating that the maximum number of data records that the corresponding data table can store is 500000 records. In this data table, the first business data record stored is numbered 1, and the last business data record stored is numbered 100. In the second record of Table 4 above, the values ​​of the start_id field are 101, the end_id field is 500100, and the entry_num field is 500000, indicating that the maximum number of data records that the corresponding data table can store is 500000 records. In this data table, the first business data record stored is numbered 101, and the last business data record stored is numbered 500100.

[0085] Before retrieving the field value of the associated field in the latest record, this method can also include: retrieving the field values ​​of the start field, end field, and maximum data storage size field in the latest record; then, based on the field values ​​of the start field, end field, and maximum data storage size field, determining whether the data table is full. For example, the difference between the field value of the end field and the field value of the start field can be calculated, and then this difference can be compared with the field value of the maximum data storage size field. If the difference is less than the field value of the maximum data storage size field, it means that the corresponding data table is not full. At this point, the field value of the associated field in the latest record can be retrieved as the target field value of the associated field.

[0086] Of course, if the difference is equal to the value of the maximum data storage field, it means that the corresponding data table is full. At this time, a new data table can be created, and a new record can be generated in the corresponding horizontal index table. Then, the value of the associated field in the newly generated record can be obtained as the target field value of the associated field.

[0087] For example, if the type of business data to be stored is "customer", a new data table can be created to store this type of business data, and a new record can be generated in the corresponding horizontal index table. In this new record, the value of the record_date field corresponds to the generation time of the business data to be stored, the entry_num field is set to 500000, and the values ​​of the start_id, end_id, and interval_id1 fields are generated accordingly. The value of the interval_id1 field is then obtained as the target field value.

[0088] Additionally, the name of the new data table can be the type of business data to be stored plus the target field value. For example, if the new data table is used to store business data of type "customer" and the target field value is 3, then the name of the new data table can be "customer+3".

[0089] It should be noted that after creating a new data table and generating a new record in the corresponding horizontal index table, and then obtaining the field value of the associated field in the newly generated record (as the target field value), when querying the vertical index table using the target field value, since the target field value is the field value of the associated field in the newly generated record, the second associated field in the vertical index table does not have a corresponding field value. Therefore, this method can also include generating a corresponding record in the vertical index table.

[0090] The business data storage method provided in this application first determines the target field value of the associated field in the horizontal index table by querying the horizontal index table, then uses the target field value to query the vertical index table to obtain the storage address of the target data table, and then stores the business data to be stored in the target data table pointed to by the storage address. Therefore, this method can be used to store business data.

[0091] In practical applications, business data can often be stored directly in data tables. For example, multiple data tables can be pre-built, and when business data is obtained, it can be stored directly in one or more of these tables. However, this data storage method makes it inconvenient to query business data after it has been stored, especially when there are many data tables. It is difficult to determine which table(s) the business data has been stored in, making it difficult to query.

[0092] In this embodiment, since a horizontal index table and a vertical index table are created in addition to the data table, the storage address of the target data table is obtained by querying the horizontal index table and the vertical index table respectively during the storage of business data. Then, the business data to be stored is stored in the target data table. In this way, during the data query process, the storage address of the target data table can also be obtained by querying the horizontal index table and the vertical index table. Then, data query is performed on the target data table to obtain the business data that needs to be queried.

[0093] In addition, in practical applications, considering that the amount of business data generated at different times usually varies greatly, for example, during the Double 11 and 6.18 shopping festivals, the e-commerce sector usually generates relatively more business data, while during the Spring Festival, the e-commerce sector usually generates relatively less business data. In order to prevent one or a few data tables from storing too much data while other data tables store too little data, resulting in an imbalance in the amount of data between data tables, this imbalance is due to two reasons: firstly, the existence of data tables with too little data leads to wasted storage resources, and secondly, the existence of data tables with too little data leads to longer data query times.

[0094] Therefore, in the horizontal index table of this application embodiment, by further including a time field to limit the generation time of the business data stored in the data table, and also including a start field, an end field and a maximum data storage field to limit the amount of data stored in the data table, the business data can be relatively dispersed and stored in multiple different data tables, reducing the imbalance.

[0095] After storing business data using the embodiments of this application, business data can also be queried. For example, a query request for business data is first received, which carries the generation time of the business data to be queried (referred to as the target generation time). Then, the time field of the horizontal index table is queried using the target generation time to determine the corresponding field value in the time field. Then, the record containing the field value is obtained, and the field value of the associated field in the record is further obtained. Then, the field value of the associated field is queried using the field value of the associated field to obtain the storage address of the second target data table. Then, the business data is queried in the second target data table through the storage address.

[0096] Based on the same inventive concept as the business data storage method provided in the embodiments of this application, the embodiments of this application also provide a business data storage device. For any unclear aspects of this device embodiment, please refer to the corresponding content of the method embodiment. Figure 4The diagram shown illustrates the specific structure of the device 40, which includes: a target field value determination unit 401, a storage address acquisition unit 402, and a storage unit 403, wherein:

[0097] The target field value determination unit 401 is used to determine the target field value of the associated field in the horizontal index table by querying the horizontal index table;

[0098] The storage address acquisition unit 402 is used to query the vertical index table using the target field value to obtain the storage address of the target data table;

[0099] Storage unit 403 is used to store business data to be stored in the target data table pointed to by the storage address.

[0100] The apparatus 40 provided in the embodiments of this application adopts the same inventive concept as the business data storage method provided in the embodiments of this application. Under the premise that the method can solve the technical problem, the apparatus 40 can also solve the technical problem, which will not be elaborated here.

[0101] In addition, in practical applications, the technical effects achieved by combining the device 40 with specific hardware devices, cloud technology, etc., are also within the scope of protection of this application. For example, using a distributed cluster approach to deploy different units in the device 40 in different nodes of the distributed cluster to improve efficiency; or deploying some units in the device 40 in the cloud to reduce costs.

[0102] The horizontal index table further includes a time field, wherein the value of the time field reflects the business data generated at the time indicated by the field value in the corresponding data table; and the target field value determination unit 401 may specifically include a target field value determination subunit, used to query the time field of the horizontal index table through the generation time of the business data to be stored; and to obtain the field value of the associated field under the same record based on the field value of the time field obtained by the query, as the target field value.

[0103] Specifically, obtaining the field values ​​of related fields under the same record based on the field value of the time field obtained from the query can include: when multiple records all include the field value of the time field obtained from the query, obtaining the latest record among the multiple records based on the field value of the time field obtained from the query; and obtaining the field values ​​of related fields under the latest record.

[0104] The horizontal index table further includes a start field, an end field, and a maximum data storage capacity field. The start field value reflects the ID of the first business data record stored in the corresponding data table; the end field value reflects the ID of the last business data record stored in the corresponding data table; and the maximum data storage capacity field value reflects the maximum amount of data the corresponding data table can store. Before obtaining the field value of the associated field under the latest record, the device 40 may further include: a second acquisition unit, used to acquire the field values ​​of the start field, end field, and maximum data storage capacity field under the latest record; and, specifically, acquiring the field value of the associated field under the latest record may include: acquiring the field value of the associated field under the latest record if the difference between the acquired end field value and the start field value is less than the field value of the maximum data storage capacity field.

[0105] If the difference between the obtained end field value and the start field value is equal to the field value of the maximum data storage volume field, the field value of the associated field under the latest record is obtained. Specifically, this includes: creating a new data table and generating a new record in the corresponding horizontal index table; obtaining the field value of the associated field in the newly generated record as the target field value.

[0106] The vertical index table includes a second associated field, the value of which corresponds to the value of the associated field in the horizontal index table; and the vertical index table also includes a storage address information field for the data table; the storage address acquisition unit 402 may specifically include: a storage address acquisition subunit, used to query the second associated field in the vertical index table using the target field value to obtain the corresponding record in the vertical index table; and to obtain the storage address of the target data table based on the value of the storage address information field in the record.

[0107] This invention also provides a storage medium storing a computer program that can be executed by a processor to complete all or part of the methods described in this application. The storage medium can be a disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc. The storage medium may also include combinations of the above types of memory.

[0108] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A storage method of service data, characterized by, The method includes: The target field value of the associated field in the horizontal index table is determined by querying the horizontal index table. Use the target field value to query the vertical index table to obtain the storage address of the target data table; Store the business data to be stored in the target data table pointed to by the storage address; The horizontal index table also includes a time field, wherein the value of the time field reflects the business data generated at the time indicated by the field value in the corresponding data table; and, the step of determining the target field value of the associated field in the horizontal index table by querying the horizontal index table specifically includes: querying the time field of the horizontal index table based on the generation time of the business data to be stored; and obtaining the field value of the associated field under the same record based on the field value of the time field obtained from the query, as the target field value.

2. The method of claim 1, wherein, Based on the value of the time field obtained from the query, retrieve the values ​​of related fields for the same record, specifically including: If multiple records contain the value of the time field obtained from the query, then the latest record among the multiple records is obtained based on the value of the time field obtained from the query. Retrieve the field values ​​of the associated fields in the latest record.

3. The method of claim 2, wherein, The horizontal index table also includes a start field, an end field, and a maximum data storage field. The value of the start field reflects the number of the first business data item stored in the corresponding data table; the value of the end field reflects the number of the last business data item stored in the corresponding data table; and the value of the maximum data storage field reflects the maximum amount of data that the corresponding data table can store. Before retrieving the field values ​​of the associated fields under the latest record, the method further includes: Retrieve the values ​​of the start field, end field, and maximum data storage field for the latest record; and... Retrieve the values ​​of the associated fields in the latest record, specifically including: If the difference between the obtained end field value and the start field value is less than the field value of the maximum data storage volume field, then obtain the field value of the associated field under the latest record.

4. The method of claim 3, wherein, If the difference between the obtained end field value and the start field value is equal to the maximum data storage capacity field value, then obtain the field value of the associated field for the latest record, specifically including: Create a new data table and generate a new record in the corresponding horizontal index table; Obtain the field value of the associated field in the newly generated record, and use it as the target field value.

5. The method of claim 1, wherein, The vertical index table includes a second association field, the value of which corresponds to the value of the association field in the horizontal index table; and the vertical index table also includes a data table storage address information field. Using the target field value to query the vertical index table to obtain the storage address of the target data table, specifically including: Use the target field value to query the second related field in the vertical index table to obtain the corresponding record in the vertical index table; Based on the field value of the storage address information field in the record, obtain the storage address of the target data table.

6. A storage apparatus of service data, characterized by, include: The target field value determination unit is used to determine the target field value of the associated field in the horizontal index table by querying the horizontal index table. The storage address acquisition unit is used to query the vertical index table using the target field value to obtain the storage address of the target data table; Storage unit, used to store business data to be stored into the target data table pointed to by the storage address; The horizontal index table also includes a time field, wherein the value of the time field reflects the business data generated at the time indicated by the field value in the corresponding data table; and the target field value determination unit specifically includes a target field value determination subunit, which is used to query the time field of the horizontal index table through the generation time of the business data to be stored. Based on the value of the time field obtained from the query, the values ​​of related fields under the same record are obtained and used as the target field value.

7. An electronic device, comprising: include: processor; Memory for storing processor-executable instructions; wherein the processor is configured to perform the method as described in any one of claims 1-5.

8. A storage medium, characterized by The storage medium stores a computer program that can be executed by a processor to perform the method described in any one of claims 1-5.