A method and device for updating a database

By classifying and matching rules on the database, the problem of data loss and errors caused by untimely database updates is solved, and the compatibility and efficiency of the database are improved.

CN113127495BActive Publication Date: 2024-08-23SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911411566.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-31
Publication Date
2024-08-23
Estimated Expiration
2039-12-31

AI Technical Summary

Technical Problem

The existing database fails to improve in time when data is updated, resulting in data loss, errors or retrieval failures, which affects the service life of the database and data processing efficiency.

Method used

By initializing the database model, classifying and storing the received input data, matching successfully matched data with preset rules, and configuring rules for failed data to update the database model, ensuring that the database is dynamically compatible with different businesses.

Benefits of technology

It effectively avoids data loss, errors or retrieval failures, and improves the service life, usage rate and data processing efficiency of the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113127495B
    Figure CN113127495B
Patent Text Reader

Abstract

The present application is applicable to the field of data processing technology, and provides a method for updating a database, including: initializing a database model, classifying and storing the input data if input data is received, matching the successfully classified input data with the preset data rules of the database model, and configuring data rules corresponding to the input data that failed to be classified to update the database model and obtain an updated database model. The present application improves the ability of the database to be dynamically compatible with different businesses by classifying the input data of the database model, matching the successfully classified data with the preset data rules in the database model, and configuring corresponding data rules for the input data that failed to be classified to update the database model, thereby avoiding data loss, errors, or retrieval failures, and improving the service life, utilization rate, and data processing efficiency of the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method and device for updating a database. Background Art

[0002] In the process of data processing, the design and use of database is a very important link.

[0003] However, in the existing database application process, data loss, errors and even retrieval failures often occur because the database is not improved as the data is updated, which affects the service life and utilization rate of the database and reduces the efficiency of data processing. Summary of the invention

[0004] The embodiments of the present application provide a method and device for updating a database, which can solve the problem of data loss, error or even retrieval failure caused by the database not being improved with the data update.

[0005] In a first aspect, an embodiment of the present application provides a method for updating a database, comprising:

[0006] Initialize the database model;

[0007] If input data is received, the input data is classified and stored;

[0008] Match the successfully classified input data with the preset data rules of the database model;

[0009] Data rules corresponding to the input data that failed classification are configured to update the database model to obtain an updated database model.

[0010] In a second aspect, an embodiment of the present application provides a database updating device, including:

[0011] Initialization module, used to initialize the database model;

[0012] A classification module, for classifying and storing the input data if input data is received;

[0013] A matching module is used to match successfully classified input data with preset data rules of the database model;

[0014] The update module is used to configure data rules corresponding to the input data that failed classification, so as to update the database model and obtain an updated database model.

[0015] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for updating a database as described in any one of the first aspects above is implemented.

[0016] In a fourth aspect, an embodiment of the present application 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, the database updating method as described in any one of the above-mentioned first aspects is implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the database updating method described in any one of the above-mentioned first aspects.

[0018] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0019] The embodiment of the present application classifies the input data of the database model, matches the successfully classified data with the preset data rules in the database model, and configures corresponding data rules for the input data that failed to be classified to update the database model, thereby improving the database's ability to dynamically be compatible with different businesses, avoiding data loss, errors, or retrieval failures, and improving the service life, usage rate, and data processing efficiency of the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0021] Figure 1 It is a flowchart of a method for updating a database provided in an embodiment of the present application;

[0022] Figure 2 It is a flowchart of step S103 of the database updating method provided in one embodiment of the present application;

[0023] Figure 3 It is a flowchart of step S104 of the database updating method provided in one embodiment of the present application;

[0024] Figure 4 It is a structural diagram of a database updating device provided in one embodiment of the present application;

[0025] Figure 5 is a schematic diagram of the structure of a matching module provided in an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of the structure of an update module provided in an embodiment of the present application;

[0027] Figure 7 It is a structural diagram of a terminal device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0028] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0029] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0030] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context.

[0031] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0032] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0033] The database updating method provided in the embodiments of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.

[0034] Figure 1 A schematic flowchart of a database updating method provided in the present application is shown. As an example but not a limitation, the method can be applied to any of the above-mentioned terminal devices.

[0035] S101. Initialize the database model.

[0036] In a specific application, by initializing the system, routing rules corresponding to the functions and / or types of known types of input data are created according to the configuration of a preset configuration center, and corresponding database models are created according to the routing rules, and corresponding table fields and attribute fields are created for each database model. At the same time, the known types of input data, the routing rules corresponding to the known types of input data, and the table fields and attribute fields of each database model are stored in the cache center of the database model to obtain an initialized database model.

[0037] The Configuration Center (ITConfig, abbreviated as itcfg) is a unified configuration management product launched by the IT Infrastructure Framework. It provides configuration management operations such as configuration changes, configuration push, historical version management, gray release, and configuration change audit. The Configuration Center contains multiple configuration files, which can centrally manage configurations in all production environments, reduce the cost of managing configurations in distributed systems, and reduce the risk of reduced availability or even failures due to erroneous configuration changes.

[0038] The function of the known type of input data is the recognition function of the input data. For example, if the known type of input data is used for face recognition, the function of the known type of input data is the face recognition function. For example, if the known type of input data is face recognition image data, the face recognition image data is classified. Face recognition image data includes static image data and dynamic image data. If the dimension of static image data is 2, a routing rule with a dimension of 2 is created. If the dimension of dynamic image data is 1, a routing rule with a dimension of 1 is created.

[0039] A database mode refers to a data storage mode corresponding to the function and / or type of known type input data. It should be noted that the database mode does not contain attribute fields of the input data. For example, if the known type input data is face recognition image data, the input data is stored in the face recognition database mode; if the known type input data is body recognition image data, the input data is stored in the body recognition database mode; if the known type input data is vehicle recognition image data, the input data is stored in the vehicle recognition database mode.

[0040] The database model includes more than one database schema and attribute fields of all input data. For example, the database model includes a face recognition database schema and attribute fields of all face recognition data, a body recognition database schema and attribute fields of all body recognition data, and a vehicle recognition database schema and attribute fields of all vehicle recognition data.

[0041] S102: If input data is received, the input data is classified and stored.

[0042] In specific applications, input data refers to input data that needs to be retrieved in the database model, including but not limited to known type input data and unknown type input data. Known type input data refers to input data whose function / type can be identified, that is, the input data can be specifically classified according to the function / type. Unknown type input data refers to data whose function cannot be determined.

[0043] When input data is received, the input data is divided into input data of known types and input data of unknown types according to whether the function / type of the input data can be identified. The input data of known types is regarded as input data that has been successfully classified, and the input data of unknown types is regarded as input data that has failed to be classified. The successfully classified input data and the input data that have failed to be classified are automatically stored in the cache center of the database. At the same time, the input data of known types is classified according to the function and / or type of the input data, and the routing rules corresponding to the input data of known types are matched in the cache center of the database model according to the classification results.

[0044] Among them, unknown type input data includes known type input data and useless data. Useless data refers to abnormal data, and data whose functions or types cannot be identified by the system or users are considered useless data. The function or type of known type input data cannot be obtained by system identification, but can be obtained by user manual identification.

[0045] For example, if the input data is data for face recognition among known types of input data, the input data is classified as face recognition function data; if the input data is data for human body recognition among known types of input data, the input data is classified as human body recognition function data; if the input data is data for vehicle recognition among known types of input data, the input data is classified as vehicle recognition function data; if the input data is data whose function cannot be determined, the input data is regarded as unknown type input data and stored to facilitate obtaining the user's judgment result on the unknown type input data.

[0046] The data type of the input data includes but is not limited to any one of text data, image data, video data and audio data.

[0047] S103: Match the successfully classified input data with the preset data rules of the database model.

[0048] In specific applications, the preset data rules are pre-set rules corresponding to the function and / or type of the input data, including but not limited to routing rules corresponding to the function and / or type of the input data, and attribute fields corresponding to the function and / or type of the input data.

[0049] For example, if the input data that is successfully classified is image data for face recognition, the routing rules corresponding to the image data for face recognition and the attribute fields corresponding to the image data for face recognition are searched in the database model.

[0050] The meaning of field refers to the member defined in the database, which represents the variable associated with the object or class; attribute and field are different names for the same element. In relational algebra, the characteristics of an entity are called attributes, and in the relational model, the characteristics of an entity are called fields; the attribute field can be specifically set according to the function and / or type of the input data. For example, if the input data is image data for face recognition, the attribute field of the input data can be the fields containing hats, glasses, etc. in the input data; if the input data is image data for vehicle recognition, the attribute field of the input data can be the fields containing license plates, vehicle models, etc. in the input data.

[0051] S104: configuring data rules corresponding to the input data that failed classification, so as to update the database model and obtain an updated database model.

[0052] In specific applications, if the input data contains input data that fails to be classified, that is, there is no preset data rule in the database model that can match the input data that fails to be classified, the database model update process can be triggered at this time. The database model update process is configured to configure routing rules corresponding to the known type of input data, delete useless data, and update the database model to obtain an updated database model.

[0053] Among them, the database model update process is a process for updating the database model that is initiated when input data that fails classification is identified. It is used to obtain the configuration center update field of the database model, and configure the routing rules corresponding to the input data of the known type according to the configuration center update field to delete useless data.

[0054] In one embodiment, if a preset data rule corresponding to input data of known classification is found in the database model, the successfully classified input data is entered into the cache center of the database model according to the preset number. The preset number refers to a preset optimal number of entries, which can be specifically set according to actual conditions. For example, according to experiments, when the preset number is set to 10,000, it is the optimal number of entries, which can ensure the normal entry of the database and avoid data loss or errors.

[0055] In one embodiment, step S101 includes:

[0056] System initialization, creating routing rules through the preset configuration center;

[0057] Create the corresponding database schema according to the routing rules;

[0058] Configure the corresponding table fields for each database mode to obtain the initialized database model.

[0059] In specific applications, the database model is initialized by first starting the system initialization program, creating routing rules corresponding to the function and / or type of the input data through the preset configuration center configuration, and then creating the corresponding database model according to the routing rules, and creating the corresponding configuration table fields according to each database model.

[0060] In one embodiment, a database schema may be created corresponding to each routing rule, so that a one-to-one relationship is formed between the routing rule and the database schema; a database schema may also be created corresponding to more than one (i.e., multiple) routing rules, so that a many-to-one relationship is formed between the routing rule and the database schema.

[0061] By creating routing rules and configuring corresponding table fields through the preset configuration center, the initialized database model is obtained, which can provide different routing rules and corresponding fields for input data of different types and functions, and realize the functions of adding, deleting, searching and modifying corresponding to the functions and / or types of the input data.

[0062] In one embodiment, Figure 2 As shown, the step S103 of the method in the first embodiment is further described. Step S103 includes:

[0063] According to the successfully classified input data, a routing rule corresponding to the successfully classified input data is matched in the database model;

[0064] If a routing rule corresponding to the successfully classified input data is matched in the database model, an attribute field corresponding to the successfully classified input data is matched in the database model according to the successfully classified input data.

[0065] In a specific application, the routing rules corresponding to the successfully classified input data are searched in the database model, and then the attribute fields corresponding to the successfully classified input data are searched in the database model to determine whether there are preset data rules in the database model that match the successfully classified input data.

[0066] For example, if the input data that has been successfully classified is video data for human body recognition, the routing rules corresponding to the video data for human body recognition are searched in the database model, and the video data for human body recognition is entered into the cache center of the database model according to a preset quantity, so as to facilitate subsequent data processing operations such as retrieval on the video data for human body recognition through the database model.

[0067] By searching for corresponding routing rules and attribute fields according to the function and / or type of the input data, it is determined whether the current database model is capable of processing the input data of this function and / or type, thereby avoiding the low rate of data retrieval, modification and other operations caused by the lack of functions of the database model, thereby improving the efficiency of data processing.

[0068] In one embodiment, Figure 3 As shown, the step S104 of the method in the first embodiment is further described. Step S104 includes:

[0069] S1041. If it is identified that the input data contains input data that fails classification, then update data from the configuration center is obtained;

[0070] S1042. Update the database model according to the configuration center update data to obtain an updated database model.

[0071] In a specific application, if it is identified that the input data contains input data that fails classification, the configuration center update data is obtained, including: if the locally stored configuration center field is different from the server-stored configuration center field, the server-stored configuration center field is obtained as the configuration center update data, and the server-stored configuration center field replaces the local configuration center field.

[0072] If the configuration center field stored locally is the same as the configuration center field stored on the server, the configuration center field input by the user is obtained as the configuration center update data.

[0073] If the configuration center update data includes a result that a certain input data entered by the user is useless data, the input data is deleted. If the configuration center update field includes routing rules corresponding to input data of a known type, the routing rules corresponding to the input data of the known type are configured.

[0074] The database map is updated according to the configuration center update data, and the database model is updated to obtain an updated database model. The database model is updated according to the configuration center update data, including: entering the routing rules corresponding to the known type of input data into the database cache center, deleting the useless data in the database cache center, and then updating the historical data field of the database model, ensuring the stability of the database model while expanding the functional scope of the database model.

[0075] The historical data in the database model refers to the fields that have been stored in the database model before the update operation is performed.

[0076] Update historical data in the database model, including: adding or deleting fields stored in the database before the update operation is performed. For example, if a known type of input data in the database model is the same as a known type of input data, data duplication occurs in the database model, and the known type of input data is deleted.

[0077] By updating data through the configuration center, the database model can be updated in real time to avoid problems such as data duplication, loss, errors, etc. caused by untimely updates. At the same time, the ability and scope of the database model to process input data of various types and functions are improved, and the scalability and portability of the database model are improved.

[0078] In one embodiment, before step S1042, the method further includes:

[0079] Release configuration center update data;

[0080] Through the callback function, determine whether there is configuration center update data in the database model;

[0081] In specific applications, after obtaining the updated data from the configuration center, the updated data from the configuration center is published so that all modules in the system can obtain the updated data from the configuration center; at the same time, the consumption callback function is triggered to check whether there is any updated data from the configuration center. When the updated data from the configuration center is detected, the database model is updated according to the updated data from the configuration center to obtain the updated database model;

[0082] If the configuration center does not detect updated data, the user input may be empty or the configuration center update field may be lost. In this case, no processing is performed on the database model until the configuration center detects updated data.

[0083] The callback function is used to determine whether the configuration center has updated the data. After determining whether the configuration center has updated the data, the cache center of the database model is synchronously updated to update the database model, thereby ensuring the accuracy of the data in the database and improving the corresponding operation rate during subsequent addition, deletion, query, modification or deletion operations.

[0084] In one embodiment, step S102 includes:

[0085] If input data is received, the input data is classified and stored according to the function and data type of the input data; wherein the function of the input data is the identification target of the input data, and the function of the input data includes at least one of a human body recognition function, a face recognition function, a vehicle identification function and an infrared recognition function; the data type includes any one of text, pictures and videos.

[0086] In a specific application, if the function or data type of the input data cannot be identified, the input data is regarded as input data that has failed classification and is stored in the cache center of the database model.

[0087] The data type of the input data may refer to the classification of the input data according to the suffix of the input data. For example, if the suffix of the input data is .jpg or .gif, the type of the input data is picture; if the suffix of the input data is .wav, the type of the input data is audio; if the suffix of the input data is .mp4, the type of the input data is video.

[0088] Classify the input data according to its type and / or function to match the corresponding preset data rules in the database model, determine whether the database model is capable of processing the input data of this function and / or type, and add the corresponding configuration center fields in time according to the judgment result to improve the processing capacity of the database.

[0089] This embodiment classifies the input data of the database model, matches the successfully classified data with the preset data rules in the database model, and configures corresponding data rules for the input data that failed to be classified to update the database model, thereby improving the database's ability to dynamically be compatible with different businesses, avoiding data loss, errors, or retrieval failures, and improving the service life, usage rate, and data processing efficiency of the database.

[0090] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0091] Corresponding to the database updating method described in the above embodiment, Figure 4 A structural block diagram of a database updating device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0092] Reference Figure 4 , the updating device of the database comprises:

[0093] Initialization module 101, used to initialize the database model;

[0094] A classification module 102, for classifying and storing input data if input data is received;

[0095] A matching module 103, used to match successfully classified input data with preset data rules of the database model;

[0096] The updating module 104 is used to configure data rules corresponding to the input data that failed classification, so as to update the database model and obtain an updated database model.

[0097] In one embodiment, the initialization module 101 includes:

[0098] Initialization unit, used for system initialization, creating routing rules through the preset configuration center;

[0099] A creation unit is used to create a corresponding database schema according to routing rules;

[0100] The configuration unit is used to configure the corresponding table fields for each database mode to obtain the initialized database model.

[0101] In one embodiment, Figure 5 As shown, the matching module 103 also includes the following structure for executing the method steps in the above embodiment:

[0102] A first matching unit 1031, configured to match a routing rule corresponding to the successfully classified input data in the database model according to the successfully classified input data;

[0103] The second matching unit 1032 is configured to match the attribute field corresponding to the successfully classified input data in the database model according to the successfully classified input data if a routing rule corresponding to the successfully classified input data is matched in the database model.

[0104] In one embodiment, Figure 6 As shown, the update module 104 also includes the following structure for executing the method steps in the above embodiment:

[0105] The acquisition unit 1041 is used to acquire configuration center update data if it is identified that the input data contains input data that fails classification;

[0106] The updating unit 1042 is used to update the database model according to the configuration center update data to obtain an updated database model.

[0107] In one embodiment, the update module 104 further includes:

[0108] A publishing unit 1043, used to publish configuration center update data;

[0109] The determination unit 1044 is used to determine whether there is configuration center update data in the database model through a callback function.

[0110] In one embodiment, the classification module 102 includes:

[0111] A classification unit is used to classify and store input data according to the function and data type of the input data if input data is received; wherein the function of the input data is an identification target of the input data, and the function of the input data includes at least one of a human body recognition function, a face recognition function, a vehicle identification function and an infrared recognition function; and the data type includes any one of text, picture and video.

[0112] This embodiment classifies the input data of the database model, matches the successfully classified data with the preset data rules in the database model, and configures corresponding data rules for the input data that failed to be classified to update the database model, thereby improving the database's ability to dynamically be compatible with different businesses, avoiding data loss, errors, or retrieval failures, and improving the service life, usage rate, and data processing efficiency of the database.

[0113] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0114] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 7 As shown, the terminal device 7 of this embodiment includes: at least one processor 70 ( Figure 7 Only one is shown in the figure) a processor, a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, wherein the processor 70 implements the steps in any of the above-mentioned database updating method embodiments when executing the computer program 72.

[0115] The terminal device 7 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7 It is only an example of the terminal device 7 and does not constitute a limitation on the terminal device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0116] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0117] In some embodiments, the memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or memory of the terminal device 7. In other embodiments, the memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the terminal device 7. The memory 71 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 71 may also be used to temporarily store data that has been output or is to be output.

[0118] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0119] An embodiment of the present application also provides a terminal device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.

[0120] An embodiment of the present application 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, the steps in the above-mentioned method embodiments can be implemented.

[0121] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0122] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, USB flash drive, mobile hard disk, disk or optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0123] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0124] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0125] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0126] The units described as separate components may or may not be physically separated, and the components shown as units 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for updating a database, characterized in that: include: Initialize the database model; If input data is received, the input data is classified and stored; wherein, when the input data is received, the input data is classified into known type input data and unknown type input data according to whether the function and / or type of the input data can be identified, the unknown type input data includes known type input data and useless data, and the useless data refers to abnormal data; Match the successfully classified input data with the preset data rules of the database model; Data rules corresponding to the input data that failed classification are configured to update the database model to obtain an updated database model.

2. The method for updating a database according to claim 1, characterized in that: The initialization database model includes: System initialization, creating routing rules through the preset configuration center; Create the corresponding database schema according to the routing rules; Configure the corresponding table fields for each database mode to obtain the initialized database model.

3. The method for updating a database according to claim 1, characterized in that: The step of matching the successfully classified input data with the preset data rules of the database model includes: According to the successfully classified input data, a routing rule corresponding to the successfully classified input data is matched in the database model; If a routing rule corresponding to the successfully classified input data is matched in the database model, an attribute field corresponding to the successfully classified input data is matched in the database model according to the successfully classified input data.

4. The method for updating a database according to claim 1, wherein: The configuration corresponds to the data rules of the input data that failed to be classified, so as to update the database model and obtain the updated database model, including: If it is identified that the input data contains input data that fails classification, the configuration center updates the data; The database model is updated according to the updated data of the configuration center to obtain an updated database model.

5. The method for updating a database according to claim 4, characterized in that: Before the updating of the database model according to the configuration center update data and obtaining the updated database model, the method further includes: Release configuration center update data; Through the callback function, determine whether the configuration center update data exists in the database model.

6. The method for updating a database according to claim 1, wherein: If input data is received, the input data is classified and stored, including: If input data is received, the input data is classified and stored according to the function and data type of the input data; wherein the function of the input data includes at least one of a human body recognition function, a face recognition function, a vehicle identification function and an infrared recognition function; the data type includes any one of text, pictures and videos.

7. A database updating device, characterized in that: include: Initialization module, used to initialize the database model; A classification module, for classifying and storing input data upon receipt of the input data; wherein upon receipt of the input data, the input data is classified into known type input data and unknown type input data according to whether the function and / or type of the input data can be identified, wherein the unknown type input data includes known type input data and useless data, wherein the useless data refers to abnormal data; A matching module is used to match successfully classified input data with preset data rules of the database model; The update module is used to configure data rules corresponding to the input data that failed classification, so as to update the database model and obtain an updated database model.

8. The database updating device according to claim 7, characterized in that: The initialization module comprises: Initialization unit, used for system initialization, creating routing rules through the preset configuration center; A creation unit is used to create a corresponding database schema according to routing rules; The configuration unit is used to configure the corresponding table fields for each database mode to obtain the initialized database model.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

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