Offline data entry method, device, electronic device and storage medium

By identifying new fields in offline data and configuring dynamic data tables, the problem of low timeliness caused by data table structure adjustment in the existing technology is solved, and efficient offline data entry is achieved.

CN114003661BActive Publication Date: 2024-11-15CHINA MERCHANTS FINANCE HLDG CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202111339825.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-12
Publication Date
2024-11-15
Estimated Expiration
2041-11-12

Smart Images

  • Figure CN114003661B_ABST
    Figure CN114003661B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing, and discloses an offline data entry method, device, electronic device and storage medium, wherein the method comprises: obtaining offline data; identifying whether there is a newly added field in the offline data according to a preset business scenario; if there is no newly added field in the offline data, obtaining an offline data table of the offline data, and performing data entry of the offline data according to the offline data table; if there is a newly added field in the offline data, obtaining a static data table of the offline data, and configuring a dynamic data table of the newly added field; performing data entry of the original field in the offline data according to the static data table, and performing data entry of the newly added field in the offline data according to the dynamic data table. The present invention can improve the timeliness of offline data entry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to an off-line data entry method, device, electronic device and computer-readable storage medium. Background Art

[0002] Offline data entry can be understood as a process of storing offline data generated in the business system into a database. With the rapid development of big data technology, the amount of data has grown explosively. How to enter offline data into the database in real time and efficiently becomes increasingly important.

[0003] At present, offline data entry is usually implemented in the form of data tables. However, in actual business scenarios, data may change on multiple ends. For example, new types of offline data may be added. Since data tables are defined in a fixed structure and business systems usually do not have permission for the data definition language (DDL) of data tables, when faced with new types of offline data, database scripts need to be sent to redefine the column structure of the data table in order to implement offline data entry. This takes a long time to adjust the data table structure, resulting in low timeliness of offline data entry. Summary of the invention

[0004] The present invention provides an offline data entry method, device, electronic device and computer-readable storage medium, the main purpose of which is to improve the timeliness of offline data entry.

[0005] To achieve the above object, the present invention provides an offline data entry method, comprising:

[0006] Get offline data;

[0007] Identify whether there is a new field in the offline data according to a preset business scenario;

[0008] If the offline data does not have a newly added field, obtaining an offline data table of the offline data, and performing data entry of the offline data according to the offline data table;

[0009] If the offline data has a newly added field, obtain a static data table of the offline data, and configure a dynamic data table of the newly added field;

[0010] According to the static data table, data entry of the original fields in the offline data is performed, and according to the dynamic data table, data entry of the newly added fields in the offline data is performed.

[0011] Optionally, the identifying whether there is a newly added field in the offline data according to a preset business scenario includes:

[0012] Acquire data fields of the offline data according to the business scenario, and query an offline data table from a database of the business scenario to identify whether all the data fields exist in the offline data table;

[0013] If the data fields all exist in the offline data table, then there is no new field in the offline data;

[0014] If any one of the data fields is not in the offline data table, then the offline data has a newly added field.

[0015] Optionally, querying an offline data table from a database of the business scenario includes:

[0016] According to the business scenario, a data table query object is obtained, the data table query object is converted into a query statement, and the query statement is used to query the offline data table in the database.

[0017] Optionally, performing data entry of the offline data according to the offline data table includes:

[0018] Matching the data fields in the offline data with the offline fields in the offline data table;

[0019] The data corresponding to the data field is stored in the offline field where the data is successfully matched, thereby completing the data entry of the offline data.

[0020] Optionally, the acquiring the static data table of the offline data includes:

[0021] The original fields in the offline data are identified, and according to the original fields, a query statement is used to query a database for a static data table of the offline data.

[0022] Optionally, configuring the dynamic data table of the newly added field includes:

[0023] Creating a column structure and a dynamic ID of the newly added field in the form of a key-value pair, and generating an initial data table of the newly added field;

[0024] The static ID of the offline data corresponding to the newly added field in the static data table is obtained, and the static ID is loaded into the initial data table to obtain the dynamic data table of the newly added field.

[0025] Optionally, the step of loading the static ID into the initial data table to obtain the dynamic data table of the newly added field includes:

[0026] Set the column structure sequence of the static ID in the initial data table, and configure the association logic between the static ID and the static data table;

[0027] According to the column structure sequence and the association logic, the static ID is written into the initial data table to obtain the dynamic data table of the newly added field.

[0028] In order to solve the above problems, the present invention also provides an offline data entry device, the device comprising:

[0029] Offline data acquisition module, used to acquire offline data;

[0030] A new field identification module is used to identify whether there is a new field in the offline data according to a preset business scenario;

[0031] An offline data entry module, used for obtaining an offline data table of the offline data when no new field exists in the offline data, and performing data entry of the offline data according to the offline data table;

[0032] A dynamic data table configuration module, used to obtain a static data table of the offline data when there is a newly added field in the offline data, and configure a dynamic data table of the newly added field;

[0033] The field data entry module is used to perform data entry of original fields in the offline data according to the static data table, and to perform data entry of newly added fields in the offline data according to the dynamic data table.

[0034] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0035] at least one processor; and,

[0036] a memory communicatively connected to the at least one processor; wherein,

[0037] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to implement the above-mentioned offline data entry method.

[0038] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned offline data entry method.

[0039] It can be seen that the embodiment of the present invention first identifies whether there are new fields in the offline data to identify whether there are new types of data in the offline data, so as to select the corresponding data entry method to ensure the timeliness of the entry of the offline data. Secondly, when the offline data does not have new fields, the embodiment of the present invention obtains the offline data table of the offline data to perform data entry of the offline data to ensure the timeliness of the entry of the offline data. When the offline data has new fields, the static data table of the offline data is obtained, and the dynamic data table of the new fields is configured to realize that the offline data can be dynamically entered in the database, thereby improving the timeliness of the entry of the offline data. Therefore, an offline data entry method, device, electronic device and computer-readable storage medium proposed in the embodiment of the present invention can improve the timeliness of offline data entry. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of a flow chart of an offline data entry method provided by an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of a module of an offline data entry device provided by an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing an offline data entry method provided by an embodiment of the present invention;

[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0045] The embodiment of the present invention provides an offline data entry method. The execution subject of the offline data entry method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the offline data entry method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0046] Reference Figure 1 FIG. 1 is a flow chart of an offline data entry method provided by an embodiment of the present invention. In the embodiment of the present invention, the offline data entry method includes:

[0047] S1. Obtain offline data.

[0048] In the embodiment of the present invention, the offline data refers to data generated offline in the business system, such as common offline video data, offline picture data, etc.

[0049] S2. Identify whether there is a newly added field in the offline data according to a preset business scenario.

[0050] It should be understood that in different business scenarios, multiple types of offline data will be generated in different time periods. For example, in the offline video downloading scenario, the user downloaded offline data of the TV type in the first time, and downloaded offline data of the movie type in the second time. Therefore, the embodiment of the present invention identifies whether there are new fields in the offline data according to the preset business scenario to identify whether there are new types of data in the offline data, thereby selecting the corresponding data entry method to ensure the timeliness of the entry of the offline data. It should be noted that the preset business scenario is determined based on the type of offline data. If the offline data is video data, the business scenario can be a video playback or downloading scenario. If the offline data is text data, the business scenario can be a text processing scenario.

[0051] As an embodiment of the present invention, identifying whether there are new fields in the offline data according to a preset business scenario includes: obtaining data fields of the offline data according to the business scenario, and querying an offline data table from a database of the business scenario to identify whether the data fields all exist in the offline data table; if the data fields all exist in the offline data table, then there are no new fields in the offline data; if there is any field in the data fields that is not in the offline data table, then there are new fields in the offline data.

[0052] Among them, the data field is used to represent the data structure of the offline data. For example, in a video downloading scenario, there is offline data of "User A downloaded a fantasy movie in 2021", then the data field of the offline data may include "User A", "2021" and "Downloaded a fantasy movie", among which "User A" can be represented by the field "name", "2021" can be represented by the field "time", and "Downloaded a fantasy movie" can be represented by the field "event". The database refers to a tool for storing offline data, such as a MySQL database, a DB database, etc. The offline data table can be understood as a data table created in the database based on other business data.

[0053] It should be further understood that if the data fields all exist in the offline data table, then the offline data table contains all field information of the offline data. Therefore, the embodiment of the present invention recognizes that the offline data does not have corresponding new fields. If any field of the data fields is not in the offline data table, then the offline data table does not contain all field information of the offline data. Therefore, the embodiment of the present invention recognizes that the offline data has corresponding new fields.

[0054] Furthermore, in another optional embodiment of the present invention, querying the offline data table from the database of the business scenario includes: obtaining a data table query object according to the business scenario, converting the data table query object into a query statement, and using the query statement to query the offline data table from the database.

[0055] The data table query object may be determined by the business type of the business scenario. For example, the data table query object of the video downloading scenario may be a video. The conversion of the query statement may be implemented by structured query language (SQL).

[0056] S3. If the offline data does not have a newly added field, obtain an offline data table of the offline data, and perform data entry of the offline data according to the offline data table.

[0057] It should be understood that if the offline data does not have a newly added field, the database already has a corresponding data table when the offline data is entered. Therefore, the embodiment of the present invention obtains the offline data table of the offline data to perform data entry of the offline data, thereby ensuring the timeliness of the entry of the offline data. The acquisition of the offline data table can be obtained by querying an SQL statement.

[0058] As an embodiment of the present invention, executing data entry of the offline data according to the offline data table includes: matching the data fields in the offline data with the offline fields in the offline data table, storing the data corresponding to the data fields in the offline fields with successful matching, and completing the data entry of the offline data.

[0059] Among them, the matching of the data field and the offline field can be achieved through a string matching algorithm. For example, if the data field is name and the offline field is time, the data field and the offline field fail to match. If the data field is name and the offline field is also name, the data field and the offline field match successfully, and the data corresponding to the data field (such as user A) is stored in the offline field.

[0060] S4. If there are newly added fields in the offline data, obtain a static data table of the offline data, and configure a dynamic data table of the newly added fields.

[0061] It should be understood that if there are newly added fields in the offline data, the database does not have a data table that completely contains all the information in the offline data when the offline data is entered. Therefore, the embodiment of the present invention obtains a static data table of the offline data and configures a dynamic data table of the newly added fields to enable the offline data to be dynamically entered in the database, thereby improving the timeliness of the entry of the offline data. The static data table can be understood as a table containing all the non-newly added field information in the offline data, and the dynamic data table can be understood as a table containing all the newly added field information in the offline data.

[0062] As an embodiment of the present invention, the step of obtaining the static data table of the offline data includes: identifying the original fields in the offline data, and querying the static data table of the offline data in a database using a query statement according to the original fields. The original fields can be understood as fields that are not newly added in the offline data, which are all present in the static data table of the database.

[0063] Furthermore, as an embodiment of the present invention, the configuration of the dynamic data table of the newly added field includes: creating the column structure and dynamic ID of the newly added field in the form of key-value pairs, generating an initial data table of the newly added field, obtaining the static ID of the offline data corresponding to the newly added field in the static data table, loading the static ID into the initial data table, and obtaining the dynamic data table of the newly added field.

[0064] Among them, the key-value pair format can be understood as a corresponding format that represents data and fields, wherein the key represents the field and the value represents the data. Based on the key-value pair format, the corresponding data of the field can be quickly found. The dynamic ID is used to represent the identity information of the newly added field, and the column structure represents the data type to be represented by the newly added field in the generated data table.

[0065] Furthermore, in an optional embodiment of the present invention, the loading of the static ID into the initial data table includes: setting a column structure sequence of the static ID in the initial data table, and configuring the association logic between the static ID and the static data table, and writing the static ID into the initial data table according to the column structure sequence and the association logic.

[0066] Among them, the column structure sequence is used to characterize the column structure position of the static ID in the initial data table. If the column structure sequence is 3, it can indicate that the static ID is in the third column position in the initial data table. The association logic is used to associate the initial data table with the static data table to achieve data association between the initial data table and the static data table, that is, the static ID can be used to achieve a quick jump between the initial data table and the static data table, thereby ensuring the premise of dynamic entry of subsequent data.

[0067] Exemplarily, the newly added fields include: year, type, math, and car. Then, four column structures of year, type, math, and car can be created, and the dynamic ID of the newly added field can be defined as dynamic_column, and the static ID can be obtained as fixed_column. Then, a dynamic data table containing six column structures of dynamic_column, fixed_column, year, type, math, and car can be generated, wherein the static ID is used to establish a mapping relationship between the dynamic data table and the static data table, so as to facilitate subsequent rapid query of offline data.

[0068] To further understand the relationship between the static data table and the dynamic data table, please refer to the following table structure diagrams of the static data table and the dynamic data table. Table 1 is a partial structure diagram of the static data table, which includes five columns: table id, C1, C2, 2010, and 2011. Table 2 is a partial structure diagram of the dynamic data table, which includes four columns: dynamic_column_id, fixed_column_id, year, and value. The details are as follows:

[0069] Table 1:

[0070] id C1 C2 2010 2011

[0071] Table 2:

[0072] dynamic_column_id fixed_column_id year value

[0073] Furthermore, in an optional embodiment of the present invention, the table 1 and the table 2 may be associated using the following SQL statement:

[0074] select t1.id,t1.c1,t1.c2,t2.year,t2.value from fixed_column_table t1, dynamic_column_table t2 where t1.id=t2.fixed_column_id.

[0075] S5. According to the static data table, perform data entry of the original fields in the offline data, and according to the dynamic data table, perform data entry of the newly added fields in the offline data.

[0076] In an embodiment of the present invention, data entry of the original fields in the offline data is performed according to the static data table, and data entry of the newly added fields in the offline data is performed according to the dynamic data table, so that the offline data is entered according to the field type, which can realize dynamic entry of the offline data and improve the timeliness of the entry of the offline data. The data entry of the original fields and the newly added fields is the same as the entry principle of executing data entry of offline data according to the offline data table mentioned above, and will not be further elaborated here.

[0077] It can be seen that the embodiment of the present invention first identifies whether there are new fields in the offline data to identify whether there are new types of data in the offline data, so as to select the corresponding data entry method to ensure the timeliness of the offline data entry. Secondly, when the offline data does not have new fields, the embodiment of the present invention obtains the offline data table of the offline data to perform data entry of the offline data to ensure the timeliness of the offline data entry. When the offline data has new fields, the static data table of the offline data is obtained, and the dynamic data table of the new fields is configured to realize that the offline data can be dynamically entered in the database, thereby improving the timeliness of the offline data entry. Therefore, an offline data entry method proposed in the embodiment of the present invention can improve the timeliness of offline data entry.

[0078] like Figure 2 The figure shows a functional module diagram of the off-line data entry device of the present invention.

[0079] The offline data entry device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the offline data entry device can include an offline data acquisition module 101, a newly added field identification module 102, an offline data entry module 103, a dynamic data table configuration module 104 and a field data entry module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.

[0080] In this embodiment, the functions of each module / unit are as follows:

[0081] The offline data acquisition module 101 is used to acquire offline data;

[0082] The newly added field identification module 102 identifies whether there is a newly added field in the offline data according to a preset business scenario;

[0083] The offline data entry module 103 is used to obtain an offline data table of the offline data when there is no newly added field in the offline data, and perform data entry of the offline data according to the offline data table;

[0084] The dynamic data table configuration module 104 is used to obtain the static data table of the offline data when there is a newly added field in the offline data, and configure the dynamic data table of the newly added field;

[0085] The field data entry module 105 is used to perform data entry of original fields in the offline data according to the static data table, and to perform data entry of newly added fields in the offline data according to the dynamic data table.

[0086] In detail, each module in the offline data entry device 100 in the embodiment of the present invention is used in the same manner as described above. Figure 1 The offline data entry method described in the invention has the same technical means and can produce the same technical effects, so it will not be repeated here.

[0087] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device 1 for implementing the off-line data entry method of the present invention.

[0088] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an offline data entry program.

[0089] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device 1, and uses various interfaces and lines to connect various components of the entire electronic device 1, and executes or executes programs or modules stored in the memory 11 (for example, executing an offline data entry program, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0090] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the offline data entry program, etc., but also can be used to temporarily store data that has been output or is to be output.

[0091] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0092] The communication interface 13 is used for communication between the above-mentioned electronic device 1 and other devices, including a network interface and an employee interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices 1. The employee interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the employee interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual employee interface.

[0093] Figure 3 Only the electronic device 1 having components is shown, and those skilled in the art can understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0094] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0095] It should be understood that the embodiment is for illustrative purposes only and the scope of the patent invention is not limited to this structure.

[0096] The offline data entry program stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs. When running in the processor 10, it can achieve:

[0097] Get offline data;

[0098] Identify whether there is a new field in the offline data according to a preset business scenario;

[0099] If the offline data does not have a newly added field, obtaining an offline data table of the offline data, and performing data entry of the offline data according to the offline data table;

[0100] If the offline data has a newly added field, obtain a static data table of the offline data, and configure a dynamic data table of the newly added field;

[0101] According to the static data table, data entry of the original fields in the offline data is performed, and according to the dynamic data table, data entry of the newly added fields in the offline data is performed.

[0102] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0103] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0104] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of the electronic device 1, the computer program can implement:

[0105] Get offline data;

[0106] Identify whether there is a new field in the offline data according to a preset business scenario;

[0107] If the offline data does not have a newly added field, obtaining an offline data table of the offline data, and performing data entry of the offline data according to the offline data table;

[0108] If the offline data has a newly added field, obtain a static data table of the offline data, and configure a dynamic data table of the newly added field;

[0109] According to the static data table, data entry of the original fields in the offline data is performed, and according to the dynamic data table, data entry of the newly added fields in the offline data is performed.

[0110] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0111] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0112] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0113] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0114] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0115] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. An offline data entry method, It is characterized in that The method comprises: Get offline data; Identify whether there is a new field in the offline data according to a preset business scenario; If the offline data does not have a newly added field, obtaining an offline data table of the offline data, and performing data entry of the offline data according to the offline data table; If the offline data has a newly added field, obtain a static data table of the offline data, and configure a dynamic data table of the newly added field; According to the static data table, data entry of the original fields in the offline data is performed, and according to the dynamic data table, data entry of the newly added fields in the offline data is performed; Wherein, performing data entry of the offline data according to the offline data table includes: matching the data fields in the offline data with the offline fields in the offline data table; storing the data corresponding to the data fields in the offline fields with successful matching, thereby completing the data entry of the offline data; The step of obtaining the static data table of the offline data includes: identifying original fields in the offline data, and querying a database for the static data table of the offline data using a query statement according to the original fields; The configuration of the dynamic data table of the newly added field includes: creating a column structure and a dynamic ID of the newly added field in the form of a key-value pair to generate an initial data table of the newly added field; obtaining a static ID of offline data corresponding to the newly added field in the static data table, loading the static ID into the initial data table, and obtaining a dynamic data table of the newly added field; The step of loading the static ID into the initial data table to obtain the dynamic data table of the newly added field includes: setting a column structure sequence of the static ID in the initial data table, and configuring the association logic between the static ID and the static data table; and writing the static ID into the initial data table according to the column structure sequence and the association logic to obtain the dynamic data table of the newly added field.

2. The offline data entry method according to claim 1, It is characterized in that The identifying whether there is a newly added field in the offline data according to a preset business scenario includes: Acquire data fields of the offline data according to the business scenario, and query an offline data table from a database of the business scenario to identify whether all the data fields exist in the offline data table; If the data fields all exist in the offline data table, then there is no new field in the offline data; If any one of the data fields is not in the offline data table, then the offline data has a newly added field.

3. The offline data entry method according to claim 2, It is characterized in that The querying of the offline data table from the database of the business scenario includes: According to the business scenario, a data table query object is obtained, the data table query object is converted into a query statement, and the query statement is used to query the offline data table in the database.

4. An offline data entry device, used to implement the offline data entry method according to any one of claims 1 to 3, It is characterized in that The device comprises: Offline data acquisition module, used to acquire offline data; A new field identification module is used to identify whether there is a new field in the offline data according to a preset business scenario; An offline data entry module, used for obtaining an offline data table of the offline data when no new field exists in the offline data, and performing data entry of the offline data according to the offline data table; A dynamic data table configuration module, used to obtain a static data table of the offline data when there is a newly added field in the offline data, and configure a dynamic data table of the newly added field; The field data entry module is used to perform data entry of original fields in the offline data according to the static data table, and to perform data entry of newly added fields in the offline data according to the dynamic data table.

5. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the offline data entry method according to any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the offline data entry method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Method and apparatus for data access of SPR (Subscription Profile Repository)

    CN105718483A

  • Data synchronization method and mobile terminal

    CN111756794A

  • Report generation method, terminal equipment and storage medium

    CN112256684A

  • Engineering project income is appraised collection of data and is typeeed device

    CN207473716U

  • Methods and Apparatus for Providing Adaptive Private Network Database Schema Migration and Management Processes

    US20160179850A1