CN110597810A - Data processing method, device, terminal and storage medium - Google Patents
Data processing method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN110597810A CN110597810A CN201910813703.9A CN201910813703A CN110597810A CN 110597810 A CN110597810 A CN 110597810A CN 201910813703 A CN201910813703 A CN 201910813703A CN 110597810 A CN110597810 A CN 110597810A
- Authority
- CN
- China
- Prior art keywords
- node
- data
- tree structure
- nodes
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2246—Trees, e.g. B+trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/26—Visual data mining; Browsing structured data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a data processing method, a data processing device, a terminal and a storage medium, wherein the method can comprise the following steps: acquiring initialization data corresponding to credit investigation rules from a server, and acquiring target data corresponding to the credit investigation rules; the initialization data comprises data of a preset tree structure; the tree structure comprises a plurality of nodes; determining a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule; extracting, from the initialization data, data of the first node and data of a second node associated with the first node; and loading a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node. By adopting the invention, the corresponding node can be automatically and intelligently positioned to display the tree structure corresponding to the node, and the display efficiency of the tree structure is improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method, an apparatus, a terminal, and a storage medium.
Background
The tree structure is a nonlinear data structure and has the characteristics of clear hierarchy, convenience in management and the like. When the terminal needs to display the tree structure corresponding to the corresponding node, the terminal can acquire information of the node, such as the serial number of the node, generate and send a tree structure display request to the server, wherein the tree structure display request carries the information of the node. The server can find out the data of the node according to the information of the node and send the data of the node to the terminal. The terminal can receive the data of the node and display the tree structure corresponding to the node according to the data of the node. However, the process of displaying the tree structures corresponding to the corresponding nodes in the above manner is time-consuming and not automatic and intelligent enough.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a data processing device, a terminal and a storage medium, which can automatically and intelligently position a corresponding node to display a tree structure corresponding to the node, and improve the display efficiency of the tree structure.
In a first aspect, an embodiment of the present invention provides a data processing method, including:
acquiring initialization data corresponding to credit investigation rules from a server, and acquiring target data corresponding to the credit investigation rules; the initialization data comprises data of a preset tree structure; the tree structure comprises a plurality of nodes; the target data comprises any one or more of: the priority level is set for each node in the plurality of nodes, the number of times of calling data of each node counted in a first preset time period, the execution result of the credit investigation rule, and the number of times of editing data of each node counted in a second preset time period;
determining a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule;
extracting, from the initialization data, data of the first node and data of a second node associated with the first node;
and loading a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node.
Optionally, the node priority display rule includes a rule determined according to a priority of a node, and the determining, according to the target data and a preset node priority display rule, a first node to be displayed from the plurality of nodes includes:
determining a node with the highest priority from the plurality of nodes according to the priority set for each node in the plurality of nodes;
and determining the node with the highest priority in the plurality of nodes as a first node to be displayed.
Optionally, the node priority display rule includes a rule determined according to the number of calls of data of a node, and the determining, according to the target data and a preset node priority display rule, a first node to be displayed from the plurality of nodes includes:
determining a node with the data calling frequency being greater than or equal to a preset frequency from the plurality of nodes according to the data calling frequency of each node in a first preset time period;
and determining the node with the calling times of the data in the nodes being more than or equal to the preset times as a first node to be displayed.
Optionally, the node priority display rule includes a rule determined according to an execution result of a credit investigation rule, and the determining, according to the target data and a preset node priority display rule, a first node to be displayed from the plurality of nodes includes:
determining a node corresponding to a rule of which the execution result indicates that the abnormality exists from the plurality of nodes according to the execution result of the credit investigation rule;
and determining the node corresponding to the rule with the execution result indicating error as the first node to be displayed.
Optionally, the node priority display rule includes the number of times of editing each node in a second preset time period, and the determining, according to the target data and a preset node priority display rule, a first node to be displayed from the plurality of nodes includes:
determining a node with the data editing times larger than or equal to the specified times from the plurality of nodes according to the data editing times of each node in a second preset time period;
and determining the node with the editing times of the data being more than or equal to the appointed times in the plurality of nodes as a first node to be displayed.
Optionally, the method further comprises:
when the editing operation of the target tree structure is received within a preset time range, editing the target tree structure according to the editing operation; wherein the editing operation comprises any one or more of: adding nodes, deleting nodes and modifying data of the nodes;
and acquiring data obtained after the target tree structure is edited, and sending the data obtained after the target tree structure is edited to the server so that the server can update the initialization data by using the data obtained after the target tree structure is edited.
Optionally, the method further comprises:
and when the editing operation on the target tree structure is not received within a preset time range, loading the tree structure on the display page.
In a second aspect, an embodiment of the present invention provides a data processing apparatus, including:
the acquisition module is used for acquiring initialization data corresponding to credit investigation rules from a server and acquiring target data corresponding to the credit investigation rules; the initialization data comprises data of a preset tree structure; the tree structure comprises a plurality of nodes; the target data comprises any one or more of: the priority level is set for each node in the plurality of nodes, the number of times of calling data of each node counted in a first preset time period, the execution result of the credit investigation rule, and the number of times of editing data of each node counted in a second preset time period;
the determining module is used for determining a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule;
an extraction module, configured to extract, from the initialization data, data of the first node and data of a second node associated with the first node;
and the loading module is used for loading a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node.
In a third aspect, an embodiment of the present invention provides a terminal, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, where the computer program is executed by a processor to implement the method according to the first aspect.
In summary, the terminal may obtain the initialization data corresponding to the credit investigation rule from the server, and obtain the target data corresponding to the credit investigation rule; the terminal can also determine a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, and extract the data of the first node and the data of a second node associated with the first node from the initialized data so as to load a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another data processing method provided by the embodiment of the invention;
FIG. 3 is a schematic diagram of a network architecture of a data processing system according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention. The method can be applied to a terminal. The terminal includes but is not limited to smart terminals such as smart phones, tablet computers, notebook computers and desktop computers. Specifically, the method may comprise the steps of:
s101, acquiring initialization data corresponding to credit investigation rules from a server, and acquiring target data corresponding to the credit investigation rules.
The credit investigation rule may be a credit investigation rule or a general name of a plurality of credit investigation rules. The credit investigation rule can be used for credit investigation. For example, the credit investigation rules may include rules that analyze credit investigation data to determine credit investigation results. The credit assessment result can be embodied in the form of credit score, whether the credit assessment result passes or not, credit rating, primary, secondary, tertiary and the like. Wherein the risk degree of the primary indication is lower than the risk degree of the secondary indication, and the risk degree of the secondary indication is lower than the risk degree of the tertiary indication. The risk degree can be obtained by analyzing credit investigation data.
For example, the above-mentioned rule for analyzing the credit investigation data to determine the credit investigation result may include a logic expression set including one or more logic expressions for analyzing the credit investigation data such as information summary, credit transaction information, public information, query record and the like to determine the credit investigation result. The information summary includes the overdue and default information summaries, such as overdue records, and the number of overdue days included in the overdue records. The message summary also includes a credit and liability message summary. The credit transaction information includes loan information such as loan particulars, time of issuance, amount of the loan, and may also include credit card information. The public information comprises information such as mandatory execution records, administrative punishment records, housing public accumulation funds, social security payment and the like. The inquiry records comprise credit investigation records in a preset time range, such as inquiry time and inquiry times.
Wherein, the server can be a server or a server cluster in the internet, and can be used for managing and executing the credit investigation rule. In one embodiment, the server may be a server carrying a rule engine corresponding to the credit investigation rule. The initialization data comprises data of a preset tree structure; the tree structure includes a plurality of nodes.
In one embodiment, the plurality of nodes may refer to a plurality of non-root nodes. The non-root node refers to a node which is not a root node in the tree structure, and the non-root node can be divided into a logic node and a condition node. The logical nodes refer to the nodes corresponding to the logical operators, and the conditional nodes refer to the nodes corresponding to the conditions. The data may include identification information corresponding to the logical nodes, such as logical operators, and identification information corresponding to the conditional nodes, such as conditions. The logical operator includes at least one of: logical and, logical not, logical or. In one embodiment, the condition may be a judgment condition for performing credit investigation. The condition may be constituted by an expression, which may include a comparison object and a comparison operator. For example, a condition may be that the user is older than 22 years of age. Then the user's age and 22 years old can be interpreted as the comparison object and larger can be interpreted as the comparison operator. In one embodiment, the identification information may also include an identification of the corresponding node, such as a number or the like, for uniquely identifying the node. In one embodiment, the tree structure may further include logical connection lines for implementing connections between nodes. For example, the logical nodes may be connected to the at least one conditional node by logical connection lines, or the logical nodes may also be connected to the at least one logical node by logical connection lines.
Wherein the target data comprises any one or more of: the priority level is set for each node in the plurality of nodes, the number of times of calling the data of each node counted in a first preset time period, the execution result of the credit investigation rule, and the number of times of editing each node counted in a second preset time period. The second preset time period may be the same as or different from the first preset time period.
In one embodiment, the acquiring, by the terminal, the initialization data corresponding to the credit investigation rule from the server and the target data corresponding to the credit investigation rule may include: the terminal sends a credit investigation rule acquisition request to the server so that the server responds to the credit investigation rule acquisition request to return the initialization data corresponding to the credit investigation rule and the target data corresponding to the credit investigation rule, and the terminal receives the initialization data corresponding to the credit investigation rule and the target data corresponding to the credit investigation rule returned by the server; or the terminal sends a credit investigation rule editing request to the server so that the server responds to the credit investigation rule editing request to return the initialization data corresponding to the credit investigation rule and the target data corresponding to the credit investigation rule, and the terminal receives the initialization data corresponding to the credit investigation rule and the target data corresponding to the credit investigation rule returned by the server. The credit investigation rule acquisition request and the credit investigation rule editing request may also be replaced by other requests or messages, which are not listed herein.
In one embodiment, the terminal can create a tree structure corresponding to the credit investigation rule, and obtain initialization data corresponding to the credit investigation rule according to the tree structure.
In one embodiment, the obtaining, by the terminal, the initialization data corresponding to the credit investigation rule according to the tree structure includes: and the terminal encapsulates the data of each non-root node included in the tree structure into a data packet with a preset data format, and determines the data packet with the preset data format as the initialization data corresponding to the credit investigation rule.
In one embodiment, the obtaining, by the terminal, the initialization data corresponding to the credit investigation rule according to the tree structure includes: and the terminal packages the data of each non-root node and the identification information of each logic connecting line included in the tree structure into a data packet in a preset data format, and determines the data packet in the preset data format as the initialization data corresponding to the credit investigation rule. The preset data format may be a data format such as a JSON Object Notation (JSON) data format.
In an embodiment, the encapsulating, by the terminal, the identification information of each non-root node and the identification information of each logical connection line included in the tree structure into a data packet in a preset data format may include: and the terminal assembles the identification information of each non-root node and the identification information of each logic connecting line included in the tree structure into the JSON object layer by layer in sequence. The tree structure is assembled layer by layer in sequence, so that the process of circular recursion of data can be facilitated.
S102, determining a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule.
In order to accurately position the node to be displayed, the terminal may determine the first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule. The number of the first nodes may be one or more.
In one embodiment, the node priority display rule includes a rule determined according to a priority of a node, and the terminal determines a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, including: the terminal determines a node with the highest priority from the plurality of nodes according to the priority set for each node in the plurality of nodes; and the terminal determines the node with the highest priority in the plurality of nodes as a first node to be displayed. And the corresponding nodes are determined to be displayed preferentially according to the priority, so that the personalized positioning display function of the nodes can be realized.
For example, the plurality of nodes includes a node 1, a node 2, a node 3, a node 4, and a node 5, where the priority of the node 1 is 1, the priority of the node 2 is N (N is an integer greater than 1), the priority of the node 3 is N, the priority of the node 4 is N, and the priority of the node 5 is N. The smaller the priority is, the higher the priority is, so the terminal may determine the node 1 with the highest priority from the 5 nodes, and determine the node 1 as the first node to be shown.
In one embodiment, if the plurality of nodes includes a non-prioritized node, the non-prioritized node may be defaulted to a lowest priority.
In one embodiment, the node priority display rule includes a rule determined according to the number of times of calling data of a node, and the terminal determines a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, including: the terminal determines a node with the data calling frequency being greater than or equal to a preset frequency from the plurality of nodes according to the data calling frequency of each node in a first preset time period; and the terminal determines the node with the calling times of the data in the nodes larger than or equal to the preset times as a first node to be displayed. The corresponding nodes are determined to be displayed preferentially through the calling times, and the function of automatically positioning the displayed nodes according to the use condition of the data can be realized.
For example, the plurality of nodes includes node 1, node 2, node 3, node 4, and node 5. The terminal determines a node 1 of which the calling times of the data are more than or equal to n (n is an integer more than or equal to 1) times from the 5 nodes according to the calling times of the data of each node in the last month, and determines the node 1 as a first node to be displayed.
In one embodiment, the node priority display rule includes a rule determined according to an execution result of a credit investigation rule, and the terminal determines a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, including: the terminal determines a node corresponding to a rule of which the execution result indicates that the exception exists from the plurality of nodes according to the execution result of the credit investigation rule; and the terminal determines the node corresponding to the rule with the execution result indicating the error as the first node to be displayed. The problem node is quickly shown, so that the problem node can be quickly positioned, and the data of the node can be quickly corrected.
For example, the terminal determines, from the plurality of nodes, a node 1, a node 2, and a node 3 corresponding to a rule 1 whose execution result indicates an error according to the execution result of the credit investigation rule; terminal node 1, node 2 and node 3 are determined to be the first nodes to be presented.
In one embodiment, the node priority display rule includes an execution result of the credit investigation rule, and the terminal determines a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, including: the terminal determines the problem node from the plurality of nodes according to the identification of the problem node carried by the execution result of the credit investigation rule; and the terminal determines the problem node as a first node to be displayed. The problem node is quickly shown, so that the problem node can be quickly positioned, and the data of the node can be quickly corrected.
In one embodiment, the node priority display rule includes the number of times of editing each node in a second preset time period, and the terminal determines a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, including: the terminal determines a node with the data editing times larger than or equal to the specified times from the plurality of nodes according to the data editing times of each node in a second preset time period; and the terminal determines the node with the editing times of the data being more than or equal to the appointed times in the plurality of nodes as a first node to be displayed.
For example, the plurality of nodes includes node 1, node 2, node 3, node 4, and node 5. The terminal determines a node 1 of which the editing times of the data are more than or equal to m (m is an integer more than or equal to 1) times from the 5 nodes according to the editing times of the data of each node in the last month, and determines the node 1 as a first node to be displayed.
In one embodiment, the number of edits may be recorded by the terminal and sent to the server. Or, the editing times may be obtained by comparing the data of each node in the initialization data corresponding to the credit investigation rule received this time with the data of each node in the initialization data received last time, determining the editing node according to the comparison result, and updating the recorded editing times of the editing node this time, when the server receives the initialization data corresponding to the credit investigation rule sent by the terminal each time.
S103, extracting the data of the first node and the data of the second node related to the first node from the initialization data.
S104, loading a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node.
In order to visually display the corresponding tree structure, the terminal may extract the data of the first node and the data of the second node associated with the first node from the initialization data, and display a target tree structure on a display page. The second node may refer to a node, such as a parent node and/or a child node, to which the first node is connected. In one embodiment, the second node may further include a node to which the first node is connected.
In one embodiment, the extracting, by the terminal, the data of the first node and the data of the second node associated with the first node from the initialization data may include: and the terminal extracts the data of the first node, the data of a second node associated with the first node and the data of a logic connecting line for representing the connection relation between the first node and the second node from the initialization data. Accordingly, the target tree structure may also include data of the logical connection line.
In one embodiment, loading the target tree structure on the display page may include: and loading the data of the first node and the data of the second node on a display page, and drawing and displaying the target data structure according to the data of the first node and the data of the second node.
In an embodiment, the terminal may obtain the location information of the first node and the location information of the second node, draw and display the first node on the display page at the location indicated by the location information of the first node, and draw and display the second node on the display page at the location indicated by the location information of the second node. In one embodiment, the location information of the first node may be preset, or may be calculated based on the location information of the root node of the tree structure. The location information of the second node may be calculated based on the location information of the first node, or may be calculated based on the location information of the root node of the tree structure.
In one embodiment, the terminal may further obtain location information of the logical connection lines used for characterizing the connection relationship between the first node and the second node, and draw and present each logical connection line at a location indicated by the location information of each logical connection line. In one embodiment, the location information of each logical connection line may be calculated based on the location information of the first node, or may be calculated based on the location information of the root node of the tree structure.
In one embodiment, the logical nodes and the conditional nodes in the target tree structure may present different display effects. For example, the data of the logical node shows a first color and the data of the conditional node shows a second color. Different nodes are distinguished through different display effects, and convenience of rule editing can be improved. Or, different display effects may be presented between different logical operators. For example, if a logical operator is a logical and, the logical operator is displayed as blue, if the logical operator is a logical or, the logical operator is displayed as purple, and if the logical operator is a logical not, the logical operator is displayed as red. Or, different display effects can be presented between comparison objects and comparison operators included in different conditions.
It can be seen that, in the embodiment shown in fig. 1, a terminal can obtain initialization data corresponding to a credit investigation rule from a server, and obtain target data corresponding to the credit investigation rule, so as to determine a first node to be displayed from a plurality of nodes according to the target data and a preset node priority display rule, and extract data of the first node and data of a second node associated with the first node from the initialization data to load a target tree structure on a display interface.
Fig. 2 is a schematic flow chart of another data processing method according to an embodiment of the present invention. The method can be applied to a terminal. Specifically, the method may comprise the steps of:
s201, acquiring initialization data corresponding to credit investigation rules from a server, and acquiring target data corresponding to the credit investigation rules.
S202, determining a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule.
S203, extracting the data of the first node and the data of the second node associated with the first node from the initialization data.
S204, loading a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node.
Steps S201 to S204 can refer to steps S101 to S104 in the embodiment of fig. 1, which is not described herein again in the embodiments of the present invention.
S205, when the editing operation of the target tree structure is received within the preset time range, the target tree structure is edited according to the editing operation.
Wherein the editing operation comprises any one or more of: adding nodes, deleting nodes and modifying data of nodes. In one embodiment, the operation of adding a node may include an operation of adding a logical node and an operation of adding a conditional node, and the operation of deleting a node may include an operation of deleting a logical node and an operation of deleting a conditional node. The operation of modifying the data of the node may include an operation of modifying a logical operator corresponding to the logical node and an operation of modifying a condition corresponding to the conditional node.
In one embodiment, when the target tree structure includes the first logical node, when an editing operation on the target tree structure is received within a preset time range, editing the target tree structure according to the editing operation includes: displaying a pull-down menu when touch operation on a first logic node in the target tree structure is detected within a preset time range; the pull-down menu comprises a newly added logic node option and a newly added condition node option; when touch operation on the newly added logic node option is detected, newly adding a second logic node and a newly added logic connecting line; the first logic node is connected with the second logic node through a newly added logic connecting line; when touch operation on the newly added condition node option is detected, newly adding at least one condition node and a logic connecting line; and the first logic node is connected with each condition node in the at least one condition node through a newly added logic connecting line. The first logical node is any one of the first nodes or any one of the second nodes.
In an embodiment, the adding the second logic node may include: the terminal displays an option comprising at least one logical operator; when the terminal detects touch operation aiming at the option of the target logical operator, a second logical node corresponding to the target logical operator is newly added; or the terminal displays the logical operator input box, and when a target logical operator input to the logical operator input box is detected, a second logical node corresponding to the target logical operator is newly added.
In one embodiment, the adding at least one condition node may include: the terminal displays an option comprising at least one condition, and when touch operation of the option aiming at the target condition is detected, a condition node corresponding to the target condition is added; or, the terminal displays a condition input box, and when a target condition input aiming at the condition input box is detected, a condition node corresponding to the target condition is added.
In one embodiment, the adding at least one condition node may include: the terminal displays at least one condition selection frame aiming at a target condition node in the at least one condition node; when touch operation on any condition selection frame in the at least one condition selection frame is received, displaying a first drop-down list; the first drop down list includes any one or more of the following options: inputting a value option, selecting a variable option, selecting a parameter option, selecting a constant option and selecting a method option; responding to touch operation of the target option in the first drop-down list, and acquiring and displaying a parameter value list of a type corresponding to the target option; the parameter value list includes at least one parameter value belonging to the type; and responding to the selection operation of the parameter values in the parameter list, and determining the selected parameter values as the conditions corresponding to the target condition nodes. In one embodiment, the terminal may further fill the selected parameter value into the touched condition selection box. In one embodiment, the terminal may determine the selected parameter value as a comparison object in the condition corresponding to the target condition node.
In one embodiment, the terminal further displays at least one comparison operator input box for the target condition node, and when a touch operation on the comparison operator input box is received, displays at least one comparison operator; and the terminal receives the selection operation of a target comparison operator in the at least one comparison operator and determines the target comparison operator as the condition corresponding to the condition node. For example, the comparison operator may be less than, greater than, or equal to. In one embodiment, the terminal may determine the target comparison operator as a comparison operator in the condition corresponding to the condition node, so as to establish a comparison relationship between comparison objects in the condition. In one embodiment, the compare operator input box may be disposed between the at least one conditional selection box for constructing an expression to correctly construct the condition corresponding to the target conditional node.
In one embodiment, the terminal may further display an add condition option and an add join condition option; when the terminal detects the touch operation of adding the condition option, a condition node is added, and when the terminal detects the touch operation of adding the joint condition option, a plurality of condition nodes are added. For example, when the terminal detects a touch operation for adding the joint condition option, a node corresponding to condition 1, a node corresponding to condition 2, and a node corresponding to condition 3 are newly added, and the three nodes are connected with the first logic node through a logic connection line.
In one embodiment, when an editing operation on the target tree structure is received within a preset time range, editing the target tree structure according to the editing operation includes: when the terminal detects touch operation on the first logic node in the target tree structure within a preset time range, displaying a second drop-down list; the second drop down list comprises at least one logical operator and at least one condition; the terminal responds to touch operation on the target object in the second drop-down list to generate a target node corresponding to the target object; the target object is any one of the at least one logical operator or any one of the at least one condition. Wherein, the at least one logical operator and the at least one condition included in the second drop-down list may be pre-configured, or may also be set by the user within a preset time range, such as within the last year.
In an embodiment, the foregoing touch operation on the first logical node may be a touch operation on a pull-down selection box when a control corresponding to the first logical node is detected.
In one embodiment, the terminal may further present a delete button for each node in the target tree structure. When the terminal detects a touch operation on a deletion button corresponding to a target node, deleting the target node and a connection relation related to the target node, such as deleting a logic connection line connected with the target node. And, when the target node has a child node, deleting the corresponding child node and the corresponding logical connection line. The target node is any node in the target tree structure, and may be any non-root node or root node, for example.
S206, obtaining the data obtained after the target tree structure is edited, and sending the data obtained after the target tree structure is edited to the server, so that the server can update the initialized data by using the data obtained after the target tree structure is edited.
In order to enable the server to update the rules quickly, the terminal can acquire the data obtained after the target tree structure is edited and send the data obtained after the target tree structure is edited to the server, so that the server can update the initialized data by using the data obtained after the target tree structure is edited.
In an embodiment, the obtaining, by the terminal, data obtained after the target tree structure is edited, and sending the data obtained after the target tree structure is edited to the server may include: and the terminal packages the identification information of each non-root node included by the target tree structure into a data packet in a preset data format and sends the data packet in the preset data format to the server.
In an embodiment, when the target tree structure includes at least one non-root node and at least one logical connection line, the obtaining, by a terminal, data obtained after the target tree structure is edited, and sending the data obtained after the target tree structure is edited to the server may include: and the terminal packages the identification information of each non-root node and the identification information of each logic connecting line included in the target tree structure into a data packet in a preset data format and sends the data packet in the preset data format to the server.
In one embodiment, when the editing operation on the target tree structure is not received within a preset time range, the terminal loads the tree structure on the display page. When the editing operation on the target tree structure is not received within the preset time range, the fact that the user probably has no editing requirement on the target tree structure currently is shown, the purpose of automatically switching the tree structure for the user is achieved by further displaying the complete tree structure, the operation time is saved, and the user experience is improved.
In one embodiment, the terminal can extract data of each non-root node from the initialization data, and draw and display the tree structure according to the data of each non-root node. Or the terminal can split the initialization data to obtain a non-root node information group (including data of each non-root node) and a logic connection line information group (including data of each logic connection line), and analyze the non-root node information group and the logic connection line information group to draw and display the tree structure.
In one embodiment, the parsing, by the terminal, the non-root node information group and the logical connection line information group to draw and display the tree structure includes: the terminal acquires the position information of each non-root node and the position information of each logic connecting line; drawing and displaying each non-root node indicated by the non-root node information group on a page according to a first rule at the position indicated by the position information of each non-root node, and displaying target information in the identification information of each non-root node on each non-root node; and drawing and displaying the logic connecting lines indicated by the logic connecting line information group on the page according to a second rule at the positions indicated by the position information of the logic connecting lines.
In one embodiment, the foregoing step S205 may be replaced by editing the target tree structure according to an editing operation when the editing operation on the target tree structure is received.
In an embodiment, the terminal may further provide a tree structure switching option, and when a touch operation on the tree structure switching option is detected, the tree structure is loaded on the display page. The tree structure switching option enables a user to select the tree structure to be displayed according to any requirement of the user, and facilitates the display process of different tree structures.
In one embodiment, the terminal may further provide a paging presentation option, and when a touch operation on the paging presentation option is detected, the display page is divided into a first page and a second page, the target tree structure is loaded on the first page, and the tree structure is loaded on the second page.
It can be seen that, in the embodiment shown in fig. 2, the terminal can display the target tree structure, obtain the data obtained after the target tree structure is edited, and send the data obtained after the target tree structure is edited to the server, so that the server updates the initialized data by using the data obtained after the target tree structure is edited, the purpose of editing the corresponding rule based on the target tree structure at the front end is achieved, and the editing efficiency is improved.
Please refer to fig. 3, which is a schematic diagram of a network architecture of a data processing system according to an embodiment of the present invention. The data processing system shown in fig. 3 may include a terminal 10 and a server 20. The terminal 10 and the server 20 may communicate.
The terminal 10 executes the step S101 to obtain the initialization data corresponding to the credit investigation rule and the target data corresponding to the credit investigation rule from the server 20, and executes the steps S102 to S104 to load a target tree structure on the display page, where the target tree structure includes data of the first node and data of the second node.
Fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention. The apparatus can be applied to a terminal. The apparatus may include:
an obtaining module 401, configured to obtain initialization data corresponding to a credit investigation rule from a server, and obtain target data corresponding to the credit investigation rule; the initialization data comprises data of a preset tree structure; the tree structure comprises a plurality of nodes; the target data comprises any one or more of: the priority level is set for each node in the plurality of nodes, the number of times of calling data of each node counted in a first preset time period, the execution result of the credit investigation rule, and the number of times of editing data of each node counted in a second preset time period;
a determining module 402, configured to determine, according to the target data and a preset node priority display rule, a first node to be displayed from the multiple nodes;
an extracting module 403, configured to extract, from the initialization data, data of the first node and data of a second node associated with the first node;
a loading module 404, configured to load a target tree structure on a display page, where the target tree structure includes the data of the first node and the data of the second node.
In an optional implementation manner, the node priority display rule includes a rule determined according to a priority of a node, and the determining module 402 is specifically configured to determine, according to a priority set for each node in the plurality of nodes, a node with a highest priority from the plurality of nodes; and determining the node with the highest priority in the plurality of nodes as a first node to be displayed.
In an optional implementation manner, the node priority display rule includes a rule determined according to the number of times of calling data of a node, and the determining module 402 is further configured to determine, from the plurality of nodes, a node whose number of times of calling data is greater than or equal to a preset number of times according to the number of times of calling data of each node in a first preset time period; and determining the node with the calling times of the data in the nodes being more than or equal to the preset times as a first node to be displayed.
In an optional implementation manner, the node priority display rule includes a rule determined according to an execution result of the credit investigation rule, and the determining module 402 is further configured to determine, according to the execution result of the credit investigation rule, a node corresponding to a rule whose execution result indicates that there is an abnormality from the plurality of nodes; and determining the node corresponding to the rule with the execution result indicating error as the first node to be displayed.
In an optional implementation manner, the node priority display rule includes the number of times of editing for each node in a second preset time period, and the determining module 402 is further configured to determine, from the plurality of nodes, a node whose number of times of editing for data is greater than or equal to a specified number of times according to the number of times of editing for data of each node in the second preset time period; and determining the node with the editing times of the data being more than or equal to the appointed times in the plurality of nodes as a first node to be displayed.
In an optional embodiment, the processing module 405 is configured to, when an editing operation on the target tree structure is received within a preset time range, edit the target tree structure according to the editing operation; wherein the editing operation comprises any one or more of: adding nodes, deleting nodes and modifying data of the nodes; and acquiring data obtained after the target tree structure is edited.
In an optional implementation manner, the communication module 406 is configured to send data obtained after the target tree structure is edited to the server, so that the server updates the initialization data by using the data obtained after the target tree structure is edited.
In an optional implementation manner, the loading module 404 is further configured to load the tree structure on the display page when an editing operation on the target tree structure is not received within a preset time range.
It can be seen that, in the embodiment shown in fig. 4, the terminal can obtain the initialized data corresponding to the credit investigation rule from the server, and obtain the target data corresponding to the credit investigation rule, so as to determine the first node to be displayed from the plurality of nodes according to the target data and the preset node priority display rule, and extract the data of the first node and the data of the second node associated with the first node from the initialized data to load the target tree structure on the display interface.
Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal described in this embodiment may include: one or more processors 501, one or more input devices 502, one or more output devices 503, and memory 504. The processor 501, input device 502, output device 503, and memory 504 may be connected by a bus or other means.
The input device 502 and the output device 503 may comprise standard wired or wireless communication interfaces. The input device 502 may also include a touch screen, a touch display screen, a voice recorder, etc., and the output device 503 may also include a display screen, a touch display screen, a speaker, etc.
The Processor 501 may be a Central Processing Unit (CPU), and may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 504 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 504 is used to store a set of program codes, and the input device 502, the output device 503 and the processor 501 may call the program codes stored in the memory 504. Specifically, the method comprises the following steps:
the processor 501 is configured to obtain initialization data corresponding to credit investigation rules from a server, and obtain target data corresponding to the credit investigation rules; the initialization data comprises data of a preset tree structure; the tree structure comprises a plurality of nodes; the target data comprises any one or more of: the priority level is set for each node in the plurality of nodes, the number of times of calling data of each node counted in a first preset time period, the execution result of the credit investigation rule, and the number of times of editing data of each node counted in a second preset time period; determining a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule; extracting, from the initialization data, data of the first node and data of a second node associated with the first node; and loading a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node.
Optionally, the node priority display rule includes a rule determined according to a priority of a node, and the processor 501 determines a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, specifically determines a node with a highest priority from the plurality of nodes according to a priority set for each node in the plurality of nodes; and determining the node with the highest priority in the plurality of nodes as a first node to be displayed.
Optionally, the node priority display rule includes a rule determined according to the number of calls of data of a node, and the processor 501 determines a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, specifically, determines a node whose number of calls of data is greater than or equal to a preset number from the plurality of nodes according to the number of calls of data of each node in a first preset time period; and determining the node with the calling times of the data in the nodes being more than or equal to the preset times as a first node to be displayed.
Optionally, the node priority display rule includes a rule determined according to an execution result of the credit investigation rule, and the processor 501 determines a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule, specifically, determines a node corresponding to a rule indicating that an execution result is abnormal from the plurality of nodes according to an execution result of the credit investigation rule; and determining the node corresponding to the rule with the execution result indicating error as the first node to be displayed.
Optionally, the node priority display rule includes the number of edits to each node in a second preset time period, and the processor 501 determines a first node to be displayed from the plurality of nodes according to the target data and the preset node priority display rule, specifically, determines a node whose number of edits to the data is greater than or equal to a specified number from the plurality of nodes according to the number of edits to the data of each node in the second preset time period; and determining the node with the editing times of the data being more than or equal to the appointed times in the plurality of nodes as a first node to be displayed.
Optionally, the processor 501 is further configured to, when an editing operation on the target tree structure is received through the input device 502 within a preset time range, edit the target tree structure according to the editing operation; wherein the editing operation comprises any one or more of: adding nodes, deleting nodes and modifying data of the nodes; and acquiring data obtained after the target tree structure is edited, and sending the data obtained after the target tree structure is edited to the server through an output device 503, so that the server updates the initialization data by using the data obtained after the target tree structure is edited.
Optionally, the processor 501 is further configured to load the tree structure on the display page when an editing operation on the target tree structure is not received through the input device 502 within a preset time range.
In a specific implementation, the processor 501, the input device 502, and the output device 503 described in this embodiment of the present application may execute the implementation described in the embodiment of fig. 1 and the embodiment of fig. 2, and may also execute the implementation described in this embodiment of the present application, which is not described herein again.
The functional modules in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a form of sampling hardware, and can also be realized in a form of sampling software functional modules.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the above embodiments of the methods. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (10)
1. A data processing method, comprising:
acquiring initialization data corresponding to credit investigation rules from a server, and acquiring target data corresponding to the credit investigation rules; the initialization data comprises data of a preset tree structure; the tree structure comprises a plurality of nodes; the target data comprises any one or more of: the priority level is set for each node in the plurality of nodes, the number of times of calling data of each node counted in a first preset time period, the execution result of the credit investigation rule, and the number of times of editing data of each node counted in a second preset time period;
determining a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule;
extracting, from the initialization data, data of the first node and data of a second node associated with the first node;
and loading a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node.
2. The method according to claim 1, wherein the node-first presentation rule includes a rule determined according to a priority of a node, and the determining a first node to be presented from the plurality of nodes according to the target data and a preset node-first presentation rule includes:
determining a node with the highest priority from the plurality of nodes according to the priority set for each node in the plurality of nodes;
and determining the node with the highest priority in the plurality of nodes as a first node to be displayed.
3. The method according to claim 1, wherein the node-first presentation rule includes a rule determined according to the number of calls of data of a node, and the determining a first node to be presented from the plurality of nodes according to the target data and a preset node-first presentation rule includes:
determining a node with the data calling frequency being greater than or equal to a preset frequency from the plurality of nodes according to the data calling frequency of each node in a first preset time period;
and determining the node with the calling times of the data in the nodes being more than or equal to the preset times as a first node to be displayed.
4. The method according to claim 1, wherein the node-first presentation rule includes a rule determined according to an execution result of a credit investigation rule, and the determining a first node to be presented from the plurality of nodes according to the target data and a preset node-first presentation rule includes:
determining a node corresponding to a rule of which the execution result indicates that the abnormality exists from the plurality of nodes according to the execution result of the credit investigation rule;
and determining the node corresponding to the rule with the execution result indicating error as the first node to be displayed.
5. The method according to claim 1, wherein the node-first display rule includes a number of edits to each node in a second preset time period, and the determining the first node to be displayed from the plurality of nodes according to the target data and a preset node-first display rule includes:
determining a node with the data editing times larger than or equal to the specified times from the plurality of nodes according to the data editing times of each node in a second preset time period;
and determining the node with the editing times of the data being more than or equal to the appointed times in the plurality of nodes as a first node to be displayed.
6. The method according to any one of claims 1-5, further comprising:
when the editing operation of the target tree structure is received within a preset time range, editing the target tree structure according to the editing operation; wherein the editing operation comprises any one or more of: adding nodes, deleting nodes and modifying data of the nodes;
and acquiring data obtained after the target tree structure is edited, and sending the data obtained after the target tree structure is edited to the server so that the server can update the initialization data by using the data obtained after the target tree structure is edited.
7. The method of claim 1, further comprising:
and when the editing operation on the target tree structure is not received within a preset time range, loading the tree structure on the display page.
8. A data processing apparatus, comprising:
the acquisition module is used for acquiring initialization data corresponding to credit investigation rules from a server and acquiring target data corresponding to the credit investigation rules; the initialization data comprises data of a preset tree structure; the tree structure comprises a plurality of nodes; the target data comprises any one or more of: the priority level is set for each node in the plurality of nodes, the number of times of calling data of each node counted in a first preset time period, the execution result of the credit investigation rule, and the number of times of editing data of each node counted in a second preset time period;
the determining module is used for determining a first node to be displayed from the plurality of nodes according to the target data and a preset node priority display rule;
an extraction module, configured to extract, from the initialization data, data of the first node and data of a second node associated with the first node;
and the loading module is used for loading a target tree structure on a display page, wherein the target tree structure comprises the data of the first node and the data of the second node.
9. A terminal, comprising a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910813703.9A CN110597810A (en) | 2019-08-30 | 2019-08-30 | Data processing method, device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910813703.9A CN110597810A (en) | 2019-08-30 | 2019-08-30 | Data processing method, device, terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110597810A true CN110597810A (en) | 2019-12-20 |
Family
ID=68856524
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910813703.9A Pending CN110597810A (en) | 2019-08-30 | 2019-08-30 | Data processing method, device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110597810A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113138826A (en) * | 2021-04-28 | 2021-07-20 | 深圳软牛科技有限公司 | Data loading method based on tree structure and related equipment |
-
2019
- 2019-08-30 CN CN201910813703.9A patent/CN110597810A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113138826A (en) * | 2021-04-28 | 2021-07-20 | 深圳软牛科技有限公司 | Data loading method based on tree structure and related equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112199093B (en) | Resource checking method, device, equipment and computer readable storage medium | |
US9342277B2 (en) | Method of searching data associated with nodes of a graphical program | |
CN110956269A (en) | Data model generation method, device, equipment and computer storage medium | |
US20210124752A1 (en) | System for Data Collection, Aggregation, Storage, Verification and Analytics with User Interface | |
EP2175410A1 (en) | Tariff management configuration automation | |
CN113722289A (en) | Method, device, electronic equipment and medium for constructing data service | |
CN111338716A (en) | Data processing method and device based on rule engine and terminal equipment | |
CN114444478A (en) | Voucher visualization method and device, electronic equipment and storage medium | |
CN112818937B (en) | Excel file identification method and device, electronic equipment and readable storage medium | |
CN109902030A (en) | A kind of method of application program of mobile phone automatic test step record and playback | |
CN110597810A (en) | Data processing method, device, terminal and storage medium | |
CN116048517B (en) | API (application program interface) generating method, system and device based on B/S (browser/Server) architecture application system | |
US10970332B2 (en) | Electronic device and digital content managing method | |
CN112948264B (en) | Method and device for executing test task, system, storage medium and electronic device | |
CN111652580B (en) | Method and device for processing data of nodes | |
CN114860362A (en) | Interface updating method and device | |
CN110020166A (en) | A kind of data analysing method and relevant device | |
CN110221952B (en) | Service data processing method and device and service data processing system | |
CN113127099A (en) | Server configuration method, device, equipment and storage medium | |
CN114968696A (en) | Index monitoring method, electronic equipment and chip system | |
CN111444161A (en) | Data processing method and device, electronic equipment and storage medium | |
CN111930352A (en) | Bank financial product online method and device | |
CN113377604A (en) | Data processing method, device, equipment and storage medium | |
CN111258896A (en) | Method and device for automatic number-making breakpoint continuous making and computer readable storage medium | |
CN110597505A (en) | Data processing method, device, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |