Service system generation method, device, computer equipment and storage medium

By obtaining and utilizing the associations between data tables in the sample system when generating the service system, determining the data table weights and generating the associations of the target service system, the problem of low generation efficiency in the existing technology is solved, and efficient cross-environment service system generation is achieved.

CN113986887BActive Publication Date: 2025-09-12JINGDONG TECH HLDG CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111372318.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-18
Publication Date
2025-09-12
Estimated Expiration
2041-11-18

AI Technical Summary

Technical Problem

When generating service systems, especially robot dialogue systems, existing technologies have problems such as complex data and complex dependencies between modules, resulting in low generation efficiency.

Method used

By obtaining the association relationships between the data tables in the sample system, determining the weight of each data table based on these association relationships, and storing the data tables in the target service system in descending order of weight, the association relationships between the data tables in the target service system are generated.

Benefits of technology

There is no need to transmit the relationship between data tables through complex coding, which improves the generation efficiency of the service system. The service system can be generated across environments, avoiding generation failures or data confusion caused by duplicate primary keys of data tables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986887B_ABST
    Figure CN113986887B_ABST
Patent Text Reader

Abstract

The present application proposes a method, apparatus, computer device, and storage medium for generating a service system, wherein the method includes: obtaining the association relationship between each data table in a sample system; determining the weight of each data table based on the association relationship between each data table; storing each data table in the target service system in descending order of weight, and determining the identification of each data table in the target service system; and generating the association relationship between each data table in the target service system based on the identification of each data table in the target service system. This method obtains the association relationship between each data table in the sample system, and automatically generates the association relationship between each data table in the target service system based on the association relationship between each data table. This method does not require complex coding to convey the association relationship between data tables, thereby improving the generation efficiency of the service system. In addition, it does not require recording the primary key of the data table, and can generate a service system across environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for generating a service system. Background Art

[0002] In related technologies, when copying a service system, such as a robot dialogue system, the service system is usually broken down into sub-modules, and relevant copy codes are written for the sub-modules. The dependencies between modules also need to be written and transferred to complete the copying of the service system.

[0003] However, since the data that constitutes the service system is very complex, there are complex dependencies between and within modules, and it is very difficult to analyze and encode the replication dependencies, and the generation efficiency of the service system is low. Summary of the Invention

[0004] The present application proposes a method, apparatus, computer device and storage medium for generating a service system.

[0005] In one embodiment of the present application, a method for generating a service system is provided, including:

[0006] Obtain the relationship between each data table in the sample system;

[0007] Determining the weight of each data table according to the association relationship between the data tables;

[0008] storing each data table in the target service system in descending order of weight, and determining an identifier of each data table in the target service system;

[0009] According to the identifier of each data table in the target service system, an association relationship between each data table in the target service system is generated.

[0010] Another embodiment of the present application provides a device for generating a service system, including:

[0011] The acquisition module is used to obtain the relationship between various data tables in the sample system;

[0012] A first determining module, configured to determine the weight of each data table according to the association relationship between the data tables;

[0013] A second determining module is used to store each data table in the target service system in descending order of weight, and determine an identifier of each data table in the target service system;

[0014] A generating module is used to generate an association relationship between each data table in the target service system according to an identifier of each data table in the target service system.

[0015] Another aspect of the present application provides a computer device including a processor and a memory;

[0016] The processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the method for generating a service system as described in the above-mentioned embodiment.

[0017] Another embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for generating a service system as described in the above-mentioned embodiment.

[0018] Another embodiment of the present application provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the method for generating a service system described in the embodiment of the first aspect above is implemented.

[0019] The service system generation method, apparatus, computer equipment, and storage medium of the embodiments of the present application automatically generate associations between data tables in a target service system based on associations between data tables obtained from a sample system. This eliminates the need to convey associations between data tables through complex coding, thereby improving the generation efficiency of the service system. Furthermore, the service system can be generated across environments without recording primary keys of data tables.

[0020] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0022] Figure 1 A flowchart of a method for generating a service system provided in an embodiment of the present application;

[0023] Figure 2 A schematic diagram of a generation architecture of a service system provided in an embodiment of the present application;

[0024] Figure 3 A flowchart of another method for generating a service system provided in an embodiment of the present application;

[0025] Figure 4A flowchart of another method for generating a service system provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of the structure of a generating device of a service system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0028] The following describes the method, apparatus, computer device, and storage medium for generating a service system according to an embodiment of the present application with reference to the accompanying drawings.

[0029] In related technologies, when copying a service system, such as a robot dialogue system, the service system is usually broken down into sub-modules, and relevant copy codes are written for the sub-modules. The dependencies between modules also need to be written and transferred to complete the copying of the service system.

[0030] However, since the data that constitutes the service system is very complex, there are complex dependencies between and within modules, and it is very difficult to analyze and encode the replication dependencies, and the generation efficiency of the service system is low.

[0031] The service system generation method of the embodiment of the present application obtains the association relationship between each data table in the sample system, and automatically generates the association relationship between each data table in the target service system based on the association relationship between each data table. This eliminates the need to transmit the association relationship between the data tables through complex coding, thereby improving the generation efficiency of the service system.

[0032] Figure 1 A flowchart of another method for generating a service system provided in an embodiment of the present application.

[0033] The method for generating a service system according to an embodiment of the present application may be executed by a device for generating a service system according to an embodiment of the present application. The device may be configured in a computer device to quickly generate a target service system.

[0034] like Figure 1 As shown, the generation method of the service system includes:

[0035] Step 101: Obtain the association relationship between various data tables in the sample system.

[0036] In practical applications, the same scenario may require multiple similar robots, that is, robots with similar service systems. For example, branches of the same bank in different locations may need to be equipped with similar banking robots, and the same service agencies in different locations may need to be equipped with similar government robots. Generating multiple service systems by simply writing related duplicate code is relatively inefficient.

[0037] In this application, the associations between the data tables in the sample system can be obtained. The sample system can be determined from multiple configured candidate systems according to preset rules, or it can be a system that matches the type of the target service system and is determined from multiple candidate systems based on the type of the target service system. For example, if the target service system is a bank customer robot system, the bank customer robot system can be selected from multiple candidate systems as the sample system.

[0038] The association relationship between the data tables can be understood as the dependency relationship between the data tables, and the association relationship between the data tables can be read from a pre-configured configuration file.

[0039] In this application, you can select a configuration file format and describe the relationships between data tables according to this configuration format. For example, if the entire configuration file is organized in JSON format, the following basic elements can be provided: "database": the database; "version": the version of the table definition; "table": the name of the data table to be defined; "fields": the fields in the data table, their types, and attributes.

[0040] Here are some examples:

[0041]

[0042]

[0043] As shown above, the name of the data table is dm_behavior_trees.

[0044] 1) query attribute: If this field is true, it will be used as a search field; multiple search fields will be used as conditions for joint search.

[0045] If a table does not have a query field, it can be considered a passive retrieval table. During the retrieval process, a complete data set will be pieced together based on the reference relationship between other data tables and the data table. Usually, tables with public purposes are configured as passive tables. For example, answers are used by many data tables. Although all answers can be retrieved through bot_id, they may contain some discarded data that is not easy to eliminate. A clean and complete data set can be obtained by using the answer ID referenced by other tables.

[0046] 2) Type attribute: This field can be divided into three categories:

[0047] reference: The associated table index, as shown above; the bot_id field in dm_behavior_trees depends on the id field in the base_chatbot data table.

[0048] dynamic_reference: Associates different table indexes based on the different values ​​of other fields in the data table, as shown below: The value of the answer_id field depends on different data tables and the type of answer_type. When the answer_type value is 1, it depends on the id of the bm_classifier data table; when answer_type is not 1, it depends on the id of the base_answer data table.

[0049]

[0050]

[0051] Among them, symbol is not configured and the default is "==". In addition, symbols such as >, >=, <, <=, and in are also supported.

[0052] composite_reference: complex format data (such as JSON), using table indexes, or data that requires special processing such as external generation. You can set a method to handle it, for example:

[0053]

[0054] Here you can fill in the handler with the program class for custom processing.

[0055] Step 102: Determine the weight of each data table based on the association relationship between the data tables.

[0056] After obtaining the associations between the data tables, the weight of each data table can be determined based on the associations between the data tables. In this application, in response to a first data table referencing a second data table, the weight of the second data table can be adjusted upward. In other words, when each data table is referenced by another data table, the weight of the referenced table can be adjusted upward based on the weight of the referencing table. In this way, the weight of the data table can reflect the call status of the data table.

[0057] As an example, an upward adjustment coefficient for the weight of the second data table can be determined based on the weight of the first data table, and the upward adjustment coefficient can be added to the weight of the second data table itself to increase the weight of the second data table. Here, the upward adjustment coefficient can be understood as the increase in weight. For example, the greater the weight of the first data table, the greater the upward adjustment coefficient for the weight of the second data table.

[0058] For example, if the weight of the first data table is 0.6, the upward adjustment coefficient is determined to be 0.6*0.2=0.12. For another example, if the weight of the first data table is 0.3, the upward adjustment coefficient is determined to be 0.3*0.1=0.03.

[0059] Since the more times a data table is called, the more important it is, as another example, whenever a data table references a second data table, the weight of the second data table can be increased by a fixed value, and the weight of the second data table can be increased by another value based on the weight of the data table that references the second data table.

[0060] For example, if data table A references data table B, then the weight of data table B can be increased by 0.1. If the weight of data table A itself is 0.5, then the weight of data table B can be increased by another 0.1. If the weight of data table A itself is 0.2, then the weight of data table B can be increased by another 0.02.

[0061] Step 103 : storing each data table in the target service system in descending order of weight, and determining the identifier of each data table in the target service system.

[0062] Since the weight of a data table can represent the importance of the data table in the service system, in this application, each data table can be stored in the target service system in sequence according to the order of the data table weight from high to low.

[0063] During implementation, the data table with the highest weight can be read first and stored in the target service system, followed by the data table with the second highest weight and stored in the target service system, and so on until the data table with the lowest weight is read and stored in the target service system. Alternatively, all data tables can be read in descending order of weight, and then each data table can be stored in the target service system in descending order of weight.

[0064] When storing each data table in the target service system in descending order of weight, an identifier of each data table in the target service system is determined. The identifier of the data table in the target service system can be the storage address of the data table in the target service system, or an identifier indicating the storage location of the data table in the target service system, such as a storage address number.

[0065] Step 104: Generate association relationships between data tables in the target service system based on the identifier of each data table in the target service system.

[0066] Since the identification of the data table in the target service system may be different from its identification in the sample system, in order to enable the data tables in the target service system to be accurately called, in this application, the association relationship between the data tables in the target service system can be generated based on the association relationship between the data tables in the sample system and the identification of each data table in the target service system, so that the data tables can accurately call other data tables based on the association relationship.

[0067] It should be noted that some data tables in the sample system may not be related to other data tables. In this case, these tables can be directly stored in the target service system. For example, when generating a dialogue system, the data tables corresponding to the query questions preset in the sample system can be directly stored in the new dialogue system.

[0068] Figure 2 This is a schematic diagram of a service system architecture provided in an embodiment of the present application. Figure 2As shown, the configuration reader module reads the configuration file, which describes the relationships between the data tables in the sample system. Each data table referenced by other data tables can have its weight increased, and the weight of the referenced tables is accumulated. The module data reader module reads each data table in descending order of weight. The memory model writer module writes each data table to the target service system in descending order of weight and updates the relationships between the data tables in the target service system based on the relationships between the data tables in the sample system. The data extraction / recovery module extracts and copies business data used by various functional modules in the sample system to the target business system, and also performs data recovery. The data source adapter is a data reading module that can encapsulate different data sources (such as middleware data sources, relational data sources, document data sources, and file data sources), greatly simplifying data extraction and recovery. Furthermore, data quality inspection can be performed to improve the quality of the extracted or recovered data. The custom data processing module processes the written data. The method for generating a service system in an embodiment of the present application obtains the association relationship between each data table in a sample system, and determines the weight of each data table based on the association relationship between each data table. Then, according to the order of weight from high to low, each data table is stored in the target service system in sequence, and the identification of each data table in the target service system is determined. Based on the identification of each data table in the target service system, the association relationship between each data table in the target service system is generated. Thus, by obtaining the association relationship between each data table in the sample system and automatically generating the association relationship between each data table in the target service system based on the association relationship between each data table, the association relationship between each data table in the target service system is not required to be transferred through complex coding, thereby improving the efficiency of service system generation. In addition, in the method for generating a service system in the related art, all data extracted from the original database may have duplicate primary keys of the data tables in the new environment database, which may prevent successful replication or cause data confusion, resulting in the inability to replicate across environments. The method for generating a service system in an embodiment of the present application obtains the association relationship between each data table in the sample system without recording the primary keys of the data tables. This allows the generation of a service system across environments to avoid the problem of unsuccessful service system generation or data confusion caused by duplicate primary keys of data tables. In actual applications, products may be constantly updated, such as a certain type of robot adding new functions. In related technologies, when products are constantly iterating, slightly adding or adjusting data tables and the relationships between data tables requires rewriting code to adapt, which has high maintenance costs. However, the service system generation method of the present application does not require writing new code for maintenance. Instead, by simply modifying the relationships between data tables, the service system can be automatically generated based on the modified relationships between the data tables, greatly improving the generation efficiency and accuracy of the service system. Figure 3This is a flow chart of another method for generating a service system provided in an embodiment of the present application. Figure 3 As shown, the service system generation method includes: Step 301, determining the functional modules included in the sample system, the data tables associated with each functional module, and the calling relationships between the functional modules. In this application, the functional modules included in the sample system can be determined based on the functions implemented by the sample system. The code corresponding to each functional module can also be parsed to determine the data tables associated with each functional module, i.e., the data tables required for each functional module to implement the corresponding function, and to determine the calling relationships between the functional modules. Step 302, determining the associations between the data tables based on the calling relationships between the functional modules. In this application, the associations between the data tables can be extracted based on the calling relationships between the functional modules and the data tables associated with each functional module, i.e., determining the associations between the data tables. Step 303, determining the weight of each data table based on the associations between the data tables. Step 304, storing each data table in descending order of weight into the target service system, and determining the identifier of each data table in the target service system. Step 305, generating the associations between the data tables in the target service system based on the identifier of each data table in the target service system. In this application, steps 303-305 are similar to steps 102-104 described above, and therefore will not be repeated here. In an embodiment of this application, when obtaining the association relationship between the various data tables in the sample system, the functional modules included in the sample system, the data tables associated with each functional module, and the call relationships between the functional modules can be determined. Based on the call relationships between the functional modules, the association relationship between the various data tables can be determined. Thus, the association relationship between the various data can be determined based on the call relationships between the functional modules in the sample system. Subsequently, the service system can be automatically generated based on the association relationship between the various data tables, thereby improving the efficiency of generating the service system. Figure 4 This is a flow chart of another method for generating a service system provided in an embodiment of the present application. Figure 4As shown, the method for generating a service system includes: Step 401, obtaining the association relationship between each data table in the sample system. Step 402, determining the weight of each data table based on the association relationship between each data table. In the present application, steps 401-402 are similar to steps 101-102 above, and therefore will not be repeated here. Step 403, storing each data table in the target service system in descending order of weight, and determining the storage location of each data table in the target service system. In the present application, each data table is stored in the target service system in descending order of weight. Please refer to the corresponding content in step 103 above, and therefore will not be repeated here. When each data table is written to the target service system, the storage location of each data table in the target service system can be determined. The storage location here can refer to the storage path of the data table in the target service system. In other words, in the embodiment of the present application, the storage location of each data table in the target service system can be used as the identifier of each data table in the target service system. Step 404, based on the storage location of each data table in the target service system, generates call pointers between the data tables in the target service system. After each data table is stored in the target system, the storage location of each data table has changed compared to that in the sample system. In order to ensure that the data table is accurately called, the call pointers between the data tables in the target system can be determined based on the association relationship between the data tables in the sample system and the storage location of each data table in the target service system. Among them, the call pointers between the data tables can be used to indicate the association relationship between the data tables at the corresponding storage locations. For example, the storage location of data table C is d1, the storage location of data table D is d2, and data table C references data table D. Then the call pointer between the two data tables can indicate that data table C with storage location d1 references data table D with storage location d2. In other words, in this application, by determining the call location when calling between the data tables in the target service system, the target service system can accurately call the data table based on the call pointers between the data tables. In an embodiment of the present application, the weight of each data table is determined based on the association relationship between each data table, and each data table is stored in the target service system in descending order of weight, and the storage location of each data table in the target service system is determined. Based on the storage location of each data table in the target service system, a call pointer between each data table in the target service system is generated. Thus, by automatically generating the call pointer between each data table in the target service system based on the association between each data table obtained from the sample system, there is no need to transmit the association relationship between the data tables through complex coding, thereby improving the generation efficiency of the service system, and enabling the target service system to accurately call the data table based on the call pointer between each data table. In order to realize the above embodiment, an embodiment of the present application also proposes a generation device for a service system. Figure 5This is a schematic diagram of the structure of a generating device of a service system provided in an embodiment of the present application. Figure 5As shown, the generating device 500 of the service system includes: an acquisition module 510 for acquiring the association relationship between each data table in the sample system; a first determination module 520 for determining the weight of each data table based on the association relationship between each data table; a second determination module 530 for storing each data table in the target service system in descending order of weight, and determining the identifier of each data table in the target service system; a generation module 540 for generating the association relationship between each data table in the target service system based on the identifier of each data table in the target service system. In a possible implementation of the embodiment of the present application, the first determination module 520 is used to: in response to the first data table referencing the second data table, increase the weight of the second data table. In a possible implementation of the embodiment of the present application, the first determination module 520 is used to: determine the increase coefficient of the weight of the second data table based on the weight of the first data table; and increase the weight of the second data table based on the increase coefficient. In one possible implementation of the embodiment of the present application, the acquisition module 510 is configured to: determine the functional modules included in the sample system, the data tables associated with each functional module, and the call relationships between the functional modules; and determine the relationship between the data tables based on the call relationships between the functional modules. In one possible implementation of the embodiment of the present application, the second determination module 530 is configured to: determine the storage location of each data table in the target service system; and the generation module 540 is configured to generate call pointers between the data tables in the target service system based on the storage location of each data table in the target service system. It should be noted that the above explanation of the embodiment of the service system generation method is also applicable to the service system generation device of this embodiment, and will not be repeated here. The service system generation device of the embodiment of the present application obtains the relationship between the data tables in the sample system, and determines the weight of each data table based on the relationship between the data tables. Then, according to the weight order from high to low, each data table is stored in the target service system in sequence, and the identification of each data table in the target service system is determined. Based on the identification of each data table in the target service system, the relationship between the data tables in the target service system is generated. Therefore, by obtaining the association relationship between each data table in the sample system, the association relationship between each data table in the target service system is automatically generated according to the association relationship between each data table. There is no need to use complex coding to transmit the association relationship between the data tables, which improves the generation efficiency of the service system. In addition, there is no need to record the primary key of the data table, and the service system can be generated across environments.To implement the above-mentioned embodiments, embodiments of the present application further provide a computer device comprising a processor and a memory; wherein the processor reads executable program code stored in the memory to execute a program corresponding to the executable program code, thereby implementing the method for generating a service system as described in the above-mentioned embodiments. To implement the above-mentioned embodiments, embodiments of the present application further provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by the processor, implements the method for generating a service system as described in the above-mentioned embodiments. To implement the above-mentioned embodiments, embodiments of the present application further provide a computer program product comprising a computer program, wherein, when executed by the processor, the computer program implements the method for generating a service system as described in the above-mentioned embodiments. In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for generating a service system, characterized in that: include: Obtain the relationship between each data table in the sample system; Determining the weight of each data table according to the association relationship between the data tables; storing each data table in the target service system in descending order of weight, and determining an identifier of each data table in the target service system; generating association relationships between the data tables in the target service system according to the identifier of each data table in the target service system; Determining the identifier of each data table in the target service system includes: Determining a storage location of each of the data tables in the target service system; Generating association relationships between data tables in the target service system according to the identifier of each data table in the target service system includes: According to the storage location of each data table in the target service system, a call pointer between each data table in the target service system is generated.

2. The method according to claim 1, wherein Determining the weight of each data table according to the association relationship between the data tables includes: In response to the first data table referencing the second data table, the weight of the second data table is increased.

3. The method according to claim 2, wherein The step of increasing the weight of the second data table includes: Determining an upward adjustment coefficient for the weight of the second data table according to the weight of the first data table; Based on the upward adjustment coefficient, the weight of the second data table is adjusted upward.

4. The method according to claim 1, wherein The obtaining of the association relationship between the various data tables in the sample system includes: Determine the functional modules included in the sample system, the data tables associated with each functional module, and the calling relationships between the functional modules; The association relationship between the various data tables is determined based on the calling relationship between the various functional modules.

5. A generating device of a service system, characterized in that: include: The acquisition module is used to obtain the relationship between various data tables in the sample system; A first determining module, configured to determine the weight of each data table according to the association relationship between the data tables; A second determining module is used to store each data table in the target service system in descending order of weight, and determine an identifier of each data table in the target service system; A generating module, configured to generate an association relationship between the data tables in the target service system according to an identifier of each data table in the target service system; The second determining module is used to: determine the storage location of each of the data tables in the target service system; The generating module is used to generate call pointers between the data tables in the target service system according to the storage location of each data table in the target service system.

6. The device according to claim 5, characterized in that The first determining module is configured to: In response to the first data table referencing the second data table, the weight of the second data table is increased.

7. A computer device, characterized in that: including processor and memory; The processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement the method for generating a service system according to any one of claims 1 to 4.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for generating a service system as claimed in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Data migration method and device, server and storage medium

    CN108509556A