Structured data analysis system and structured data analysis method
Through the tree structure data processing and missing judgment of the structured data analysis system, the problem of data missing in the enterprise system when executing new business is solved, the correctness of automatic completion and API calling is realized, and the business execution efficiency is improved.
Patent Information
- Application Number
- CN202310148413.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-08-23
Smart Images

Figure CN118535554A
Abstract
Description
Technical Field
[0001] The present invention relates to an analysis system, and in particular to a structured data analysis system and a structured data analysis method. Background Art
[0002] Generally speaking, enterprise systems can use system data to execute various services through application programming interface (API) calls. In some cases, when an enterprise system executes a new service, the current system data lacks the elements required to execute the new service. At this time, the enterprise system needs to update the system data before it can continue to make API calls based on the updated system data. In other cases, when certain fields are missing in the system data such as calls or requests corresponding to the new service, the enterprise system cannot be aware of the aforementioned missing conditions, resulting in errors when the enterprise system executes API calls. Summary of the invention
[0003] The present invention is directed to a structured data analysis system, which is capable of analyzing and processing missing fields in input data, so that a server can correctly perform corresponding operations according to the completed input data.
[0004] According to an embodiment of the present invention, the structured data analysis system of the present invention includes a memory and a processor. The memory is used to store original field data. The processor is coupled to the memory and the server. The processor is used to obtain input data from an electronic device, and to convert the input data into tree structure data to form a plurality of nodes. The plurality of nodes correspond to a plurality of sets in the input data, respectively. The processor is also used to select a first node and a second node from the plurality of nodes. The first node and the second node correspond to a first set and a second set in the plurality of sets, respectively. The processor is also used to determine whether the first node is missing based on a first number of the first set and a second number of elements included in the second set to generate a missing judgment result. The processor is also used to determine, based on the missing judgment result, whether the processor generates output data to the server based on the original field data, so that the server operates according to the output data.
[0005] According to an embodiment of the present invention, the structured data analysis method of the present invention includes the following steps. Input data from an electronic device is acquired by a processor of a server. The input data is converted into tree structure data to form a plurality of nodes by the processor. The plurality of nodes respectively correspond to a plurality of sets in the input data. A first node and a second node from the plurality of nodes are selected by the processor. The first node and the second node respectively correspond to a first set and a second set in the plurality of sets. The processor determines whether the first node is missing based on a first number of elements in the first set and a second number of elements in the second set to generate a missing judgment result. The processor determines whether the processor generates output data to the server based on the original field data based on the missing judgment result, so that the server operates according to the output data.
[0006] Based on the above, the structured data analysis system and structured data analysis method of the present invention can convert input data into tree structured data, and can analyze multiple nodes in the tree structured data to determine the missing judgment result of the node. Accordingly, the structured data analysis system can automatically analyze the missing fields in the input data, and can complete them based on the original field data to generate output data, so that the server can correctly perform corresponding operations according to the output data.
[0007] In order to make the above features and advantages of the present invention more clearly understood, embodiments are given below with reference to the accompanying drawings for detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a circuit block diagram of a structured data analysis system according to an embodiment of the present invention;
[0009] Figure 2 is a flow chart of a structured data analysis method according to an embodiment of the present invention;
[0010] Figure 3 is a flow chart of a structured data analysis method according to an embodiment of the present invention;
[0011] Figure 4 is a circuit block diagram of a structured data analysis system according to another embodiment of the present invention;
[0012] FIG. 5A to FIG. 5B is a flow chart of a structured data analysis method according to another embodiment of the present invention;
[0013] FIG. 6A to FIG. 6C The present invention Figure 4 A schematic diagram of input data of an embodiment;
[0014] Figure 7 The present invention Figure 4 A schematic diagram of tree-structured data of an embodiment.
[0015] Description of Reference Numerals
[0016] 100, 400: structured data analysis system;
[0017] 110: processor;
[0018] 120: memory;
[0019] 200: electronic devices;
[0020] 310: server;
[0021] 311: link execution module;
[0022] 320: Field completion analysis system;
[0023] 430: adapter module;
[0024] 431~434: adapter;
[0025] 440: tree structure processing module;
[0026] 441: tree structure generation unit;
[0027] 442: tree node analysis unit;
[0028] 450: Data sufficiency analysis module;
[0029] 451: Missing node computation unit;
[0030] 610-670, 631-636: boxes;
[0031] D1: tree structure data;
[0032] D2: Analyze data;
[0033] D3: missing judgment result;
[0034] D4: missing set;
[0035] D4': original field data;
[0036] D5: Link execution result;
[0037] DIN, DIN': input data;
[0038] DOUT: output data;
[0039] N1~N8: nodes;
[0040] S210~S240, S310~350, S510~570, S541~547: steps. DETAILED DESCRIPTION
[0041] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.
[0042] Figure 1 FIG. 1 is a circuit block diagram of a structured data analysis system according to an embodiment of the present invention. Figure 1 , the structured data analysis system 100 is coupled to the electronic device 200, the server 310 and the field completion analysis system 320. In the present embodiment, the electronic device 200 executes the enterprise system to execute various businesses through the enterprise system. The enterprise system may be, for example, an enterprise resource planning (ERP) system. The electronic device 200 may operate in coordination with the structured data analysis system 100. For example, the electronic device 200 accesses one or more other systems (such as the server 310) through the structured data analysis system 100 using an application programming interface (API) call to initiate the execution of the target business. In the present embodiment, the electronic device 200 may be, for example, a mobile phone, a tablet computer, a laptop computer, and a desktop computer.
[0043] In this embodiment, the server 310 performs corresponding operations according to the received data (eg, the output data DOUT) to implement the target service requested by the electronic device 200 and the structured data analysis system 100 .
[0044] In this embodiment, the structured data analysis system 100 may include a processor 110 and a memory 120. In this embodiment, the memory 120 may store the original field data D4' from the field completion analysis system 320, as well as the various adapters, modules and related algorithms mentioned in various embodiments of the present invention, and may also store the computing software and other related algorithms, programs and data for implementing the conversion function of the structured data of the present invention. The memory may be, for example, a dynamic random access memory (DRAM), a flash memory or a non-volatile random access memory (NVRAM), but the present invention is not limited thereto.
[0045] In this embodiment, the processor 110 accesses data in the memory 120, each adapter and each module, data transmitted between the electronic device 200 (e.g., input data DIN), data transmitted between the field completion analysis system 320 (e.g., missing set D4 and original field data D4'), and data transmitted between the server 310 (e.g., output data DOUT). The processor may be, for example, a signal converter, a field programmable gate array (FPGA), a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessor (Microprocessor), a digital signal processor (DSP), a programmable controller, an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other similar devices or a combination of these devices, which can load and execute computer program related firmware or software to achieve functions such as calculation, data structuring, analysis and execution.
[0046] In this embodiment, the field completion analysis system 320 stores original field data D4', such as a plurality of fields related to the computer program and field completion methods. In this embodiment, the field completion analysis system 320 may be, for example, a database.
[0047] For reference Figure 2 , Figure 2 2 is a flow chart of a structured data analysis method according to an embodiment of the present invention. The structured data analysis system 100 may execute steps S210 to S240. The order of these steps S210 to S250 is only an example and is not limited thereto.
[0048] In step S210, the processor 110 obtains input data DIN from the electronic device 200 to determine the target API required to perform the API call. The input data DIN can be used as a data source of the structured data analysis system 100 to indicate a call request corresponding to the target API. The call request can be, for example, a function described in a certain data format and specification.
[0049] In step S220, the processor 110 analyzes the missing field situation according to the input parameters of the input data DIN to generate a missing judgment result. The input parameters of the input data DIN can be, for example, set data represented by nodes, and will be further described in subsequent embodiments. The missing field situation indicates whether a field is missing in the input data DIN, and is represented by a missing judgment result.
[0050] In step S230, the processor 110 generates a missing set D4 based on the missing judgment result, and the processor 110 accesses the field completion analysis system 320 according to the missing set D4 to obtain the original field data D4' from the field completion analysis system 320. The missing set D4 may include the set data that is judged to be missing. The original field data D4' may include one or more fields that are omitted or missing in the aforementioned set data, and a completion method for completing the missing fields.
[0051] In step S240, the processor 110 generates output data DOUT according to the original field data D4' and the target API to initiate the execution of the API call. The output data DOUT may include the input data DIN and the supplemented data of the missing fields, so that the server 310 performs the API call based on the target API according to the supplemented input data DIN (i.e., the output data DOUT). Therefore, the structured data analysis system 100 can respond to various input data DIN to call the target API by adaptively supplementing the missing fields, thereby realizing the target business requested by the electronic device 200.
[0052] Figure 3 is a flow chart of a structured data analysis method according to an embodiment of the present invention. Figure 1 as well as Figure 3 , the structured data analysis system 100 may execute steps S310 to S350. The order of these steps S310 to S350 is only for illustration and is not limited thereto. In this embodiment, steps S310 to S350 may be applied to the following exemplary situations.
[0053] In this embodiment, the electronic device 200 executes the enterprise system to request the server 310 to execute an API call through the enterprise system to implement the target business. Depending on the type and / or version of the target business, the target API required to execute the API call has different data formats and specifications. The electronic device 200 can check and analyze whether the target API is missing through the structured data analysis system 100, and complete the missing part through the structured data analysis system 100, so that the completed target API can be correctly called by the server 310.
[0054] In step S310, the processor 110 obtains input data DIN from the electronic device 200. Step S310 may refer to Figure 2 The same applies to the relevant description of step S210 in FIG.
[0055] Steps S320 to S340 may be, for example, Figure 2 Implementation details of step S220 in . Specifically, in step S320, the processor 110 converts the input data DIN into tree structure data to form a plurality of nodes. These nodes correspond to a plurality of sets in the input data DIN, respectively. That is, the processor 110 performs data structuring on the input data DIN to form tree structure data. The tree structure data may include a plurality of nodes and line segments between the plurality of nodes. The nodes indicate sets of data that describe the same attribute in the input data DIN. The line segments indicate subordinate relationships such as coupling relationships and / or logical relationships between the plurality of sets.
[0056] In step S330, the processor 110 selects a first node and a second node from among the plurality of nodes to analyze whether the selected first node is missing. The first node and the second node correspond to a first set and a second set from among the plurality of sets, respectively.
[0057] In step S340, the processor 110 determines whether the first node is missing based on the first number of the first set and the second number of elements included in the second set to generate a missing judgment result. The first number of the first set refers to the number of times the first set appears in the entire input data DIN. The second number of elements included in the second set refers to the number of elements included in the second set. In this embodiment, since the difference between the aforementioned first number and the aforementioned second number is represented in the hierarchical data structure, whether the existence of the first set matches the overall data structure. Therefore, the aforementioned difference can indicate the situation of the missing field of the first set and is represented by the missing judgment result.
[0058] Step S350 may be, for example, Figure 2Implementation details of steps S230 to S240 in . Specifically, in step S350, the processor 110 determines whether the processor 110 generates output data DOUT to the server 310 based on the original field data D4' according to the missing judgment result. That is, when the missing judgment result indicates that the first set is missing, the processor 110 determines that it needs to access the field completion analysis system 320 to complete the missing fields based on the original field data D4' to generate the output data DOUT. On the other hand, when the missing judgment result indicates that the first set is not missing, the processor 110 determines that it does not need to access the field completion analysis system 320 to directly use the input data DIN as the output data DOUT. In some embodiments, the judgment process of steps S340 to S350 can be repeatedly executed until the sets corresponding to all nodes complete the missing inspection and analysis.
[0059] In this embodiment, the server 310 operates according to the completed input data DIN (ie, the output data DOUT) to execute an API call based on the target API indicated by the input data DIN, thereby implementing the target service requested by the electronic device 200 .
[0060] It is worth mentioning here that the structured data analysis system 100 can automatically obtain the missing part of the input data DIN (for example, the first set corresponding to the first node) by analyzing the input data DIN presented in the tree structure data. Therefore, the structured data analysis system 100 can improve the operational efficiency of the API call. In addition, the structured data analysis system 100 can enable the server 310 to receive the correct API call request (i.e., the output data DOUT) to correctly execute the API call by automatically completing the aforementioned missing parts.
[0061] Figure 4 FIG. 1 is a circuit block diagram of a structured data analysis system according to another embodiment of the present invention. Figure 4 The structured data analysis system 400 may include an adapter module 430 stored in a memory (not shown), a tree structure processing module 440, a data sufficiency analysis module 450, and a call link obtaining module 460. The structured data analysis system 400 is coupled to the electronic device 200, the server 310, and the field completion analysis system (not shown). The structured data analysis system 400 may refer to the relevant description of the structured data analysis system 100 and be analogous thereto.
[0062] In this embodiment, the adapter module 430 may include multiple adapters 431-434. These adapters 431-434 can convert data and / or signals between different data formats. Specifically, the Json adapter 431 converts the data format of the input data DIN into the standard format of JavaScript objects (i.e., JavaScript Object Notation, JSON). The Xml adapter 432 converts the data format of the input data DIN into Extensible Markup Language (XML). The Yaml adapter 433 converts the data format of the input data DIN into the standard format of serialized data (i.e., Yaml). Other adapters 434 convert the data format of the input data DIN into a data format that satisfies the hierarchical structure (e.g., CSON). Figure 4 The number and configuration of the adapters 431 - 434 in the embodiment are merely examples and are not intended to be limiting.
[0063] In this embodiment, the tree structure processing module 440 may include a tree structure generating unit 441 and a tree node analyzing unit 442. The data sufficiency analyzing module 450 may include a missing node calculating unit 451. The server 310 may include a link executing module 311.
[0064] FIG. 5A to FIG. 5B FIG. 1 is a flow chart of a structured data analysis method according to another embodiment of the present invention. Figure 4 as well as FIG. 5A to FIG. 5B , the structured data analysis system 400 may execute steps S510 to S570. The order of these steps S510 to S570 is only for illustration and is not limited thereto. In this embodiment, steps S510 to S570 may be applied to the following exemplary situations.
[0065] In this embodiment, the electronic device 200 executes the enterprise system to execute services by calling an API through the enterprise system. The electronic device 200 generates input data DIN for executing a target API.
[0066] In step S510, the structured data analysis system 400 starts to execute the structured data analysis method. Specifically, at least one of the adapters 431-434 (for example, the Json adapter 431) obtains the input data DIN from the electronic device 200. The Json adapter 431 converts the input data DIN into input data DIN' presented in a hierarchical data format (for example, JSON).
[0067] For reference FIG. 6A to FIG. 6C , FIG. 6A to FIG. 6C The present invention Figure 4Schematic diagram of input data of an embodiment. The input data DIN' may include multiple elements and multiple sets of elements, and are exemplarily shown in FIG. 6A to FIG. 6C A collection may be, for example, a collection of concrete or abstract objects (ie, elements) having a certain property (or attribute). An element may be, for example, an input parameter of input data DIN' to indicate an operation of an API call such as adding, modifying, deleting or querying.
[0068] exist Fig. 6A In an embodiment, the portion of input data DIN' includes a declaration represented as "paras" in box 610, an element represented as "simp" in box 620, and a collection represented as "col1" in box 630. In box 630, the portion of input data DIN' also includes an element represented as "simp2" in boxes 631 and 634, a complex collection represented as "cpx2" in boxes 632 and 635, and a collection represented as "col2" in boxes 633 and 636, wherein the complex collection represented as "cpx2" includes an element represented as "simp3", and the collection represented as "col2" includes an element represented as "simp4".
[0069] exist Figure 6B In an embodiment, another portion of input data DIN' includes an element denoted as "simp" in box 640 and a collection denoted as "col1" in box 650. Figure 6C In the embodiment, the other part of the input data DIN′ includes an element represented as “simp” in box 660 and a collection represented as “col1” in box 670 . Figure 6B as well as Figure 6C The elements and sets in the embodiments can refer to Fig. 6A The relevant descriptions of the embodiments are given and can be inferred by analogy.
[0070] It should be noted that an element represented as "simp", "simp2", "simp3" or "simp4" describes multiple features of an attribute, so this type of element is not a set consisting of simple values, but a set consisting of a complex structure. In this embodiment, a set represented as "col1", "col2" or "cpx2" describes multiple elements, so this type of set is also a set consisting of a complex structure.
[0071] In step S520, the processor executes the tree structure generation unit 441, so that the tree structure generation unit 441 converts the data structure of the input data DIN' to generate the tree structure data D1. In addition, the processor executes the tree node analysis unit 442, so that the tree node analysis unit 442 analyzes each node in the tree structure data D1. These nodes correspond to multiple sets in the input data DIN'. In detail, the tree structure generation unit 441 converts the input data DIN' into the tree structure data D1 to form multiple nodes. The tree structure generation unit 441 can, for example, convert Fig. 6A to Figure 6C The input data DIN' is converted into Figure 7 The tree structure data D1 is shown.
[0072] For reference Figure 7 , Figure 7 The present invention Figure 4 Schematic diagram of tree structure data of an embodiment. Tree structure data D1 may include multiple nodes N1~N8. These nodes N1~N8 may correspond to multiple sets in boxes 610~670. For example, in box 610, the declaration represented as "paras" may be structured into node N1. In boxes 620, 640 and 660, the element represented as "simp" may be structured into node N2. In boxes 630, 650 and 670, the set represented as "col1" may be structured into node N3, the element represented as "simp2" may be structured into node N4, the set represented as "cpx2" may be structured into node N5, the set represented as "col2" may be structured into node N6, the element represented as "simp3" may be structured into node N7, and the element represented as "simp4" may be structured into node N8.
[0073] In this embodiment, referring to the tree structure data D1, the tree node analysis unit 442 analyzes the types of multiple nodes N1~N8 and the subordinate relationships between multiple nodes N1~N8 according to the field information of multiple sets to generate analysis data D2. For example, the tree node analysis unit 442 analyzes that the node N1 corresponding to this set belongs to the root node according to the field information covered by "paras". The tree node analysis unit 442 analyzes that the node N2 corresponding to this set belongs to the end node according to the field information covered by "simp". By analogy, nodes N4, N7 and N8 also belong to the end node. The tree node analysis unit 442 analyzes that the node N3 corresponding to this set belongs to the set node according to the field information covered by "col1". By analogy, node N6 also belongs to the set node. The tree node analysis unit 442 analyzes that the node N5 corresponding to this set belongs to the set node (or complex node) according to the field information covered by "cpx2".
[0074] It should be noted that the terminal node refers to a node in the tree structure data that is only coupled to a single node. The terminal node can also be called a leaf node. A collection node or a complex node refers to a node in the tree structure data that is coupled to two or more nodes, and may include one or more other nodes. The structured data analysis system 400 can select any terminal node (for example, N4) as the starting node of the inspection operation, and follow the branch where the terminal node N4 is located to check each collection node (for example, N3, N1) in this branch one by one until the root node N1, so as to complete the inspection operation of a single branch.
[0075] Continuing with the above description, the tree node analysis unit 442 also analyzes the multiple first quantities of these sets respectively existing in the input data DIN' and the multiple second quantities of the elements included in these sets according to the field information of the multiple sets to generate the analysis data D2. For example, referring to the input data DIN' and the tree structure data D1, for the node N3, the tree node analysis unit 442 analyzes the field information represented as "col1" to count the number of times this set appears in the input data DIN' (that is, the first quantity is 3). In addition, the tree node analysis unit 442 counts the number of elements included in this set (that is, the second quantity is 6). The aforementioned number can be, for example, referring to Figure 6C The box 670 shown, the number of mantissas of the last element represented as ""simp3":"306"".
[0076] For another example, for node N6, the tree node analysis unit 442 analyzes the field information represented as "col2" to count the number of times this set appears in the input data DIN' (i.e., the first number is 6). In addition, the tree node analysis unit 442 counts the number of elements included in this set (i.e., the second number is 9). The aforementioned number can be, for example, referring to Figure 6C The box 670 shown, the number of the last digits of the element represented as ""simp4":"409"".
[0077] In step S530, the processor executes the missing node calculation unit 451 so that the missing node calculation unit 451 selects the terminal node with the index index (ie, Figure 7The node N2, N4, N7 or N8 shown in the figure). The subscript index refers to the parameter of the operation order of each node in the tree structure data D1. In the present embodiment, the terminal node with the subscript index of 1 may be, for example, the node N2, and so on. The missing node calculation unit 451 may select the terminal node N2. The missing node calculation unit 451 may start from this terminal node N2 to perform step S540 to check the node N2 and the node N1 in the branch including the terminal node N2 in the direction toward the root node N1 in sequence.
[0078] In step S540, the processor executes the missing node calculation unit 451, so that the missing node calculation unit 451 obtains the analysis data D2 provided by the tree node analysis unit 442, and checks the missing status of each node in sequence according to the analysis data D2. In this embodiment, taking the missing node calculation unit 451 selecting the terminal node N4 as an example, the implementation details of step S540 are as follows.
[0079] exist Figure 5B In the embodiment, in step S541, the processor executes the missing node calculation unit 451, so that the missing node calculation unit 451 assigns the selected node (for example, N4) as the current node. In other words, the missing node calculation unit 451 defines the currently checked node as node N4.
[0080] In step S542, the processor executes the missing node calculation unit 451, so that the missing node calculation unit 451 selects another node N3 that is closest to and adjacent to the current node N4 in the direction toward the root node N1 in the branch including the current node N4. In other words, the selected current node N4 (i.e., the first node) and the selected another node N3 (i.e., the second node) are located in the same branch. These nodes N4 and N3 are adjacently coupled, and these nodes N4 and N3 have a subordinate relationship.
[0081] In step S543, the processor executes the missing node calculation unit 451, so that the missing node calculation unit 451 determines whether the first number of the current node N4 is the same as the second number of the other node N3. That is, the missing node calculation unit 451 compares the number of times the set corresponding to the current node N4 exists in the input data DIN' (i.e., the first number) and the number of elements included in the set corresponding to the other node N3 (i.e., the second number) to generate a missing judgment result D3.
[0082] When the first number and the second number in step S543 are the same, it means that the element of the current node N4 can be included in the upstream node N3, and the element of the current node N4 matches the overall data structure of the input data DIN'. In other words, the current node N4 is not missing, and is represented by a negative missing judgment result D3. At this time, the missing node calculation unit 451 executes step S544.
[0083] In step S544, the processor executes the missing node calculation unit 451, so that the missing node calculation unit 451 determines whether another node N3 is a root node. That is, when the first number and the second number in step S543 are the same, the missing node calculation unit 451 generates a negative missing judgment result D3 to indicate that the current node N4 has no field missing. Based on the negative missing judgment result D3, the missing node calculation unit 451 determines whether the missing node calculation unit 451 continues to check the missing conditions of other nodes according to the type of another node N3 (i.e., root node or other node).
[0084] When the current node N4 is determined not to be a root node in step S544, it indicates that there are unchecked nodes in the branch (eg, N3 and N1). At this time, the missing node calculation unit 451 executes step S546.
[0085] In step S546, the processor executes the missing node calculation unit 451, so that the missing node calculation unit 451 uses another node N3 as the selected node, and returns to step S541 to assign another node N3 as a new current node. In this embodiment, the missing node calculation unit 451 repeats steps S542 to S543 based on the current node N3 and another adjacent and subordinate node N1, and so on.
[0086] When the current node (e.g., N1) is determined to be the root node in step S544, it means that all nodes in the branch including the terminal node N4 have been checked. At this time, the missing node calculation unit 451 executes step S547 to return to Figure 5A Step S550.
[0087] That is, in an embodiment where the current node is node N4 and the other node is node N3, the missing node calculation unit 451 can judge, based on the negative missing judgment result D3, according to the type of another node N3 (i.e., the root node or other node), whether the missing node calculation unit 451 will replace the current node N4 with another node N3 as the new current node, to continue to judge whether the new current node (i.e., N3) is missing, or stop checking and analyzing other nodes in the branch.
[0088] On the other hand, when the first number and the second number in step S543 are different, it means that the element of the current node (for example, N4) cannot be included in the upstream node N3, and the element of the current node N4 does not match the overall data structure of the input data DIN'. In other words, the current node N4 is missing, and is represented by a positive missing judgment result D3. At this time, the missing node calculation unit 451 executes step S545.
[0089] For example, assume that the number of times the "simp2" set corresponding to the current node N4 exists in the input data DIN' is 2 (i.e., the first number), and the "col1" set corresponding to another node N3 includes 3 (i.e., the second number) elements. The "col1" set includes 3 elements, but the "simp2" set included in the "col1" set only exists 2 times. Since the "simp2" set corresponding to the current node N4 is incomplete, the field corresponding to the "simp2" set is considered missing.
[0090] In step S545, the processor executes the missing node calculation unit 451, so that the missing node calculation unit 451 accesses the current node N4 and at least one of the other nodes N3 and N1 subordinate to the current node N4 as the missing set D4 according to the type of the current node (e.g., N4) (i.e., end node or set node). Then, the missing node calculation unit 451 executes step S547 to return to Figure 5A Step S550.
[0091] Specifically, when the first number and the second number in step S543 are different, the missing node calculation unit 451 generates a positive missing judgment result D3 to indicate that the current node (e.g., N4) has a missing field. In this embodiment, since the terminal node does not include other nodes, if the terminal node is missing, it means that only the terminal node on this branch is missing. That is, when the type of the current node N4 is an end node, the missing node calculation unit 451 accesses the current node N4 as a missing set D4.
[0092] Continuing with the above description, since a collection node includes other collection nodes and / or terminal nodes, if a collection node is missing, it means that other nodes included below this collection node are also missing. That is, when the type of the current node (e.g., N3) is a collection node, the missing node calculation unit 451 finds other nodes N4 subordinate to the current node N3, and accesses the current node N3 and the other nodes N4 (these) subordinate nodes as the missing set D4.
[0093] In the first case, it is assumed that the number of times the "simp" set corresponding to the current node N2 exists in the input data DIN' is 2 (i.e., the first number), and the "paras" set corresponding to another node N1 includes 3 (i.e., the second number) elements. Since the first number is not equal to the second number, the node path including the root node N1 and the current node N2 is considered incomplete, and the field corresponding to the current node N2 on this node path is considered missing.
[0094] In the second case, assume that the number of times the "cpx2" set corresponding to the current node N5 exists in the input data DIN' is 5 (i.e., the first number), and the "col1" set corresponding to another node N3 includes 6 (i.e., the second number) elements. Since the first number is not equal to the second number, the node path including the root node N1, the node N3 and the current node N5 is deemed to be incomplete, and the field corresponding to the current node N5 on this node path is deemed to be missing. In addition, since the current node N5 belongs to a collection node rather than an end node, the field corresponding to the downstream node N7 on this node path is also deemed to be missing.
[0095] In the third case, it is assumed that the number of times the "simp4" set corresponding to the current node N8 exists in the input data DIN' is 8 (i.e., the first number), and the "col2" set corresponding to another node N6 includes 9 (i.e., the second number) elements. Since the first number is not equal to the second number, the node path including the root node N1, the node N3, the node N6 and the current node N8 is determined to be incomplete, and the field corresponding to the current node N8 on this node path is determined to be missing.
[0096] In the fourth case, assume that the number of times the "col1" set corresponding to the current node N3 exists in the input data DIN' is 2 (i.e., the first number), and the "paras" set corresponding to another node N1 includes 3 (i.e., the second number) elements. Since the first number is not equal to the second number, the node path including the root node N1 and the current node N3 is deemed to be incomplete, and the field corresponding to the current node N3 on this node path is deemed to be missing. In addition, since the current node N3 belongs to a collection node rather than an end node, the fields corresponding to all downstream nodes N4 to N8 on this node path are also deemed to be missing.
[0097] Back to Figure 4 as well as Figure 5AIn the embodiment of the present invention, in step S550, the processor executes the missing node calculation unit 451, so that the missing node calculation unit 451 determines whether the subscript index of the currently selected terminal node is less than or equal to the number of all terminal nodes. In other words, the missing node calculation unit 451 determines whether each branch in the tree structure data D1 has completed the operation of step S540.
[0098] When the current subscript index is not less than or equal to the number of all terminal nodes, it means that the terminal nodes with other subscript indexes have not been selected for missing check. At this time, the missing node calculation unit 451 executes step S560.
[0099] In step S560 , the missing node calculation unit 451 updates the current index to index+1, and then repeatedly executes steps S530 to S550 to advance the checking of (one or more) nodes of another branch.
[0100] On the other hand, when the current subscript index is less than or equal to the number of all terminal nodes, it means that all terminal nodes have been selected and the missing check has been completed. At this time, the missing node calculation unit 451 executes step S570 to end the structured data analysis method.
[0101] In this embodiment, when the missing node calculation unit 451 completes the check of all nodes to complete the access to the missing set D4, the link obtaining module 460 is called to obtain the missing set D4 and the original field data (for example, Figure 1 In this embodiment, the call link obtaining module 460 accesses the call link according to the missing set D4 and the original field data to generate the output data DOUT. The aforementioned call link may be, for example, the target API indicated by the input data DIN.
[0102] It should be noted that the output data DOUT is data on which the missing set D4 has been complemented to indicate the execution of the target API call. That is, the output data DOUT may include the input data DIN and the complement data corresponding to the missing set D4.
[0103] In this embodiment, the server 310 executes the link execution module 311, so that the link execution module 311 executes the API call according to the output data DOUT to generate the link execution result D5. The link execution module 311 feeds back the link execution result D5 to the electronic device 200 to complete the target API call.
[0104] In summary, the structured data analysis system and structured data analysis method of the present invention can automatically determine the missing set of input data by analyzing the input data structured into tree-structured data. Therefore, the structured data analysis system can improve the operational efficiency of API calls. In addition, the structured data analysis system can enable the server to correctly execute the API call based on the correct API call request by automatically completing the missing set to generate output data that can execute the target API call.
[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or perform equivalent replacements on some or all of the technical features therein. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A structured data analysis system, characterized in that: include: Memory, used to store raw field data; as well as A processor is coupled to the memory and the server, and is used to obtain input data from the electronic device, and is used to convert the input data into tree structure data to form a plurality of nodes, wherein the plurality of nodes respectively correspond to a plurality of sets in the input data, The processor is further used to select a first node and a second node from among the multiple nodes, wherein the first node and the second node correspond to a first set and a second set from among the multiple sets respectively; the processor is further used to determine whether the first node is missing based on a first number of elements in the first set and a second number of elements included in the second set to generate a missing judgment result, and based on the missing judgment result, determine whether the processor generates output data to the server based on the original field data so that the server operates according to the output data.
2. The structured data analysis system according to claim 1, characterized in that: The first node and the second node are adjacently coupled, and there is a subordinate relationship between the first node and the second node.
3. The structured data analysis system according to claim 1, characterized in that: The processor is also used to analyze the types of the multiple nodes, the subordinate relationships between the multiple nodes, the multiple first quantities of the multiple sets respectively existing in the input data, and the multiple second quantities of elements respectively included in the multiple sets based on the field information of the multiple sets.
4. The structured data analysis system according to claim 1, characterized in that: The processor is also used to compare the first number and the second number, so that when the first number and the second number are the same, the processor generates a negative missing judgment result, and based on the negative missing judgment result, the processor determines whether to replace the first node with the second node according to the type of the second node to continue to determine whether the second node is missing.
5. The structured data analysis system according to claim 1, characterized in that: The processor is also used to compare the first number and the second number, so that when the first number and the second number are different, the processor generates a positive missing judgment result, and based on the positive missing judgment result, the processor accesses the first node and at least one of the other nodes subordinate to the first node as a missing set according to the type of the first node.
6. The structured data analysis system according to claim 5, characterized in that: When the type of the first node is an end node, the processor accesses the first node as the missing set.
7. The structured data analysis system according to claim 5, characterized in that: When the type of the first node is a set node, the processor accesses the first node and the other nodes subordinate to the first node as the missing set.
8. The structured data analysis system according to claim 5, characterized in that: The output data includes the completed data corresponding to the missing set.
9. The structured data analysis system according to claim 5, characterized in that: The processor is further configured to generate the output data according to the missing set and the original field data access call link.
10. The structured data analysis system according to claim 1, characterized in that: The server executes an application programming interface call according to the output data.
11. A structured data analysis method, characterized in that: include: obtaining input data from the electronic device through a processor of the server; By means of the processor, the input data is converted into tree structure data to form a plurality of nodes, wherein the plurality of nodes respectively correspond to a plurality of sets in the input data; Selecting, by the processor, a first node and a second node from among the plurality of nodes, wherein the first node and the second node correspond to a first set and a second set from among the plurality of sets, respectively; By means of the processor, judging whether the first node is missing according to a first number of the first set and a second number of elements included in the second set to generate a missing judgment result; as well as The processor determines, according to the missing judgment result, whether the processor generates output data to the server based on the original field data, so that the server operates according to the output data.
12. The structured data analysis method according to claim 11, characterized in that: The first node and the second node are adjacently coupled, and there is a subordinate relationship between the first node and the second node.
13. The structured data analysis method according to claim 11, characterized in that: Also includes: Through the processor, the types of the multiple nodes, the subordinate relationships between the multiple nodes, the multiple first quantities of the multiple sets respectively existing in the input data, and the multiple second quantities of elements respectively included in the multiple sets are analyzed according to the field information of the multiple sets.
14. The structured data analysis method according to claim 11, characterized in that: The step of determining by the processor whether the first node is missing according to the first number of the first set and the second number of elements included in the second set to generate the missing determination result includes: comparing, by the processor, the first number and the second number; and When the first number and the second number are the same, the processor generates a negative missing judgment result, The step of determining by the processor according to the missing determination result whether the processor generates output data to the server based on the original field data comprises: Based on the negative missing judgment result, the processor determines, according to the type of the second node, whether the processor should replace the first node with the second node to continue to determine whether the second node is missing.
15. The structured data analysis method according to claim 11, characterized in that: The step of determining by the processor whether the first node is missing according to the first number of the first set and the second number of elements included in the second set to generate the missing determination result includes: comparing, by the processor, the first number and the second number; and When the first number and the second number are different, the processor generates a positive missing judgment result. The step of determining by the processor according to the missing determination result whether the processor generates output data to the server based on the original field data comprises: By the processor, based on the affirmative missing judgment result, at least one of the first node and other nodes subordinate to the first node is accessed as a missing set according to the type of the first node.
16. The structured data analysis method according to claim 15, characterized in that: The step of accessing at least one of the first node and the other nodes attached to the first node as the missing set according to the type of the first node by the processor based on the affirmative missing judgment result includes: When the type of the first node is an end node, the processor accesses the first node as the missing set.
17. The structured data analysis method according to claim 15, characterized in that: The step of accessing at least one of the first node and the other nodes attached to the first node as the missing set according to the type of the first node by the processor based on the affirmative missing judgment result includes: When the type of the first node is a set node, the processor accesses the first node and the other nodes subordinate to the first node as the missing set.
18. The structured data analysis method according to claim 15, characterized in that: The output data includes the completed data corresponding to the missing set.
19. The structured data analysis method according to claim 15, characterized in that: The step of determining by the processor according to the missing determination result whether the processor generates output data to the server based on the original field data comprises: The processor accesses a call link according to the missing set and the original field data to generate the output data.
20. The structured data analysis method according to claim 11, characterized in that: Also includes: An application programming interface call is executed by the server according to the output data.
Citation Information
Patent Citations
Method for searching parameters in data model
CN102346747A
Data integrity verification method and device
CN112035890A
Retrieval of prefix completions by way of walking nodes of a trie data structure
US20130179419A1
Method and apparatus for processing electronic data
US20130290338A1
