A data table storage method and device, electronic equipment and readable medium
By acquiring attribute information from scattered data tables through an information system and verifying their consistency, the data is written into a structured data table. This solves the problem of inconvenient storage of scattered data tables, achieves unified management, improves data accuracy, and prepares the data for big data applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2022-12-21
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies cannot effectively manage and store fragmented data tables with varying formats, making it difficult to guarantee data accuracy and authority.
The system obtains attribute information from scattered data tables, verifies data type consistency, and then writes it into a structured data table. The structured data table includes a fixed part and a flexible part. The fixed part is used to store attribute information, and the flexible part is used to store data from the scattered data tables.
It enables unified structured storage of fragmented data, improves data management efficiency, ensures data accuracy and authority, and prepares the data for big data applications.
Smart Images

Figure CN116257518B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of database technology, and in particular to a data table storage method, a data table storage device, an electronic device, and a computer-readable medium. Background Technology
[0002] In the daily operations of enterprises and government agencies, there is a large amount of scattered management and performance data stored on office computers in the form of Excel spreadsheets, such as the assessment process and results of short-term key tasks. These data are characterized by small volumes, varying timeframes, and non-fixed data fields. Current technology requires adding tables to a database after data acquisition before storage, which is not conducive to structured data storage. Therefore, these scattered data tables are often not stored uniformly but are kept by the person who created them. Since the data may be stored on anyone's computer, it is often unclear where to retrieve it when needed, compromising the accuracy and reliability of the data. Summary of the Invention
[0003] The present invention provides a data table storage method, apparatus, electronic device, and computer-readable storage medium to solve the problem of fragmented data table storage and inconvenience for unified management.
[0004] This invention discloses a data table storage method applied to an information system. The information system includes a preset structured data table and is communicatively connected to several user devices. Each user device stores several scattered data tables. The method includes:
[0005] The attribute information of the scattered data table is obtained through the information system; the attribute information includes field type information.
[0006] Verify whether the data type in the scattered data table is consistent with the field type information;
[0007] If the data type in the scattered data table is verified to be consistent with the field type information, then the scattered data table is written into the structured data table. The structured data table includes a fixed part and a flexible part. The fixed part is used to write the attribute information, and the flexible part is used to write the data in the scattered data table.
[0008] Optionally, the attribute information may also include field name information, and the method may further include:
[0009] The scattered data table is parsed, and the first row of the scattered data table is determined as the table header; the table header contains multiple fields arranged in order; each field has a corresponding field name;
[0010] The field names are compared and verified sequentially with the field name information;
[0011] If they match, return to the step of verifying whether the data type of each field in the scattered data table is consistent with the field type information;
[0012] If they match, the verification is successful.
[0013] Optionally, the attribute information further includes a data number, a data instance number, and a common instance number. The scattered data table contains multiple instance data tables, and the method for writing the scattered data table into the structured data table includes:
[0014] The data number, the data instance number, and the same instance number are filled into the fixed part; wherein the data number is used to identify the scattered data table, the data instance number is used to identify the instance data table in the scattered data table, and the same instance number is used to identify the reading order of the data in the scattered data table.
[0015] Optionally, the attribute information may also include primary key name information, and the method may further include:
[0016] According to the order of the fields in the table header, the data in the scattered data table is written into the elastic part based on the field name information, the field type information, and the primary key name information.
[0017] Optionally, the method further includes;
[0018] Based on the primary key name information, multiple scattered data tables are associated so that when reading multiple scattered data tables, the multiple scattered data tables can be concatenated.
[0019] Optionally, the fixed portion includes an auxiliary column for identifying the title and a title marker row, wherein the data corresponding to the title marker row in the auxiliary column is used to identify the header of the scattered data table.
[0020] Optionally, the attribute information also includes name information, and the step of verifying whether the data type of each field in the scattered data table is consistent with the field type information further includes:
[0021] Determine whether the name information stored in the information system matches the name information in the scattered data table;
[0022] If so, return to the step of parsing the scattered data table and determining the first row of the scattered data table as the header of the scattered data table.
[0023] This invention also discloses a data table storage device applied to an information system. The information system includes a preset structured data table, and the information system is communicatively connected to several user devices. Each user device stores several scattered data tables. The device includes:
[0024] The acquisition module is used to acquire attribute information of the scattered data table through the information system; the attribute information includes field type information;
[0025] The verification module is used to verify whether the data type in the scattered data table is consistent with the field type information;
[0026] The writing module is used to write the scattered data table into the structured data table if the data type in the scattered data table is consistent with the field type information. The structured data table includes a fixed part and a flexible part. The fixed part is used to write the attribute information, and the flexible part is used to write the data in the scattered data table.
[0027] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0028] The memory is used to store computer programs;
[0029] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.
[0030] This invention also discloses one or more computer-readable media storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.
[0031] The embodiments of this invention offer the following advantages: By acquiring attribute information from scattered data tables through an information system, including field type information, the system verifies whether the data type in the scattered data tables matches the field type information. If the data type matches, the scattered data tables are written into a structured data table. This structured data table includes a fixed portion and a flexible portion. The fixed portion is used to write attribute information, and the flexible portion is used to write the data from the scattered data tables. This effectively achieves structured storage of scattered data with varying formats. It enables the unified storage of valuable operational and management data from enterprises and government agencies, preparing for future big data applications. Simultaneously, it avoids the need for frequent database structure management to adapt to non-fixed, scattered data, reducing the management difficulty of scattered data and improving work efficiency. Attached Figure Description
[0032] Figure 1 This is a flowchart illustrating the steps of a data table storage method provided in an embodiment of the present invention;
[0033] Figure 2 This is a schematic diagram of a structured data table in a data table storage method provided in an embodiment of the present invention;
[0034] Figure 3 This is a schematic diagram of the data table structuring principle in a data table storage method provided in an embodiment of the present invention;
[0035] Figure 4 This is a structural block diagram of a data table storage device provided in an embodiment of the present invention;
[0036] Figure 5 This is a block diagram of an electronic device provided in an embodiment of the present invention;
[0037] Figure 6 This is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. Detailed Implementation
[0038] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] Reference Figure 1 This diagram illustrates a flowchart of a data table storage method provided in an embodiment of the present invention. The method is applied to an information system, which includes a pre-set structured data table. The information system is communicatively connected to several user devices, and the user devices store several scattered data tables. Specifically, the method may include the following steps:
[0040] Step 101: Obtain the attribute information of the scattered data table through the information system; the attribute information includes field type information;
[0041] In daily work, there are numerous scattered data tables, such as management data and performance evaluation data, stored in tabular form on user devices. These scattered data tables are usually stored on the computer of the person who created them, without unified storage, making it inconvenient to store and manage them in a structured manner. In this embodiment of the invention, an information system is introduced. This information system can communicate and connect with multiple user devices, and includes preset structured data tables. After creating tables on the user device, the user can save the scattered data tables to the structured data tables in the information system. By using structured data tables, scattered data tables of different formats can be structured, facilitating unified storage and management.
[0042] The attribute information of scattered data tables is obtained through an information system. This attribute information reflects the attributes of the data in the scattered data tables. For example, if the scattered data table is a company's attendance sheet, the attribute information may include month information, which determines which month the attendance data recorded in the scattered data table belongs to. Attribute information may also include field numbers, which identify the field. Attribute information may also include primary key type, status information, etc. The attribute information can be adjusted according to the data characteristics and management needs of each unit and industry. This invention does not limit the content of the attribute information. The obtained attribute information is stored separately, similar to a directory, for faster retrieval when reading data from the scattered data tables. The attribute information may also include field type information to characterize the type of data under that field. The field type can be text or data, etc.
[0043] Step 102: Verify whether the data type in the scattered data table is consistent with the field type information;
[0044] Before users upload fragmented data tables to the information system, they can also validate the fragmented data tables through attribute information. The data types in the fragmented data tables can be text, data, etc. If the data type in the fragmented data table matches the field type information in the attribute information, the validation is considered successful.
[0045] In an optional embodiment of the present invention, the attribute information further includes name information, and the step of verifying whether the data type of each field in the scattered data table is consistent with the field type information further includes:
[0046] S11, determine whether the name information stored in the information system matches the name information of the scattered data table;
[0047] In an optional embodiment of the present invention, the attribute information may further include name information, which is the name corresponding to the scattered data table. Before verifying the data in the scattered data table, it can be determined whether the name information stored in the information system matches the name information of the scattered data table. If they match, it means that the attribute information related to the scattered data table has been saved in the information system in advance, and the data in the scattered data table can be further verified. If they do not match, it means that the attribute information related to the scattered data table has not been saved in the information system in advance, so the attribute information of the scattered data table needs to be saved to the information system in advance.
[0048] In an optional embodiment of the present invention, the file format of the scattered data table can also be verified. If the file format of the scattered data table is jpg, word, or other formats, it can be determined that it does not conform to the file format.
[0049] In an optional embodiment of the present invention, the file size of the scattered data table can also be verified. Considering that the data volume of the scattered data table is not large, the file size can be limited to a certain extent. The file size can be determined based on the hardware configuration information of the user device or based on the information system used.
[0050] S12, if it is determined that the name information stored in the information system matches the name information of the scattered data table, then proceed to S21.
[0051] If it is determined that the name information stored in the information system matches the name information of the scattered data table, then the scattered data table is parsed, and the first row of the scattered data table is determined as the header of the scattered data table, so that the data in the scattered data table can be further verified.
[0052] In an optional embodiment of the present invention, the attribute information further includes field name information, and the method further includes:
[0053] S21, parse the scattered data table, and determine the first row of the scattered data table as the table header; the table header contains multiple fields arranged in order; each field has a corresponding field name;
[0054] The table header is the beginning of a table, used to categorize the nature of certain issues. Attribute information can also include field name information. In scattered data tables, the first row is usually a header consisting of multiple sequentially arranged fields, each containing information on a specific topic. For example, in a "Contact List" data table, "Name" and "Phone Number" are attributes common to all rows in the table, so these columns are called the "Name" field and the "Phone Number" field. "Name" and "Phone Number" are the field names.
[0055] S22, sequentially compare and verify the field name with the field name information;
[0056] Starting with the first field in the table header, the field names are compared and verified against the field names in the attribute information to confirm consistency. The field names reflect the actual application information corresponding to the data stored in each field of the scattered data table. In one example, such as the "Contacts" data table, if the field name is "Name," then the data in each row under this field contains name information.
[0057] S23, if they match, return to step 102;
[0058] If the field name matches the field name information in the attribute information, further verify whether the data type of each row in the field matches the field type information in the attribute information; if the field name does not match the field name information in the attribute information, stop the subsequent verification and issue an error message. Verify each row of data in each field of the table header in turn. If the data type of each row matches the field type information in the attribute information, the verification is successful, and then proceed to verify the next field.
[0059] S24. If they match, then the verification is successful.
[0060] If the data type of each field in the table header matches the field type information, then the verification is successful.
[0061] Step 103: If the data type in the scattered data table is verified to be consistent with the field type information, then the scattered data table is written into the structured data table. The structured data table includes a fixed part and a flexible part. The fixed part is used to write the attribute information, and the flexible part is used to write the data in the scattered data table.
[0062] In this embodiment of the invention, the structured data table includes a fixed portion and a flexible portion. The fixed portion is the unchanging part of the structured data table, typically containing information that aids reading and writing, such as month information and field numbers from fragmented data tables. The flexible portion is the variable part of the structured data table, which can store data from different fragmented data tables. By setting a fixed portion and a flexible portion in the structured data table, the location where data from fragmented data tables is written to the structured data table is determined based on the fixed portion, and the data from fragmented data tables is written based on the flexible portion. This ensures that when storing different fragmented data tables, only data needs to be written to the flexible portion without changing the structure of the data in the structured data table.
[0063] In an optional embodiment of the present invention, the attribute information further includes a data number, a data instance number, and a common instance number; the scattered data table contains multiple instance data tables; and the method of writing the scattered data table into the structured data table includes:
[0064] The data number, the data instance number, and the same instance number are filled into the fixed part; wherein the data number is used to identify the scattered data table, the data instance number is used to identify the instance data table in the scattered data table, and the same instance number is used to identify the reading order of the data in the scattered data table.
[0065] Attribute information can include data ID, data instance ID, and co-instance ID. In an information system, the data ID serves as a unique identifier for each scattered data table, automatically assigned to each table. This allows the system to identify the corresponding scattered data table when accessing it. The data instance ID identifies the instance data table within the scattered data table. For example, if a company's third-quarter performance appraisal table needs to be stored in the information system, this table can be considered a scattered data table. Within this table, there are separate instance data tables for July, August, and September. To distinguish these three instance data tables within the same scattered data table, data instance IDs can be assigned to them. Similarly, in a database, data written sequentially may be out of order when read. To avoid this, co-instance IDs can be used. Within an instance data table, each row is assigned a sequence number as its co-instance ID, ensuring that data is read sequentially when accessing the instance data table later. When writing scattered data tables into structured data tables, the data number, data instance number, and same instance number from the attribute information are written into a fixed part.
[0066] In an optional embodiment of the present invention, the attribute information further includes primary key name information, and the method further includes:
[0067] According to the order of the fields in the table header, the data in the scattered data table is written into the elastic part based on the field name information, the field type information, and the primary key name information.
[0068] The attribute information also includes primary key name information. The primary key is a candidate key selected to uniquely identify a row in the table. A primary key can consist of one field or multiple fields, referred to as a single-field primary key or a multi-field primary key, respectively. When writing data from scattered data tables into the flexible part, the order of the fields in the scattered data tables is first determined. Then, according to the field order, each column of data is written into the structured data table sequentially based on the field name information, field type information, and primary key name information.
[0069] Understandably, the number of columns a structured data table can hold depends on the performance of the information system. A column count threshold for the structured data table can be set according to actual needs. After writing the scattered data tables into the flexible part, the number of columns in the structured data table is the sum of the number of columns in the fixed part and the number of columns in the scattered data tables. If the actual number of columns in the structured data table does not exceed the column count threshold, the column count threshold can be used as the final number of columns in the structured data table in order to keep the size of the structured data table consistent.
[0070] In an optional embodiment of the present invention, if the actual number of columns in the structured data table is less than the column number threshold, there will be idle columns. These idle columns can be automatically filled with meaningless values. Since different structured data tables have different storage mechanisms, the automatically filled content can be adjusted based on the type of the structured data table. If the structured data table is a database type that supports null values, no automatic filling is required to save space.
[0071] In an optional embodiment of the present invention, the method further includes;
[0072] Based on the primary key name information, multiple scattered data tables are associated so that when reading multiple scattered data tables, the multiple scattered data tables can be concatenated.
[0073] Primary key names are used to link multiple separate data tables. Multiple separate data tables with the same primary key name can be concatenated together during data retrieval. In one example, if an information system stores a company's performance appraisal tables for the four quarters of 2022, with each quarter's table being a separate data table, and an annual performance analysis for 2022 is needed at the end of the year, the four quarterly performance appraisal tables can be linked using primary key names. When retrieving these four tables, they can be concatenated to facilitate the user's analysis of the 2022 annual performance. In this embodiment of the invention, the primary key type can be text or data.
[0074] In an optional embodiment of the present invention, the fixed portion includes an auxiliary column for identifying the title and a title marker row, wherein the data corresponding to the title marker row in the auxiliary column is used to identify the header of the scattered data table.
[0075] In embodiments of the present invention, such as Figure 2 The diagram shows a structured data table. The fixed parts of the structured data table include auxiliary rows 201 and auxiliary columns 202. In auxiliary column 202, a certain column can be identified as the header. In auxiliary row 201, a certain column can be identified as the header row. Based on the data corresponding to the header row in the auxiliary column, the table header of the table containing the scattered data can be identified.
[0076] To enable those skilled in the art to better understand the technical solution of the present invention, reference is made to... Figure 3This is a diagram illustrating the principle of data table structuring. In one example, the attribute information of a fragmented data table includes: data ID, name information, field ID, field name, field type, primary key name, primary key type, starting month, and instance ID. Before writing the fragmented data table into the structured data table, the fragmented data table is validated. First, it is determined whether the name information in the attribute information matches the name information of the fragmented data table. If they match, it is verified whether the field names in the header of the fragmented data table are consistent with the field names in the attribute information. If they are consistent, it is verified whether the data type in the fragmented data table is consistent with the field type information in the attribute information. If they are consistent, the validation is successful, and the fragmented data table is structurated and stored in the structured data table. In this example, three auxiliary rows and seven auxiliary columns are set in the fixed section of the structured data table. The auxiliary rows are: Primary Key Flag Row 301, Data Type Flag Row 302, and Header Flag Row 303. The auxiliary columns are: Data Instance Number 304, Same Instance Number 305, Data Number 306, Month 307, Header Row Flag 308, Data Type Flag 309, and Primary Key Row Flag 310. In the Header Row Flag 303, a special flag can be set in the Header Row Flag 308 to identify the table header containing scattered data. The field names in the header are written sequentially to the area after column 8 in the Header Row 303. The data written in each auxiliary column of the remaining rows is the same. Starting from column 8, based on the primary key name information in Primary Key Flag Row 301, the field type information in Data Type Flag Row 302, and the field name information in the Header Row, the data in each column is written to the flexible section 311 in the order of field name, field type, and primary key name. Those skilled in the art will understand that the attribute information obtained in the examples is merely illustrative and can be adjusted according to actual needs; the present invention does not impose any limitations on this. The number of auxiliary rows and columns in the fixed portion is merely illustrative, as are the contents written into the auxiliary rows and columns, and the order in which the contents are written into the auxiliary rows and columns; the present invention does not impose any limitations on this.
[0077] This invention acquires attribute information from scattered data tables through an information system. The attribute information includes field type information. The system verifies whether the data type in the scattered data tables matches the field type information. If the data type matches, the scattered data tables are written into a structured data table. The structured data table includes a fixed part and a flexible part. The fixed part is used to write attribute information, and the flexible part is used to write the data from the scattered data tables. This effectively achieves structured storage of scattered data with varying formats. It enables unified storage of valuable operational and management data from enterprises and government agencies, preparing for future big data applications. Simultaneously, it avoids the need for frequent database structure management to adapt to non-fixed, scattered data, reducing the management difficulty of scattered data and improving work efficiency.
[0078] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0079] Reference Figure 4 This diagram illustrates a structural block diagram of a data table storage device provided in an embodiment of the present invention, applied to an information system. The information system includes a preset structured data table, and the information system is communicatively connected to several user devices. The user devices store several scattered data tables, and may specifically include the following modules:
[0080] The acquisition module 401 is used to acquire attribute information of the scattered data table through the information system; the attribute information includes field type information;
[0081] Verification module 402 is used to verify whether the data type in the scattered data table is consistent with the field type information;
[0082] The writing module 403 is used to write the scattered data table into the structured data table if the data type in the scattered data table is consistent with the field type information. The structured data table includes a fixed part and a flexible part. The fixed part is used to write the attribute information, and the flexible part is used to write the data in the scattered data table.
[0083] In an optional embodiment of the present invention, the attribute information further includes field name information, and the device further includes:
[0084] The parsing module is used to parse the scattered data table and determine the first row of the scattered data table as the table header; the table header contains multiple fields arranged in order; each field has a corresponding field name;
[0085] The first verification module is used to compare and verify the field name with the field name information in sequence;
[0086] The first return module is used to call the verification module 402 if the field name matches the field name information.
[0087] The determination module is used to determine that the verification is successful if the data type in the scattered data table is consistent with the field type information.
[0088] In an optional embodiment of the present invention, the attribute information further includes a data number, a data instance number, and a common instance number; the scattered data table contains multiple instance data tables; and the method of writing the scattered data table into the structured data table includes:
[0089] A fixed portion filling module is used to fill the data number, the data instance number, and the same instance number into the fixed portion; wherein the data number is used to identify the scattered data table, the data instance number is used to identify the instance data table in the scattered data table, and the same instance number is used to identify the reading order of the data in the scattered data table.
[0090] In an optional embodiment of the present invention, the attribute information further includes primary key name information, and the device further includes:
[0091] The elastic module write module is used to write data from the scattered data table into the elastic part according to the order of the fields in the table header, based on the field name information, the field type information, and the primary key name information.
[0092] In an optional embodiment of the present invention, the device further includes;
[0093] The association module is used to associate multiple scattered data tables based on the primary key name information, so as to concatenate the multiple scattered data tables when reading them.
[0094] In an optional embodiment of the present invention, the attribute information further includes name information, and the device further includes:
[0095] The second verification module is used to determine whether the name information stored in the information system matches the name information of the scattered data table;
[0096] The second return module is used to call the parsing module if the name information stored in the information system matches the name information in the scattered data table.
[0097] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0098] In addition, embodiments of the present invention also provide an electronic device, such as... Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0099] Memory 503 is used to store computer programs;
[0100] When processor 501 executes the program stored in memory 503, it performs the following steps:
[0101] The attribute information of the scattered data table is obtained through the information system; the attribute information includes field type information.
[0102] Verify whether the data type in the scattered data table is consistent with the field type information;
[0103] If the data type in the scattered data table is verified to be consistent with the field type information, then the scattered data table is written into the structured data table. The structured data table includes a fixed part and a flexible part. The fixed part is used to write the attribute information, and the flexible part is used to write the data in the scattered data table.
[0104] Optionally, the attribute information may also include field name information, and the method may further include:
[0105] The scattered data table is parsed, and the first row of the scattered data table is determined as the table header; the table header contains multiple fields arranged in order; each field has a corresponding field name;
[0106] The field names are compared and verified sequentially with the field name information;
[0107] If they match, return to the step of verifying whether the data type of each field in the scattered data table is consistent with the field type information;
[0108] If they match, the verification is successful.
[0109] Optionally, the attribute information further includes a data number, a data instance number, and a common instance number. The scattered data table contains multiple instance data tables, and the method for writing the scattered data table into the structured data table includes:
[0110] The data number, the data instance number, and the same instance number are filled into the fixed part; wherein the data number is used to identify the scattered data table, the data instance number is used to identify the instance data table in the scattered data table, and the same instance number is used to identify the reading order of the data in the scattered data table.
[0111] Optionally, the attribute information may also include primary key name information, and the method may further include:
[0112] According to the order of the fields in the table header, the data in the scattered data table is written into the elastic part based on the field name information, the field type information, and the primary key name information.
[0113] Optionally, the method further includes;
[0114] Based on the primary key name information, multiple scattered data tables are associated so that when reading multiple scattered data tables, the multiple scattered data tables can be concatenated.
[0115] Optionally, the fixed portion includes an auxiliary column for identifying the title and a title marker row, wherein the data corresponding to the title marker row in the auxiliary column is used to identify the header of the scattered data table.
[0116] Optionally, the attribute information also includes name information, and the step of verifying whether the data type of each field in the scattered data table is consistent with the field type information further includes:
[0117] Determine whether the name information stored in the information system matches the name information in the scattered data table;
[0118] If so, return to the step of parsing the scattered data table and determining the first row of the scattered data table as the header of the scattered data table.
[0119] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0120] The communication interface is used for communication between the aforementioned terminal and other devices.
[0121] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0122] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0123] like Figure 6 As shown, in another embodiment of the present invention, a computer-readable storage medium 601 is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the data table storage method described in the above embodiments.
[0124] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the data table storage method described in the above embodiments.
[0125] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0126] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0127] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0128] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A data table storage method, characterized in that, The method, applied to an information system containing pre-set structured data tables, and communicatively connected to several user devices storing several scattered data tables, includes: The attribute information of the scattered data table is obtained through the information system; the attribute information includes field type information. Verify whether the data type in the scattered data table is consistent with the field type information; If the data type in the scattered data table is verified to be consistent with the field type information, then the scattered data table is written into the structured data table. The structured data table includes a fixed part and a flexible part. The fixed part is used to write the attribute information, and the flexible part is used to write the data in the scattered data table. The attribute information also includes field name information, and the method further includes: The scattered data table is parsed, and the first row of the scattered data table is determined as the table header; the table header contains multiple fields arranged in order; each field has a corresponding field name; In a scattered data table, the first row is usually a header consisting of multiple fields arranged in order, each field containing information on a specific topic; The field names are compared and verified sequentially with the field name information; If they match, return to the step of verifying whether the data type of each field in the scattered data table is consistent with the field type information; If they match, the verification is successful.
2. The method according to claim 1, characterized in that, The attribute information also includes a data ID, a data instance ID, and a common instance ID. The scattered data table contains multiple instance data tables. The method for writing the scattered data table into the structured data table includes: The data number, the data instance number, and the same instance number are filled into the fixed part; wherein the data number is used to identify the scattered data table, the data instance number is used to identify the instance data table in the scattered data table, and the same instance number is used to identify the reading order of the data in the scattered data table.
3. The method according to claim 2, characterized in that, The attribute information also includes primary key name information, and the method further includes: According to the order of the fields in the table header, the data in the scattered data table is written into the elastic part based on the field name information, the field type information, and the primary key name information.
4. The method according to claim 3, characterized in that, The method further includes; Based on the primary key name information, multiple scattered data tables are associated so that when reading multiple scattered data tables, the multiple scattered data tables can be concatenated.
5. The method according to claim 1, characterized in that, The fixed portion includes an auxiliary column for identifying the title and a title marker row. The data corresponding to the title marker row in the auxiliary column is used to identify the header of the scattered data table.
6. The method according to claim 1, characterized in that, The attribute information also includes name information, and the step of verifying whether the data type of each field in the scattered data table is consistent with the field type information further includes: Determine whether the name information stored in the information system matches the name information in the scattered data table; If so, return to the step of parsing the scattered data table and determining the first row of the scattered data table as the header of the scattered data table.
7. A data table storage device, characterized in that, An application in an information system, wherein the information system includes pre-set structured data tables, the information system is communicatively connected to several user devices, and the user devices store several scattered data tables, the device comprising: The acquisition module is used to acquire attribute information of the scattered data table through the information system; the attribute information includes field type information. The verification module is used to verify whether the data type in the scattered data table is consistent with the field type information; The writing module is used to write the scattered data table into the structured data table if the data type in the scattered data table is consistent with the field type information. The structured data table includes a fixed part and a flexible part. The fixed part is used to write the attribute information, and the flexible part is used to write the data in the scattered data table. The attribute information also includes field name information, and the device further includes: The parsing module is used to parse the scattered data table and determine the first row of the scattered data table as the table header; the table header contains multiple fields arranged in order; each field has a corresponding field name; In a scattered data table, the first row is usually a header consisting of multiple fields arranged in order, each field containing information on a specific topic; The first verification module is used to compare and verify the field name with the field name information in sequence; The first return module is used to call the verification module if the field name matches the field name information. The determination module is used to determine that the verification is successful if the data type in the scattered data table is consistent with the field type information. The device is also used in a scattered data table, where the first row is typically a header consisting of multiple sequentially arranged fields, each containing information on a specific topic.
8. An electronic device, characterized in that, include: The system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-6.
9. One or more computer-readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-6.