Data processing method and device based on organization tree, equipment and medium

By using the candidate table-level knowledge graph to determine the organization tree and data table corresponding to the business request data under the organization tree structure, and processing it based on the functional data in the business request data, the problem of omission of data updates is solved, and the comprehensiveness and accuracy of data updates are improved.

CN119884279AActive Publication Date: 2025-04-25HANGZHOU NEWGRAND TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510353708.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-04-25
Estimated Expiration
2045-03-25

AI Technical Summary

Technical Problem

Under the organization tree structure, omissions are prone to occur when data is updated, resulting in large workloads in data migration and incomplete updates.

Method used

By obtaining business request data and determining the current master table identification and slave table identification based on the preset candidate table-level knowledge graph, the corresponding organization tree and data table are then determined. According to the functional data in the business request data, the data nodes in the organization tree and the updated data in the data table are processed to obtain the updated organization tree and data table.

Benefits of technology

It effectively avoids the omission of data updates and improves the comprehensiveness and accuracy of data updates based on organization trees.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884279A_ABST
    Figure CN119884279A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method and device based on an organization tree, equipment and a medium. The method comprises the following steps: acquiring service request data, and determining a current master table identifier and a current slave table identifier based on the service request data and a preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to a target main table identifier determined by the target interface request data and a candidate data table; determining a current main organization tree corresponding to the current main table identifier, and determining a current slave data table corresponding to the current slave table identifier; respectively processing a current master data node in the current master organization tree and current slave update data in the current slave data table according to current function data in the service request data to obtain the correspondingly updated current master organization tree and current slave data table; wherein the current function data comprises at least one of the current merged data and the current transferred data. And the comprehensiveness of data updating based on the organization tree is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular, to a data processing method, device, equipment and medium based on an organization tree. Background Art

[0002] As society develops and changes, some organizations need to adjust their internal structures to adapt to development. The organization tree will be merged, split, deleted, added, and other operations will be performed. Since business data will be associated with various business functions, the historical data of the business system will be changed, resulting in a large workload for data migration and omissions in data updates. Therefore, it is crucial to improve the comprehensiveness of data updates based on the organization tree. Summary of the invention

[0003] The present invention provides a data processing method, device, equipment and medium based on an organization tree to improve the comprehensiveness of data updating based on the organization tree.

[0004] According to one aspect of the present invention, there is provided a data processing method based on an organization tree, comprising:

[0005] Obtaining business request data, and determining a current master table identifier and a current slave table identifier based on the business request data and a preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to candidate interface request data, candidate bytecode files, and candidate data tables;

[0006] Determine the current master organization tree corresponding to the current master table identifier, and determine the current slave data table corresponding to the current slave table identifier;

[0007] According to the current functional data in the business request data, the current master data node in the current master organization tree and the current slave update data in the current slave data table are processed respectively to obtain the corresponding updated current master organization tree and current slave data table; wherein the current functional data includes at least one of the current merged data and the current transfer data.

[0008] According to another aspect of the present invention, there is provided a data processing device based on an organization tree, comprising:

[0009] A current table identification determination module is used to obtain business request data, and determine the current main table identification and the current sub-table identification based on the business request data and a preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to the candidate interface request data, the candidate bytecode file and the candidate data table;

[0010] A main organization tree determination module, used to determine the current main organization tree corresponding to the current main table identifier, and determine the current slave data table corresponding to the current slave table identifier;

[0011] A data processing module is used to process the current master data node in the current master organization tree and the current slave update data in the current slave data table according to the current functional data in the business request data, so as to obtain the corresponding updated current master organization tree and current slave data table; wherein the current functional data includes at least one of the current merged data and the current transferred data.

[0012] According to another aspect of the present invention, there is provided an electronic device, comprising:

[0013] one or more processors;

[0014] A memory for storing one or more programs;

[0015] When one or more programs are executed by one or more processors, the one or more processors can execute any one of the organization tree-based data processing methods provided by the embodiments of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement any one of the organization tree-based data processing methods provided in the embodiments of the present invention when executed.

[0017] The embodiment of the present invention provides a data processing scheme based on an organization tree, which obtains business request data and determines the current master table identifier and the current slave table identifier based on the business request data and a preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to the target master table identifier and the candidate data table determined by the target interface request data; determines the current master organization tree corresponding to the current master table identifier, and determines the current slave data table corresponding to the current slave table identifier; according to the current functional data in the business request data, respectively processes the current master data node in the current master organization tree and the current slave update data in the current slave data table to obtain the corresponding updated current master organization tree and the current slave data table; wherein the current functional data includes at least one of the current merged data and the current transferred data. The above scheme, through the predetermined candidate table-level knowledge graph, determines the current master organization tree and the current slave data table corresponding to the business request data according to the candidate table-level knowledge graph, and implements data update according to the current master organization tree and the current slave data table, thereby avoiding the omission of updated data and improving the comprehensiveness of data update based on the organization tree.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a flow chart of a data processing method based on an organization tree provided in Embodiment 1 of the present invention;

[0021] Figure 2 is a flow chart of a data processing method based on an organization tree provided in Embodiment 2 of the present invention;

[0022] Figure 3 It is a structural schematic diagram of a data processing device based on an organization tree provided in a fourth embodiment of the present invention;

[0023] Figure 4 It is a structural diagram of an electronic device for implementing a data processing method based on an organization tree provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0025] Embodiment 1

[0026] Figure 1 It is a flowchart of an organization tree-based data processing method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation where a main organization tree and associated business data are updated. The method can be executed by an organization tree-based data processing device, which can be implemented in software and / or hardware and can be configured in an electronic device that carries the organization tree-based data processing function.

[0027] See also Figure 1 The data processing method based on the organization tree shown includes:

[0028] S110, obtaining business request data, and determining a current master table identifier and a current slave table identifier based on the business request data and a preset candidate table-level knowledge graph.

[0029] Among them, the business request data can be used to indicate the update of data in the database. The candidate table-level knowledge graph can be used to record the association relationship between the master table and the slave table in the database. Exemplarily, the candidate table-level knowledge graph includes the target master table identifier-target association field identifier-target slave table identifier.

[0030] Exemplarily, the candidate table-level knowledge graph is determined based on the candidate interface request data, the candidate bytecode file and the candidate data table. Among them, the candidate interface request data can be used to indicate the interface for calling the target application system. The target application system refers to the application system that obtains the candidate interface request data. The candidate data table refers to the data table pre-stored in the database. The candidate bytecode file refers to the program running file in the backend service.

[0031] The current master table identifier can be used to uniquely represent the identity of the master table corresponding to the service request data. The current slave table identifier can be used to uniquely represent the identity of the slave table corresponding to the service request data.

[0032] In an optional embodiment, the current main table identifier and the current sub-table identifier are determined based on the business request data and a preset candidate table-level knowledge graph, including: determining the current interface identifier corresponding to the business request data, and determining the current table-level knowledge graph from the candidate table-level knowledge graph based on the current interface identifier; determining the current main table identifier and the current sub-table identifier based on the current table-level knowledge graph.

[0033] Among them, the current interface identifier refers to the identity identifier of the interface that receives the business request data, that is, the current interface identifier can be used to uniquely represent the identity of the interface that receives the business request data. The current table-level knowledge graph refers to the candidate table-level knowledge graph corresponding to the current interface identifier. It should be noted that different interfaces have unique corresponding candidate table-level knowledge graphs.

[0034] Specifically, the main table identifier recorded in the current table-level knowledge graph is used as the current main table identifier, and the sub-table identifier recorded in the current table-level knowledge graph is used as the current sub-table identifier.

[0035] It can be understood that by determining the current table-level knowledge graph based on the current interface identifier corresponding to the business request data, and then determining the current main table identifier and the current slave table identifier based on the current table-level knowledge graph, the accuracy of the determined current main table identifier and the current slave table identifier is improved.

[0036] S120: Determine the current master organization tree corresponding to the current master table identifier, and determine the current slave data table corresponding to the current slave table identifier.

[0037] The current main organization tree refers to the data table corresponding to the current main table identifier. In the embodiment of the present invention, the data of the main table is stored in the form of an organization tree, so the main table corresponding to the current main table identifier can be the current main organization tree.

[0038] The current slave data table refers to the data table corresponding to the current slave table identifier. The current slave data table can be understood as an additional table or a foreign key table of the current main organization tree.

[0039] Specifically, the current main organization tree corresponding to the current main table identifier and the current slave data table corresponding to the current slave table identifier are determined respectively.

[0040] S130. According to the current function data in the business request data, the current master data node in the current master organization tree and the current slave update data in the current slave data table are processed respectively to obtain the corresponding updated current master organization tree and current slave data table.

[0041] The current functional data refers to functional data used to indicate a specific update operation on data. Exemplarily, the current functional data includes at least one of current merged data, current transferred data, and current split data.

[0042] The current merged data may be used to indicate a merge operation on the data. Exemplarily, the current merged data may be node deletion or node creation. Node deletion refers to deleting the current master data node in the current master organization tree. Node creation refers to deleting at least two current master data nodes in the current master organization data and creating a new node.

[0043] Among them, the current transfer data can be used to indicate the data transfer operation. Exemplarily, the current transfer data can be a collective transfer or an unbinding transfer. Collective transfer refers to the transfer of the current master data nodes in the current master organization tree together. Unbinding transfer refers to the partial transfer of the current master data nodes in the current master organization tree.

[0044] The current split data may be used to indicate a split operation to be performed on the data.

[0045] The current master data node refers to the data node that needs to be processed in the current master organization tree. The current slave update data refers to the data that needs to be processed in the current slave data table.

[0046] In an optional embodiment, according to the current functional data in the business request data, the current master data node in the current master organization tree and the current slave data node in the current slave data table are processed respectively to obtain the corresponding updated current master organization tree and current slave data table, including: determining and processing the current master data node in the current master organization tree according to the current functional data, and updating the reference master data node associated with the current master data node to obtain the updated current master organization tree; determining the current associated field according to the current master data node and the reference master data node, and determining the current slave update data in the current slave data table according to the current associated field; processing the current slave update data according to the current functional data to obtain the updated current slave data table.

[0047] The reference master data node refers to the candidate master data node associated with the current master data node in the current master organization tree. The candidate master data node refers to the data node in the current master organization tree. The current associated field refers to the field to be updated in the current master organization tree.

[0048] It can be understood that by introducing the reference master data node and updating the reference master data node and the current master data node in the current master organization tree, the accuracy of the updated current master organization tree is improved and update confusion is avoided; at the same time, in the embodiment of the present invention, by determining the current associated field based on the current master data node and the reference master data node, and then determining the current slave update data based on the current associated field, the accuracy and comprehensiveness of the determined current slave update data are improved, thereby improving the accuracy of the updated current slave data table.

[0049] The embodiment of the present invention provides a data processing scheme based on an organization tree, which obtains business request data and determines the current master table identifier and the current slave table identifier based on the business request data and a preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to the target master table identifier and the candidate data table determined by the target interface request data; determines the current master organization tree corresponding to the current master table identifier, and determines the current slave data table corresponding to the current slave table identifier; according to the current functional data in the business request data, respectively processes the current master data node in the current master organization tree and the current slave update data in the current slave data table to obtain the corresponding updated current master organization tree and the current slave data table; wherein the current functional data includes at least one of the current merged data and the current transferred data. The above scheme, through the predetermined candidate table-level knowledge graph, determines the current master organization tree and the current slave data table corresponding to the business request data according to the candidate table-level knowledge graph, and implements data update according to the current master organization tree and the current slave data table, thereby avoiding the omission of updated data and improving the comprehensiveness of data update based on the organization tree.

[0050] Embodiment 2

[0051] Figure 2 It is a flowchart of a data processing method based on an organization tree provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment further adds the operation of "obtaining candidate interface request data, and determining whether the candidate interface request data is the target interface request data based on the preset interface request judgment data; wherein the interface request judgment data includes tree structure key data and interface function data; if so, determining the target main table identifier according to the tree structure key data, candidate bytecode files and preset standard types in the target interface request data, and determining the target main table from the candidate data table according to the target main table identifier, and determining whether there is a target sub-table in the target main table; if not, determining the target associated field identifier according to the target main table identifier and other candidate data tables, and determining the corresponding target sub-table from other candidate data tables according to the target associated field identifier; generating a candidate table-level knowledge graph including the target main table identifier, the target associated field identifier and the target sub-table identifier" to improve the determination mechanism of the candidate table-level knowledge graph. It should be noted that for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions of other embodiments.

[0052] See also Figure 2 The data processing method based on the organization tree shown includes:

[0053] S210: Acquire candidate interface request data, and determine whether the candidate interface request data is target interface request data based on preset interface request judgment data.

[0054] Among them, the candidate interface request data refers to the request data used to indicate the call interface. The interface request judgment data can be used to determine whether the candidate interface request data can determine the corresponding candidate table-level knowledge graph. Exemplarily, the interface request judgment data includes tree structure key data and interface function data.

[0055] The tree structure key data may be used to determine whether there is a tree structure in the candidate interface request data. Exemplarily, the tree structure key data may include code, parentId, and children array.

[0056] Among them, the interface function data can be used to determine whether the interface corresponding to the candidate interface request data has the target function. Exemplarily, the interface function data may include a merge function, a split function, and a transfer function. The target interface request data refers to the candidate interface request data that can be used to construct the candidate table-level knowledge graph.

[0057] Exemplarily, based on preset interface request judgment data, determining whether the candidate interface request data is the target interface request data includes: determining whether there is a tree structure in the candidate interface request data based on preset tree structure key data; if so, determining whether the interface corresponding to the candidate interface request data has a target function request (including merge request, split request and transfer request) based on preset interface function data; if so, determining that the candidate interface request data is the target interface request data.

[0058] Exemplarily, determining whether a tree structure exists in the candidate interface request data based on preset tree structure key data includes: determining whether a tree structure key data exists in the candidate interface request data, that is, whether code, parentId and children arrays exist in the candidate interface request data; if so, determining that a tree structure exists in the candidate interface request data; if not, indicating that a tree structure does not exist in the candidate interface request data.

[0059] Optionally, determining whether the interface corresponding to the candidate interface request data has a target function request based on preset interface function data includes: judging whether the js file under the interface corresponding to the candidate interface request data includes an interface request of the interface function data; if so, determining that the interface corresponding to the candidate interface request data has the target function request; if not, determining that the interface corresponding to the candidate interface request data does not have the target function request.

[0060] Optionally, based on preset interface function data, determine whether the interface corresponding to the candidate interface request data has the target function request, including: calling the data stack through the candidate interface request data, locating the current calling page (i.e., the front-end page), and judging whether operation buttons such as merge, split, and transfer appear in the current calling page; if so, determine that the interface corresponding to the candidate interface request data has the target function request; if not, determine that the interface corresponding to the candidate interface request data does not have the target function request.

[0061] Specifically, the candidate interface request data is obtained through the page interface request interceptor, and whether the candidate interface request data is the target interface request data is determined according to the tree structure key data and the interface function data. The page interface request interceptor can be used to obtain the candidate interface request data.

[0062] S220. If yes, determine the target master table identifier according to the tree structure key data, candidate bytecode files and preset standard types in the target interface request data, and determine the target master table from the candidate data table according to the target master table identifier, and determine whether there is a target slave table in the target master table.

[0063] Among them, the candidate bytecode file refers to the program running file in the backend service. The preset standard type refers to the type of the preset class. Exemplarily, the preset standard type may include entity class and DO class. The target master table identifier can be used to characterize the identity of the master table corresponding to the target interface request data. The target master table refers to the candidate data table corresponding to the target master table identifier. The target master table can also be called the target master organization tree, and the target master table stores data in the form of an organization tree. The target slave table refers to an additional table of the target master table.

[0064] In an optional embodiment, a target master table identifier is determined based on tree structure key data, candidate bytecode files and preset standard types, including: determining a matching reference bytecode file from the candidate bytecode file, and determining a reference type of a reference class to which the tree structure key data in the reference bytecode file belongs; determining whether the reference type is a target type based on the preset standard type, and if so, determining a corresponding target master table identifier based on the target type.

[0065] The reference bytecode file refers to a candidate bytecode file including the tree structure key data. The reference class refers to the class to which the tree structure key data in the reference bytecode file belongs. The reference type refers to the type of the reference class to which the tree structure key data in the reference bytecode file belongs. The target type refers to the reference type that is the same as the preset standard type.

[0066] It should be noted that if the number of target master table identifiers determined based on the target type is at least two, the actual target type corresponding to the target interface request data can be determined from at least two target types based on the interface address in the target interface request data. The advantage is that the accuracy and uniqueness of the target master table identifier determined based on the target type are improved. Among them, the interface address can represent the interface identity corresponding to the target interface request data.

[0067] Specifically, a candidate bytecode file containing tree-structured key data is used as a reference bytecode file; the reference type of the reference class to which the tree-structured key data belongs in the reference bytecode file is determined; the reference type matching the preset standard type is used as the target type; and the target master table identifier corresponding to the target interface request data is determined based on the target type and the class name of the reference class.

[0068] It can be understood that by determining the reference bytecode file from the candidate bytecode files, determining the reference type in the reference bytecode file based on the tree structure key data, determining the target type based on the preset standard type, and finally determining the target master table identifier based on the reference type, the accuracy of the determined target master table identifier is improved.

[0069] Exemplarily, according to the target master table identifier, a matching target master table is determined from the candidate data table of the database, and it is determined whether the target master table has a primary foreign key, that is, whether the target master table has a target slave table.

[0070] S230: If it does not exist, determine the target associated field identifier according to the target master table identifier and other candidate data tables, and determine the corresponding target slave table from other candidate data tables according to the target associated field identifier.

[0071] Among them, other candidate data tables refer to candidate data tables other than the target main table in the database. The target associated field refers to the field associated between the target main table and other candidate data tables. The target associated field identifier can be used to uniquely represent the identity of the target associated field.

[0072] In an optional embodiment, a target associated field identifier is determined based on a target main table identifier of a target main table and other candidate data tables, including: performing word segmentation on the target main table identifier of the target main table to obtain a main table sub-identifier, and obtaining a candidate associated field identifier based on preset identifier data and the main table sub-identifier; and determining the target associated field identifier based on the candidate associated field identifier and other candidate data tables.

[0073] Among them, the main table sub-identifier refers to the partial target main table identifier obtained after the target main table identifier is segmented. The preset identification data refers to the data combined with the main table sub-identifier to determine the candidate associated field identifier. The embodiment of the present invention does not specifically limit the setting of the preset identification data, which can be set by the technician based on experience. Exemplarily, the preset identification data can be Id or code. The candidate associated field refers to the field that may be associated with the target main table and other candidate data tables. The candidate associated field identifier can be used to uniquely characterize the identity of the candidate associated field.

[0074] Exemplarily, the target main table sub-identifier + Id or code obtained by segmenting the target main table identifier is used to obtain the candidate associated field identifier; the target associated field identifier is determined based on the candidate associated field identifier and the candidate field identifiers in other candidate data tables.

[0075] Specifically, for any candidate association field identifier, determine whether there is at least one candidate association field identifier that is the same as the candidate association field identifier in other candidate data tables; if so, determine that the candidate association field identifier is the target association field identifier; if not, prohibit the candidate association field identifier from being used as the target association field identifier.

[0076] It can be understood that by determining the candidate associated field identifiers based on the main table sub-identifiers and preset identifier data obtained after word segmentation according to the target main table identifier, and then determining the target associated field identifier from the candidate associated field identifiers, the accuracy of the determined target associated field identifier is improved.

[0077] Specifically, other candidate data tables where the target associated field identifier is located are used as target slave tables corresponding to the target master table.

[0078] S240. Generate a candidate table-level knowledge graph including a target master table identifier, a target associated field identifier, and a target slave table identifier.

[0079] S250: Obtain business request data, and determine the current master table identifier and the current slave table identifier based on the business request data and a preset candidate table-level knowledge graph.

[0080] Among them, the candidate table-level knowledge graph is determined according to the target main table identifier and the candidate data table determined by the target interface request data.

[0081] S260: Determine the current master organization tree corresponding to the current master table identifier, and determine the current slave data table corresponding to the current slave table identifier.

[0082] S270. According to the current function data in the business request data, the current master data node in the current master organization tree and the current slave update data in the current slave data table are processed respectively to obtain the corresponding updated current master organization tree and current slave data table.

[0083] An embodiment of the present invention provides a data processing scheme based on an organization tree, which obtains candidate interface request data by adding and determining whether the candidate interface request data is the target interface request data based on preset interface request judgment data; wherein the interface request judgment data includes tree structure key data and interface function data; if so, the target main table identifier is determined according to the tree structure key data, candidate bytecode files and preset standard types in the target interface request data, and the target main table is determined from the candidate data table according to the target main table identifier, and it is determined whether the target main table has a target sub-table; if not, the target associated field identifier is determined according to the target main table identifier and other candidate data tables, and the corresponding target sub-table is determined from other candidate data tables according to the target associated field identifier; a candidate table-level knowledge graph operation including the target main table identifier, the target associated field identifier and the target sub-table identifier is generated, thereby improving the determination mechanism of the candidate table-level knowledge graph. The above scheme determines the target main table identifier through tree structure key data, candidate bytecode files and preset standard types, and then determines whether there is a target sub-table in the target main table corresponding to the target main table identifier. If not, the target sub-table is determined through the determined target associated field identifier, and a candidate table-level knowledge graph including the target main table identifier, the target associated field identifier and the target sub-table identifier is generated, thereby avoiding the omission of the target sub-table and improving the accuracy and comprehensiveness of the determined candidate table-level knowledge graph.

[0084] Based on the above technical solution, the method also includes: determining the application type of the target application system corresponding to the target interface request data; if the application type is a cluster application, adding the target main table identifier and the target associated field identifier as request additional values ​​to the request return value corresponding to the target interface request; detecting whether there is a request additional value through the service gateway, and if so, sending the request additional value to other application systems associated with the target application system, so that other application systems generate corresponding candidate table-level knowledge graphs based on the request additional values.

[0085] The target application system refers to the application system that obtains the candidate interface request data. The application type refers to the type of the target application system. Exemplarily, the application type may include cluster applications and single applications. A cluster application refers to a set of applications with multiple associated application nodes. A single application refers to an application without associated application nodes.

[0086] The request additional value can be used to supplement the request return value. The request return value refers to the return value corresponding to the target interface request. The service gateway can be used to obtain and detect the request return value. Other application systems refer to application systems other than the target application system in the application cluster.

[0087] The embodiment of the present invention does not specifically limit the method for determining the application type of the target application system corresponding to the target interface request data, which can be set by the technical personnel according to experience or needs. Exemplarily, detect whether the main startup application class of the backend service has the @EnableDiscoveryClient annotation. If it exists, it is a cluster application; if not, it is a single application. Alternatively, by obtaining the current spring container context, obtain the class object marked with @SpringBootApplication through the container context, and obtain all class annotations of the class, and analyze whether there are common annotations of cluster applications such as nacos, feign, and eraka based on the class annotations. If included, the current application is defined as a cluster application. If not, it is a single application.

[0088] It can be understood that if the target application system is determined to be a cluster application, the request additional value can be added to the request return value, and the service gateway can be used to detect whether the request additional value exists in the request return value. If so, the request additional value can be sent to other application systems in the cluster application. Other application systems can generate corresponding candidate table-level knowledge graphs based on the request additional value, thereby improving the efficiency of generating candidate table-level knowledge graphs.

[0089] Embodiment 3

[0090] The embodiment of the present invention provides an optional example based on the above embodiment. It should be noted that for the part not described in detail in the embodiment of the present invention, reference can be made to the description of other embodiments.

[0091] Exemplarily, when the user enters the application system of the business, a page interface request interceptor is added, and the candidate interface request data is automatically identified to determine whether there is a tree structure (that is, determine whether there is code, parentId, and children array in the candidate interface request data. If so, it is a tree structure). If a tree structure is detected, the page behavior understanding needs to be started to determine whether the js file under the candidate request interface (that is, the interface corresponding to the candidate interface request data) contains interface requests for operations such as merging, splitting, deleting, and adding. Alternatively, the current calling page (that is, the front-end page) is located by calling the data stack. In the current calling page, whether there are operation buttons such as merging, splitting, deleting, and adding. If satisfied, the business data modeling analysis is automatically started, and the interfaces for action requests such as merging, splitting, and transferring are extracted and passed to the back-end service, that is, the key data of the tree structure and the interface address in the target interface request data are sent to the back-end.

[0092] Exemplarily, by building a modeling and analysis service on the backend service, when the modeling conditions are met, the tree structure field definition (i.e., tree structure key data) detected by the front-end page construction is passed into the modeling and analysis service. After receiving the tree structure key data, the modeling and analysis service starts to obtain all candidate bytecode files in the current working environment (i.e., the application environment of the backend service), and matches the tree structure key data by reading the candidate bytecode files and dedefining the bytecode files. If a match can be made and the reference type of the class is an entity, DO or other class file (i.e., if a match can be made and the class corresponding to the matched reference bytecode file is an entity or DO), the target master table identifier corresponding to the reference class is extracted, and the current database connection information is used to determine whether the target master table exists. In the case of primary and foreign keys, if they exist, the field name of the foreign key is determined. If there is no primary and foreign key, it means that the target primary table is a weak reference. For weak references, it is necessary to read all the table name metadata of the database and detect each table field to determine the name of the weak reference field. The main detection rule is table name segmentation + Id or code. Once the weak reference field name is determined, the field name (that is, the target associated field identifier) ​​and the tree structure table name (that is, the target primary table identifier) ​​are constructed into a key-value and put into the global configuration variable with the tree structure identifier key. If there are multiple tree structures, the value of the tree structure identifier key will have multiple records. After the addition is completed, the current backend service environment is detected to determine whether the current environment is a single application or a cluster application.

[0093] Exemplarily, for cluster applications, after the application type is determined, the field name and tree-structured table name are attached as the return value of each http (HyperText Transfer Protocol) request (that is, the request attached value is added to the request return value), and detection is performed at the service gateway. If the return value is attached (that is, the request attached value is detected), the relationship propagation of the tree field is started. In the gateway service, all service lists are obtained, and the user's http request is simulated to propagate the field name and tree-structured table name to each microservice. When each microservice detects the existence of tree field relationship propagation in the request, the generation of the tree field business graph (that is, the candidate table-level knowledge graph) is automatically started; if it is a single application, after the application identification is completed, the generation of the candidate table-level knowledge graph is automatically triggered.

[0094] Specifically, by obtaining the database connection pool of the current spring container, obtaining the database connection, and obtaining all the database table fields, and matching according to the target associated field identifier, if it can be matched, establish a relationship graph in the current service (that is, determine the candidate table-level knowledge graph), tree structure table name (that is, target master table identifier) ​​- target associated field identifier - business table name (that is, target slave table identifier), when the service detection is completed, put the established relationship graph into the global variable of the current spring container. If it is a cluster application, it will return to the gateway for registration and start the tree operation monitoring at the same time.

[0095] Exemplarily, when operations such as merging, splitting and transferring are monitored, the operations of the tree structure are automatically propagated, and after each backend service monitors the operations of the tree structure, the management action of the business data is started.

[0096] Specifically, for the merge operation, first intercept the operation of two tree nodes in the tree management, and analyze the changes of the two tree nodes after the merge operation, whether to delete a node or create a new tree node. After determining the operation intention of the tree node, perform data operations on the business service relationship map according to the business intention. If a node is deleted, update the data of the associated fields of the business data associated with the deleted node, and record the update log; if the operation is to delete two nodes and create a new node, the business IDs of the two business tables need to be updated.

[0097] Specifically, for the splitting operation, it is impossible to determine the intention of data splitting through automation. All requests need to be monitored. If there is data involving splitting tree nodes, the operation is automatically intercepted and the user is prompted to split the business data accordingly to complete the splitting of the business data.

[0098] Specifically, the transfer operation mainly involves the transfer of different levels and cross-levels of the tree nodes. For the transfer operation, the transfer action needs to be intercepted to determine whether the action on the related business data is to be transferred together or to unbind the nodes. If it is transferred together, the business data will not be processed; if it is unbinding, the parent node of the currently transferred node needs to be obtained, and the parent node of the current business data needs to be changed.

[0099] Embodiment 4

[0100] Figure 3 It is a structural diagram of a data processing device based on an organization tree provided in Embodiment 4 of the present invention. This embodiment can be applicable to the situation where a main organization tree and associated business data are updated. The method can be executed by a data processing device based on an organization tree. The device can be implemented in software and / or hardware and can be configured in an electronic device that carries a data processing function based on an organization tree.

[0101] like Figure 3 As shown, the device includes: a current table identification determination module 310, a main organization tree determination module 320 and a data processing module 330. Among them,

[0102] The current table identifier determination module 310 is used to obtain the business request data, and determine the current master table identifier and the current slave table identifier based on the business request data and the preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to the target master table identifier and the candidate data table determined by the target interface request data;

[0103] The main organization tree determination module 320 is used to determine the current main organization tree corresponding to the current main table identifier, and determine the current slave data table corresponding to the current slave table identifier;

[0104] The data processing module 330 is used to process the current master data node in the current master organization tree and the current slave update data in the current slave data table according to the current functional data in the business request data, so as to obtain the corresponding updated current master organization tree and current slave data table; wherein the current functional data includes at least one of the current merged data and the current transfer data.

[0105] The embodiment of the present invention provides a data processing scheme based on an organization tree, which obtains business request data and determines the current master table identifier and the current slave table identifier based on the business request data and a preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to the target master table identifier and the candidate data table determined by the target interface request data; determines the current master organization tree corresponding to the current master table identifier, and determines the current slave data table corresponding to the current slave table identifier; according to the current functional data in the business request data, respectively processes the current master data node in the current master organization tree and the current slave update data in the current slave data table to obtain the corresponding updated current master organization tree and the current slave data table; wherein the current functional data includes at least one of the current merged data and the current transferred data. The above scheme, through the predetermined candidate table-level knowledge graph, determines the current master organization tree and the current slave data table corresponding to the business request data according to the candidate table-level knowledge graph, and implements data update according to the current master organization tree and the current slave data table, thereby avoiding the omission of updated data and improving the comprehensiveness of data update based on the organization tree.

[0106] Optionally, the candidate table-level knowledge graph is determined based on the following means:

[0107] A target request data determination module is used to obtain candidate interface request data and determine whether the candidate interface request data is target interface request data based on preset interface request judgment data; wherein the interface request judgment data includes tree structure key data and interface function data;

[0108] a target slave table judgment module, for determining a target master table identifier according to the tree structure key data, the candidate bytecode files and the preset standard type in the target interface request data, and determining the target master table from the candidate data table according to the target master table identifier, and determining whether the target slave table exists in the target master table;

[0109] A target slave table determination module, for determining a target associated field identifier according to the target master table identifier and other candidate data tables if the target slave table does not exist, and determining a corresponding target slave table from the other candidate data tables according to the target associated field identifier;

[0110] The candidate table-level knowledge graph construction module is used to generate a candidate table-level knowledge graph including the target main table identifier, the target associated field identifier and the target secondary table identifier.

[0111] Optionally, the target judging module from the table is specifically used to:

[0112] Determine a matching reference bytecode file from the candidate bytecode file, and determine a reference type of a reference class to which the tree structure key data in the reference bytecode file belongs;

[0113] According to the preset standard type, determine whether the reference type is a target type, and if so, determine the corresponding target master table identifier according to the target type.

[0114] Optionally, the target table determination module is specifically used to:

[0115] Segmenting the target main table identifier of the target main table to obtain a main table sub-identifier, and obtaining a candidate associated field identifier based on preset identifier data and the main table sub-identifier;

[0116] A target association field identifier is determined according to the candidate association field identifier and other candidate data tables.

[0117] Optionally, the device further comprises:

[0118] An application type determination module, used to determine the application type of the target application system corresponding to the target interface request data;

[0119] A request return value adding module, for adding the target main table identifier and the target associated field identifier as request additional values ​​to the request return value corresponding to the target interface request if the application type is a cluster application;

[0120] The request additional value sending module is used to detect whether the request additional value exists through the service gateway. If so, the request additional value is sent to other application systems associated with the target application system, so that the other application systems generate corresponding candidate table-level knowledge graphs according to the request additional value.

[0121] Optionally, the current table identifier determination module 310 includes:

[0122] A current table-level knowledge graph determining unit, used to determine a current interface identifier corresponding to the business request data, and determine a current table-level knowledge graph from the candidate table-level knowledge graphs according to the current interface identifier;

[0123] The current table identifier determination unit is used to determine the current main table identifier and the current sub-table identifier according to the current table-level knowledge graph.

[0124] Optionally, the data processing module 330 includes:

[0125] A main organization tree updating unit, configured to determine and process a current main data node in the current main organization tree according to the current functional data, and to update a reference main data node associated with the current main data node to obtain an updated current main organization tree;

[0126] a slave update data determining unit, configured to determine a current associated field according to the current master data node and the reference master data node, and determine the current slave update data in the current slave data table according to the current associated field;

[0127] The current slave data table updating unit is used to process the current slave update data according to the current functional data to obtain an updated current slave data table.

[0128] The organization tree-based data processing device provided in the embodiment of the present invention can execute the organization tree-based data processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing each organization tree-based data processing method.

[0129] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of the business request data and candidate interface request data involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0130] Embodiment 5

[0131] Figure 4 It is a structural diagram of an electronic device for implementing a data processing method based on an organization tree provided by Embodiment 5 of the present invention. Electronic device 410 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0132] like Figure 4 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.

[0133] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0134] The processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 executes the various methods and processes described above, such as a data processing method based on an organizational tree.

[0135] In some embodiments, the data processing method based on the organization tree can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the data processing method based on the organization tree described above can be performed. Alternatively, in other embodiments, the processor 411 can be configured to execute the data processing method based on the organization tree by any other appropriate means (for example, by means of firmware).

[0136] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0137] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0138] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0139] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0140] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0141] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0142] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0143] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data processing method based on an organization tree, characterized in that: include: Obtaining business request data, and determining a current master table identifier and a current slave table identifier based on the business request data and a preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to candidate interface request data, candidate bytecode files, and candidate data tables; Determine the current master organization tree corresponding to the current master table identifier, and determine the current slave data table corresponding to the current slave table identifier; According to the current functional data in the business request data, the current master data node in the current master organization tree and the current slave update data in the current slave data table are processed respectively to obtain the corresponding updated current master organization tree and current slave data table; wherein the current functional data includes at least one of the current merged data and the current transfer data.

2. The method according to claim 1, characterized in that The candidate table-level knowledge graph is determined based on the following method: Acquire candidate interface request data, and determine whether the candidate interface request data is target interface request data based on preset interface request judgment data; wherein the interface request judgment data includes tree structure key data and interface function data; If so, determine the target master table identifier according to the tree structure key data, the candidate bytecode files and the preset standard type in the target interface request data, determine the target master table from the candidate data table according to the target master table identifier, and determine whether the target master table has a target slave table; If it does not exist, determine the target associated field identifier according to the target master table identifier and other candidate data tables, and determine the corresponding target slave table from the other candidate data tables according to the target associated field identifier; A candidate table-level knowledge graph is generated, including the target master table identifier, the target associated field identifier, and the target slave table identifier.

3. The method according to claim 2, characterized in that The step of determining the target main table identifier according to the tree structure key data, the candidate bytecode files and the preset standard type includes: Determine a matching reference bytecode file from the candidate bytecode file, and determine a reference type of a reference class to which the tree structure key data in the reference bytecode file belongs; According to the preset standard type, determine whether the reference type is a target type, and if so, determine the corresponding target master table identifier according to the target type.

4. The method according to claim 2, characterized in that: The step of determining the target associated field identifier according to the target master table identifier and other candidate data tables includes: Segmenting the target main table identifier of the target main table to obtain a main table sub-identifier, and obtaining a candidate associated field identifier based on preset identifier data and the main table sub-identifier; A target association field identifier is determined according to the candidate association field identifier and other candidate data tables.

5. The method according to claim 2, characterized in that: The method further comprises: Determine the application type of the target application system corresponding to the target interface request data; If the application type is a cluster application, the target main table identifier and the target associated field identifier are added as request additional values ​​to the request return value corresponding to the target interface request; The service gateway detects whether the request additional value exists. If so, the request additional value is sent to other application systems associated with the target application system, so that the other application systems generate corresponding candidate table-level knowledge graphs according to the request additional value.

6. The method according to claim 1, characterized in that The determining the current master table identifier and the current slave table identifier based on the business request data and the preset candidate table-level knowledge graph includes: Determine a current interface identifier corresponding to the business request data, and determine a current table-level knowledge graph from the candidate table-level knowledge graphs according to the current interface identifier; According to the current table-level knowledge graph, a current master table identifier and a current slave table identifier are determined.

7. The method according to any one of claims 1 to 6, characterized in that The method of processing the current master data node in the current master organization tree and the current slave update data in the current slave data table according to the current function data in the business request data to obtain the corresponding updated current master organization tree and current slave data table includes: Determine and process the current master data node in the current master organization tree according to the current functional data, and update the reference master data node associated with the current master data node to obtain an updated current master organization tree; Determine a current associated field according to the current master data node and the reference master data node, and determine the current slave update data in the current slave data table according to the current associated field; The current slave update data is processed according to the current function data to obtain an updated current slave data table.

8. A data processing device based on an organization tree, characterized in that: include: A current table identification determination module is used to obtain business request data, and determine the current main table identification and the current sub-table identification based on the business request data and a preset candidate table-level knowledge graph; wherein the candidate table-level knowledge graph is determined according to the candidate interface request data, the candidate bytecode file and the candidate data table; A main organization tree determination module, used to determine the current main organization tree corresponding to the current main table identifier, and determine the current slave data table corresponding to the current slave table identifier; A data processing module is used to process the current master data node in the current master organization tree and the current slave update data in the current slave data table according to the current functional data in the business request data, so as to obtain the corresponding updated current master organization tree and current slave data table; wherein the current functional data includes at least one of the current merged data and the current transferred data.

9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a data processing method based on an organization tree as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, an organization tree-based data processing method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data processing method and device

    CN115374105A

  • Data processing method and device, equipment and storage medium

    CN117667976A

  • Task creation method and device, equipment and storage medium

    CN118485414A

  • Air purifier with water drop filtering function and sterilization function

    KR1020240114947A