Database configuration method and system, electronic equipment, medium and computer product

By acquiring and updating the initial database and generating the target database according to the target needs, the problem of different business needs in the existing technology corresponds to different databases, and efficient database configuration and maintenance are achieved, avoiding data redundancy and bloat.

CN119441188APending Publication Date: 2025-02-14CTRIP BUSINESS TRAVEL INFORMATION SERVICE (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411535502.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, the different business needs of company customers usually require a database to be corresponding to each, resulting in high development costs, data bloat, difficulty in maintaining, and easy to forget historical data processing, resulting in data loss.

Method used

By obtaining the initial database corresponding to all common needs and any common needs, query and update the initial database according to the target needs, thereby generating the target database, realizing zero-code expansion and flexible database configuration.

Benefits of technology

It improves the generation efficiency and maintenance efficiency of the target database, ensures the integrity of the overall underlying data, avoids data redundancy and rapid expansion, and achieves zero code expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441188A_ABST
    Figure CN119441188A_ABST
Patent Text Reader

Abstract

The invention provides a database configuration method and system, electronic equipment, a medium and a computer product. The database configuration method comprises the following steps: acquiring an initial database; wherein the initial database comprises all common requirements and a first configuration rule corresponding to any common requirement; querying an initial database according to the target demand; updating the initial database according to the query result; and determining the updated initial database as a target database. According to the method, the corresponding target database can be quickly generated according to the target demand of the customer or the production line through the templated initial database including the common demand, so that diversified demands are ensured, the generation efficiency of the target database is improved, and meanwhile, background personnel can maintain only the same initial database, so that the maintenance efficiency is improved. A plurality of clients or a plurality of production lines share the same initial database, so that the integrity of the overall underlying data can be ensured, the redundancy and rapid expansion of the stored data can be avoided, and the zero code expansion is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of business travel communication technology, and in particular to a database configuration method, system, electronic device, medium and computer product. Background Art

[0002] With the rapid growth of business travel, an increasing number of corporate clients have diverse business needs. For these corporate clients' business configuration scenarios, the current approach typically involves developers hard-coding the configuration. The process involves hard-coding a separate set of configuration rules for each rule and then storing them in the database—one database for each business requirement, or one database for each company. However, this approach requires additional processing of historical data, has a large time window, and incurs significant development costs. Furthermore, each rule needs to be stored, leading to rapid data expansion as the business grows. For new business needs, additional code needs to be written, hindering expansion and maintenance, and making it easy to forget historical data processing, resulting in data loss. Summary of the Invention

[0003] The technical problem to be solved by this disclosure is to overcome the shortcomings of existing technologies where different business needs or different companies require different databases, and to provide a database configuration method, system, electronic device, medium and computer product.

[0004] This disclosure solves the above-mentioned technical problems through the following technical solution:

[0005] This disclosure provides a database configuration method, the database configuration method including:

[0006] Obtain the initial database;

[0007] The initial database includes all common requirements and the first configuration rule corresponding to any common requirement;

[0008] Query the initial database according to the target requirements;

[0009] Update the initial database according to the query results;

[0010] The updated initial database is selected as the target database.

[0011] Preferably, the step of updating the initial database according to the query results includes:

[0012] When the initial database includes target requirements, a first configuration rule corresponding to the target requirements is determined from the initial database;

[0013] Update the initial database according to the first configuration rule.

[0014] Preferably, the step of updating the initial database according to the query results includes:

[0015] When the initial database includes some target requirements, a first configuration rule corresponding to some target requirements is determined from the initial database;

[0016] Determine the second configuration rule corresponding to another part of the target requirements;

[0017] The initial database is updated according to the first configuration rule and the second configuration rule.

[0018] Preferably, the step of updating the initial database according to the query results includes:

[0019] When the initial database does not include the target requirement, a second configuration rule corresponding to the target requirement is determined;

[0020] Update the initial database according to the second configuration rule.

[0021] Preferably, the database configuration method further includes:

[0022] When the common requirements and the first configuration rules corresponding to the common requirements change, update the initial database.

[0023] Preferably, the target demand includes customer demand and production line demand.

[0024] This disclosure also provides a database configuration system, the database configuration system comprising:

[0025] The acquisition module is used to obtain the initial database;

[0026] The initial database includes all common requirements and the first configuration rule corresponding to any common requirement;

[0027] The query module is used to query the initial database according to the target requirements;

[0028] The update module is used to update the initial database according to the query results;

[0029] The determination module is used to determine the updated initial database as the target database.

[0030] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and for running on the processor, wherein the processor executes the computer program to implement the database configuration method described above.

[0031] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the database configuration method described above.

[0032] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the database configuration method described above.

[0033] On the basis of conforming to the common sense in this field, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.

[0034] The positive and progressive effects of this disclosure are as follows:

[0035] This disclosure utilizes a templated initial database that includes common requirements. Based on the target needs of customers or production lines, it can quickly generate corresponding target databases, improving the efficiency of target database generation while ensuring diverse requirements. Simultaneously, backend personnel can maintain only a single initial database, improving maintenance efficiency. Multiple customers or production lines sharing the same initial database can guarantee the integrity of the overall underlying data, avoid data redundancy and rapid expansion, and achieve zero-code expansion. Attached Figure Description

[0036] Figure 1 A flowchart of a database configuration method provided in Embodiment 1 of this disclosure;

[0037] Figure 2 A fallback library construction view for a specific example of a database configuration method provided in Embodiment 1 of this disclosure;

[0038] Figure 3 A rule-based general field definition view, which is a specific example of a database configuration method provided in Embodiment 1 of this disclosure;

[0039] Figure 4 A flowchart illustrating a specific example of a database configuration method provided in Embodiment 1 of this disclosure;

[0040] Figure 5 This is a schematic diagram of the structure of a database configuration system provided in Embodiment 2 of this disclosure;

[0041] Figure 6 This is a schematic diagram of the structure of the electronic device provided in Embodiment 3 of this disclosure. Detailed Implementation

[0042] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.

[0043] In this embodiment of the disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good morals.

[0044] Example 1

[0045] In traditional customer or production line database initialization scenarios, the development process requires hard-coding a separate set of initial data for each customer or production line according to different rules. As the number of customers or production lines increases, the number of initial databases grows rapidly, leading to data bloat and posing challenges for later business expansion and maintenance. Furthermore, operators are prone to forgetting to process historical data, resulting in data loss. Therefore, developing a fallback initial database that applies to all rules is beneficial for flexibly supporting rapid business development, reducing data growth rates, and simultaneously lowering development and maintenance costs.

[0046] This embodiment provides a database configuration method; see [link to documentation]. Figure 1 Database configuration methods include:

[0047] S1. Obtain the initial database.

[0048] The initial database includes all common requirements and the first configuration rule corresponding to any common requirement.

[0049] S2. Query the initial database according to the target requirements.

[0050] The target requirements include both customer needs and production line needs.

[0051] S3. Update the initial database according to the query results.

[0052] In an optional implementation, step S3 includes:

[0053] S311. When the initial database includes the target requirements, determine the first configuration rule corresponding to the target requirements from the initial database.

[0054] S312. Update the initial database according to the first configuration rule.

[0055] In an optional implementation, step S3 further includes:

[0056] S321. When the initial database includes some target requirements, determine the first configuration rule corresponding to some target requirements from the initial database.

[0057] S322. Determine the second configuration rule corresponding to another part of the target requirements.

[0058] S323. Update the initial database according to the first configuration rule and the second configuration rule.

[0059] In an optional implementation, step S3 further includes:

[0060] S331. When the initial database does not include the target requirements, determine the second configuration rule corresponding to the target requirements.

[0061] S332. Update the initial database according to the second configuration rule.

[0062] S4. Set the updated initial database as the target database.

[0063] This embodiment utilizes a templated initial database that includes common requirements. Based on the target needs of customers or production lines, a corresponding target database can be quickly generated. This improves the efficiency of target database generation while ensuring diverse requirements are met. Furthermore, backend personnel can maintain only a single initial database, improving maintenance efficiency. Multiple customers or production lines sharing the same initial database ensures the integrity of the overall underlying data and avoids data redundancy and rapid expansion, enabling zero-code expansion.

[0064] In an optional implementation, the database configuration method further includes:

[0065] S0. When common requirements and the corresponding first configuration rules change, update the initial database.

[0066] In this embodiment, when the common needs of customers or production lines and the configuration rules corresponding to those common needs change, the initial database is updated by adding, deleting, or modifying the common needs or the configuration rules corresponding to them, so as to better meet the needs and development of customers or production lines.

[0067] The following is a specific example detailing the database configuration method of this embodiment. This example uses a technology stack such as AOP (Aspect Oriented Programming), thread pools (a technology for managing and controlling the lifecycle of threads), and React (an open-source database for building user interfaces) to complete the front-end page display of the target database and the back-end interface to classify and supplement the configured data.

[0068] It should be noted that in this example, the initial database will be figuratively referred to as the fallback database. The creation of the fallback database offers significant advantages in terms of efficiency, development cost, and data storage capacity, specifically in the following ways:

[0069] I. Centralized Configuration of the Backup Repository: For each business rule, the backup repository can be maintained uniformly through a dedicated page, which supports querying, modifying, adding, and deleting each business rule. The business rules include common requirements and the first configuration rule corresponding to those common requirements.

[0070] from Figure 2As can be seen, the fallback database is built by adding different data according to different business rules, and the query interface updates the data according to different business rules.

[0071] 2. Eliminate Initialization: Target rules for customers or production lines can be directly queried on a dedicated page in the fallback database. This eliminates the need to create a database for each customer or production line; all customers and production lines use the same initial fallback database. Target rules include target requirements and the corresponding second configuration rule.

[0072] When the customer or production line is responsible for establishing the target database, the workflow is as follows:

[0073] First, we need to define, such as Figure 3 The general fields for the rules are shown.

[0074] Secondly, the backup database is accessed through the query interface, matched with various business lines, and data is populated according to the rules to ensure the integrity of the interface data.

[0075] Then as Figure 4 As shown, the fallback database is transformed into a target database that meets the target requirements.

[0076] S401, Query RC (i.e., target rule).

[0077] S402, Accountant Configuration RC.

[0078] There are two scenarios: Scenario 1: If all customized RCs are in the fallback database, the accountant configures the target database based on the retrieved RCs. Scenario 2: If the customized RCs are not in the fallback database (i.e., the RC status is invalid), the fallback database is not queried again; instead, the second configuration rule is determined again based on the RCs (i.e.,...). Figure 4 (Customized by the company).

[0079] S403. Configure the default RC (i.e., business rules) based on the fallback library (lib).

[0080] It should be noted that if some of the customized RCs are in the fallback database and some are not, the default rules of the fallback database and the company customizations will be merged (i.e., the initial database will be updated according to the first and second configuration rules) to generate the target database.

[0081] In addition, if a company has multiple production lines, the multiple production lines do not need to repeatedly add the same target rule. That is, under the same company, different production lines share the same company-customized library (i.e., the same target database).

[0082] 3. Unification of backup database data: By extracting commonalities of target requirements, backup database data is determined based on common requirements and their configuration rules, and the data is completed.

[0083] The core solution of this example is that the establishment of the target database, from rule configuration to page display and interface output, can be done entirely online without any coding intervention, and there are no multiple redundant data sets. The initialization data of the fallback database will only be stored once.

[0084] This example offers the following benefits: 1. Reduced data volume: The shift from initializing data for each rule to using a single set of rules at the underlying level significantly reduces database load. 2. Improved scalability: Different business data can be matched and populated within aspects for different rules. 3. Increased data processing efficiency: New or business data takes effect immediately without needing to process historical data. 4. Guaranteed accuracy and completeness: Once the fallback data for each rule is determined, all types are guaranteed to appear, preventing missing data and reducing the event rate.

[0085] Example 2

[0086] Corresponding to the aforementioned database configuration method embodiments, this embodiment provides a database configuration system, see [link to documentation]. Figure 5 The database configuration system includes:

[0087] Get module 1, used to obtain the initial database.

[0088] The initial database includes all common requirements and the first configuration rule corresponding to any common requirement.

[0089] Query module 2 is used to query the initial database based on the target requirements.

[0090] The target requirements include customer needs and production line needs.

[0091] Update module 3 is used to update the initial database according to the query results.

[0092] Module 4 is used to determine the updated initial database as the target database.

[0093] In an optional implementation, the update module 3 is further configured to determine the first configuration rule corresponding to the target requirement from the initial database when the initial database includes the target requirement; and to update the initial database according to the first configuration rule.

[0094] In an optional implementation, the update module 3 is further configured to: determine a first configuration rule corresponding to a portion of the target requirements from the initial database when the initial database includes a portion of the target requirements; determine a second configuration rule corresponding to another portion of the target requirements; and update the initial database according to the first configuration rule and the second configuration rule.

[0095] In an optional implementation, the update module 3 is further configured to determine a second configuration rule corresponding to the target requirement when the initial database does not include the target requirement; and to update the initial database according to the second configuration rule.

[0096] In an optional implementation, the update module 3 is further configured to update the initial database when the common requirements and the first configuration rules corresponding to the common requirements change.

[0097] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs.

[0098] Example 3

[0099] Figure 6 This is a schematic diagram of the structure of an electronic device according to an example embodiment of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the database configuration method of any of the above embodiments. Figure 6 The electronic device 60 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0100] like Figure 6 As shown, the electronic device 60 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 60 may include, but are not limited to: at least one processor 61, at least one memory 62, and a bus 63 connecting different system components (including memory 62 and processor 61).

[0101] Bus 63 includes a data bus, an address bus, and a control bus.

[0102] The memory 62 may include volatile memory, such as random access memory (RAM) 621 and / or cache memory 622, and may further include read-only memory (ROM) 623.

[0103] The memory 62 may also include a program tool 625 (or utility) having a set (at least one) program module 624, such program module 624 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0104] The processor 61 executes various functional applications and data processing by running computer programs stored in the memory 62, such as the database configuration method provided in any of the above embodiments.

[0105] Electronic device 60 can also communicate with one or more external devices 64 (e.g., keyboard, pointing device, etc.). This communication can be performed through input / output (I / O) interface 65. Furthermore, electronic device 60 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public network, such as the Internet) via network adapter 66. As shown, network adapter 66 communicates with other modules of electronic device 60 via bus 63. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 60, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.

[0106] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0107] Example 4

[0108] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the database configuration method provided in any of the above embodiments.

[0109] The readable storage medium may include, but is not limited to, a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0110] Example 5

[0111] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the database configuration method described in any of the preceding embodiments.

[0112] The program code for executing the computer program product of this disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0113] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.

Claims

1. A database configuration method, characterized in that: The database configuration method comprises: Get the initial database; The initial database includes all common requirements and a first configuration rule corresponding to any common requirement; querying the initial database according to target requirements; Update the initial database according to the query results; Identify the updated initial database as the target database.

2. The database configuration method according to claim 1, characterized in that: The step of updating the initial database according to the query result comprises: When the initial database includes the target requirement, determining a first configuration rule corresponding to the target requirement from the initial database; The initial database is updated according to the first configuration rule.

3. The database configuration method according to claim 1, characterized in that: The step of updating the initial database according to the query result comprises: When the initial database includes some target requirements, determining a first configuration rule corresponding to the some target requirements from the initial database; Determine a second configuration rule corresponding to another part of the target requirements; The initial database is updated according to the first configuration rule and the second configuration rule.

4. The database configuration method according to claim 1, characterized in that: The step of updating the initial database according to the query result comprises: When the initial database does not include the target requirement, determining a second configuration rule corresponding to the target requirement; The initial database is updated according to the second configuration rule.

5. The database configuration method according to claim 1, characterized in that: The database configuration method also includes: When the common requirement and the first configuration rule corresponding to the common requirement change, the initial database is updated.

6. The database configuration method according to claim 1, characterized in that: The target demands include customer demands and production line demands.

7. A database configuration system, characterized in that: The database configuration system comprises: An acquisition module is used to acquire an initial database; The initial database includes all common requirements and a first configuration rule corresponding to any common requirement; A query module, used to query the initial database according to target requirements; An updating module, used for updating the initial database according to the query result; The determination module is used to determine the updated initial database as the target database.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the database configuration method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the database configuration method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the database configuration method according to any one of claims 1 to 6 is implemented.