CN112214208A - Method for processing multilevel data and related product thereof - Google Patents

Method for processing multilevel data and related product thereof Download PDF

Info

Publication number
CN112214208A
CN112214208A CN202011128402.1A CN202011128402A CN112214208A CN 112214208 A CN112214208 A CN 112214208A CN 202011128402 A CN202011128402 A CN 202011128402A CN 112214208 A CN112214208 A CN 112214208A
Authority
CN
China
Prior art keywords
data
data node
node
modification
modified
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
Application number
CN202011128402.1A
Other languages
Chinese (zh)
Inventor
陈巧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202011128402.1A priority Critical patent/CN112214208A/en
Publication of CN112214208A publication Critical patent/CN112214208A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a processing method of multilevel data and a related product thereof, which are applied to electronic equipment, wherein the processing method of the multilevel data comprises the following steps: the electronic equipment acquires data to be modified; determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data; modifying the first data node; extracting a modification state of the first data node; determining a modification transmission direction corresponding to the first data node according to the modification state; and determining the second data node according to the modification transmission direction, and modifying the second data node, wherein the second data node is the next data node to be modified in the tree structure of the multi-level data except the first data node, so that the problem of dead cycle formation when data streams in the multi-level data are modified downwards and upwards at the same time is solved.

Description

Method for processing multilevel data and related product thereof
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for processing multilevel data and a related product thereof.
Background
For a website, the front end generally refers to the foreground part of the website, including the presentation layer and the structural layer of the website. Therefore, the front-end technology is generally divided into front-end design and front-end development, the front-end design can be generally understood as visual design of a website, and the front-end development is the foreground code implementation of the website and comprises basic HTML (hypertext markup language), CSS (cascading style sheet) and JavaScript/ajax. In the field of front-end development, more and more business logic and data processing are forcibly accessed, and each business layer considers past performance or future planning according to data, which involves a series of synchronous updating and linkage of data.
In the existing mechanism system, page data exists in a hierarchical structure relationship, when data corresponding to a target sub-level is modified, data corresponding to an upper level can be synchronously modified along with the target sub-level, and the upper level can be modified along with the target sub-level until reaching a root node of a tree. The data will also flow to the next level to modify the next level to the last level. The data stream modifies the data both down and up, forming dead loops.
Disclosure of Invention
The present disclosure provides a method for processing multilevel data and a related product thereof, which can effectively solve the problem of dead loop formed when data streams in the multilevel data modify data downward and upward simultaneously.
In a first aspect, an embodiment of the present application provides a method for processing multilevel data, which is applied to an electronic device, and the method for processing the multilevel data includes:
acquiring data to be modified;
determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data;
modifying the first data node;
extracting a modification state of the first data node, wherein the modification state is used for indicating whether to modify a data node to be modified next to the first data node except the first data node in the tree structure of the multilevel data;
determining a modification transmission direction corresponding to the first data node according to the modification state;
and determining the second data node according to the modification transmission direction, and modifying the second data node, wherein the second data node is the next data node to be modified in the tree structure of the multi-level data except the first data node.
Optionally, the modifying the first data node includes: modifying data corresponding to the first data node into target data; modifying a node execution state of the first data node, the node execution state indicating whether modification of the first data node is performed.
Optionally, the determining, according to the modification state, a modification transfer direction corresponding to the first data node includes: if the first data node is not a termination node in the tree structure of the multi-level data, judging whether the first data node is in an active modification state; if the modification state of the first data node is an active modification state, determining that the modification transfer direction of the data node of the first data node is a first transfer direction; and if the modification state of the first data node is the passive modification state, determining that the modification transmission direction of the data node of the first data node is the second transmission direction according to the passive modification state of the first data node.
Optionally, the first transmission direction specifically refers to: a preset transfer direction; or, obtaining the transfer direction according to the first data node.
Optionally, if the first data node is not a termination node in the tree structure of the multi-level data, determining a modification transfer direction of the first data node according to the modification state includes: if the first data node is not a termination node in the tree structure of the multi-level data, judging whether the first data node actively modifies the state; and if the modification state of the first data node is the passive modification state, determining that the modification transmission direction of the data node of the first data node is the second transmission direction according to the passive modification state of the first data node.
In a second aspect, an embodiment of the present application provides an apparatus for processing multilevel data, where the apparatus for processing multilevel data includes:
an acquisition unit configured to acquire data to be modified;
a first determining unit configured to determine a first data node of data nodes to be modified in a tree structure of the multilevel data;
a first modifying unit for modifying the first data node;
a second determining unit, configured to extract a modification state of the first data node, where the modification state is used to indicate whether to modify a data node to be modified next to the first data node except the first data node in the tree structure of the multi-level data;
a third determining unit, configured to determine, according to the modification state, a modification transfer direction corresponding to the first data node;
and a second modification unit, configured to determine the second data node according to the modification transmission direction, and modify the second data node, where the second data node is a next data node to be modified in the tree structure of the multi-level data, except for the first data node.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, the embodiment of the present application obtains data to be modified; determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data; modifying the first data node; determining a modification status of the first data node; determining a modification transmission direction corresponding to the first data node according to the modification state; and determining the second data node according to the modification transmission direction, and modifying the second data node, so that the problem of dead cycle formation when data streams in the multi-level data modify data downwards and upwards at the same time can be effectively solved.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for processing multilevel data according to an embodiment of the present disclosure;
FIG. 2 is a diagram illustrating a tree structure of multi-level data according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a method for processing multi-level data according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a block diagram of functional units of a device for processing multilevel data according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The following describes embodiments of the present application in detail.
In order to solve the problem that dead loops are formed when data streams in multi-level data are modified downwards and upwards at the same time, the application provides a processing method of multi-level data, which is applied to electronic equipment, and specifically as shown in fig. 1, the processing method of multi-level data may include, but is not limited to, the following steps:
s101, the electronic equipment acquires data to be modified;
in a specific implementation, the electronic device obtains data to be modified, including but not limited to: the electronic equipment determines the position of the data to be modified in the tree structure of the multilevel data according to the first instruction, and acquires the data to be modified according to the position.
S102, the electronic equipment determines a first data node corresponding to data to be modified in the data nodes to be modified in the tree structure of the multi-level data;
the electronic device may include various handheld devices, vehicle-mounted devices, computing devices, such as smart phones, tablet computers, desktop computers, notebook computers, and the like.
Wherein, the tree structure corresponding to the first data node may be: any one of the binary search tree, the balanced binary tree, the red-black tree, the B + tree, the dictionary tree, the suffix tree, and the generalized suffix tree, and may be any other tree structure type, which is not limited herein.
In a specific implementation, before the electronic device determines a first data node in the to-be-modified data nodes in the tree structure of the multi-level data, the method further includes: data nodes of a tree structure in the multilevel data are initialized.
To be further explained: initializing a data tree structure in multilevel data, comprising: determining a structure type of a tree, a depth of the tree, a number of nodes of the tree, a number of parent levels and a number of child levels between nodes of the tree, contents of each node of the tree, and a node state of each node of the tree in a data tree structure in the multi-level data.
In a specific implementation, the determining, by the electronic device, a first data node in the to-be-modified data nodes in the tree structure of the multi-level data includes: determining a first data node in the data nodes to be modified in the tree structure of the multi-level data according to a first instruction, wherein the first instruction is used for actively modifying; or determining a first data node in the data nodes to be modified in the tree structure of the multilevel data according to a second pointer, wherein the second pointer is a pointer of storage of the second data node after the data node is modified, and the second pointer points to a storage address of the first data node.
Each data node to be modified in the tree structure of the multilevel data has two modification states, and the modification state can be an active modification state or a passive modification state. The active modification state is a state artificially modified on a certain data node, and the passive modification state is a state in which data of the current data node changes due to modification of other data nodes, wherein the other data nodes need to have an association relationship with the current data node, and the electronic device can execute different processes according to different modification states.
S103, the electronic equipment modifies the first data node;
in a specific implementation, the modifying, by the electronic device, the first data node includes: and modifying the data corresponding to the first data node into target data, and modifying the node execution state of the first data node.
Further, modifying the node execution state of the first data node includes, but is not limited to: the node execution state of the first data node is set to an executable state or a non-executable state. For example, the flag is set to true or false in the first data node.
The node execution state is used for modifying the mark of the node data, and comprises an executable state and a non-executable state.
It should be further explained that the node execution state may be determined by: and setting a flag (the value of the flag is true, false) in each data node, and determining the node execution state of the first data node according to the flag. Wherein, default is false, false represents executable state, true is not executable state; or, default true, false represents the non-executable state, true is the executable state.
It should be further explained that the node execution state may be determined by: a first value bit is set in each data node, and the node execution state of the first data node is determined according to the first value bit. Wherein the value of the first numerical bit comprises: a first value and a second value. The first value represents an executable state, and the second value is a non-executable state; the first value is different from the second value, the first value can be 1, 2, 3, 0, 3, 5, 7, etc. without any limitation, and the second value can be 1, 2, 3, 0, 3, 5, 7, etc. without any limitation. For example, if the first value is 0 and the second value is 1, the first data node is in an executable state if the first value bit is 0; when the first data bit is 1, the first data node is in the non-executable state.
When the electronic device modifies the first data node, the electronic device calculates the number of modified data nodes through the first global variable, for example, when one data node is modified, the electronic device calculates the number of modified data nodes through the first global variable resetflag count- -. Wherein the global variable is set to a first initial value when initialized. When the global variable resetflag count is equal to 0, the electronic device resets all flag bits of all data nodes to a default value, for example, flag is equal to false.
S104, the electronic equipment extracts the modification state of the first data node;
the modification state is used for indicating whether to modify a data node to be modified next to the first data node except the first data node in the tree structure of the multilevel data.
Wherein the modification state comprises an active modification state and a passive modification state. The active modification state is a state artificially modified on a certain data node, and the passive modification state is a state in which data of the current data node changes due to modification of other data nodes, wherein the other data nodes need to have an association relationship with the current data node, and the electronic device can execute different processes according to different modification states.
S105, the electronic equipment determines a modification transmission direction corresponding to the first data node according to the modification state;
and the second data node is the next data node to be modified in the tree structure of the multi-level data except the first data node.
In a specific implementation, the electronic device determines a second data node according to the modification state, and modifies the second data node, including: and if the first data node is not the termination node in the tree structure of the multi-level data, determining the modification transmission direction of the first data node according to the modification state.
The termination nodes comprise root nodes and nodes without child nodes.
Further, if the first data node is not a termination node in the tree structure of the multi-level data, determining a modification transmission direction of the first data node according to the modification status, including but not limited to: if the first data node is not a termination node in the tree structure of the multi-level data, judging whether the first data node actively modifies the state; and if the modification state of the first data node is the active modification state, determining that the modification transfer direction of the data node of the first data node is the first transfer direction.
Wherein, the first transmission direction specifically means: a preset transfer direction; or, the transfer direction is obtained according to the first data node. The predetermined transfer direction may be from the first data node to the end node, modify the transfer upwards, and then modify the transfer downwards, for example, as shown in fig. 2, the first data node is B first to be transferred upwards by B- > a, and then to be transferred downwards by B- > D- > H or I or J, B- > E. The predetermined transfer direction may be to first modify the transfer downward starting from the first data node until the end node, and then modify the transfer downward starting from the first data node, for example, as shown in fig. 2, the first data node is then transferred downward from B- > D- > H or I or J, B- > E, and then B is transferred upward from B- > a.
It should be further explained that, if the first transmission direction is a transmission direction obtained according to the first data node, the first transmission direction may be determined by the following specific steps: if the first data node is a termination node, judging whether the first data node is a root node, and if so, determining that the first transmission direction is downward transmission; or if the first data node is not the root node, that is, the first data node is a leaf node, determining that the first transmission direction is upward transmission.
In a specific implementation, if the first data node is not a termination node in a tree structure of the multi-level data, determining a modification transfer direction of the first data node according to a modification state includes: if the first data node is not a termination node in a tree structure of the multi-level data, judging whether the first data node actively modifies the state; and if the modification state of the first data node is the passive modification state, determining that the modification transmission direction of the data node of the first data node is the second transmission direction according to the passive modification state of the first data node.
For example, as shown in fig. 2, in the case that the first data node is not in the active modification state, i.e. the first data node is in the passive modification state,
if the modified transmission direction of the first data node is upward transmission and the first data node is B, B- > A transmission is executed by judging whether a flag of a parent node A of the first data node is equal to false or not, if the flag of the A is in an executable state, the B- > A transmission is executed, namely the parent node A of the first data node is a second data node, otherwise, the B is a termination node for upward transmission modification;
and if the modification transmission direction of the first data node is downward transmission, B- > D, B- > E transmits modification until the node is terminated by judging the flag of D or E, wherein the flag is false.
S106, the electronic equipment determines the second data node according to the modification transmission direction and modifies the second data node.
In a specific implementation, the method further comprises: calculating the number of nodes of the data nodes to be modified in the tree structure of the multilevel data according to the first data node; and determining whether the data node to be modified in the tree structure of the multilevel data is modified or not according to the number of the nodes, and if the data node to be modified in the tree structure of the multilevel data is modified, storing the data node to be modified.
In a specific implementation, the number of nodes of the data node to be modified in the tree structure of the multilevel data is calculated according to the first data node, which includes but is not limited to: and calculating the node number of the data nodes to be modified in the tree structure of the multilevel data according to the numerical value of a first global variable in the first data node and the initial value of the first global variable, wherein the first global variable is a predefined global parameter, and the initial value of the first global variable can be calculated by the data tree principle.
It should be further explained that, when the electronic device modifies the first data node, the electronic device calculates the number of modified data nodes through the first global variable, for example, when one data node is modified, the electronic device calculates the number of modified data nodes through the first global variable resetflag count — resetflag count. Wherein the global variable is set to a first initial value when initialized. When the global variable resetflag count is equal to 0, the electronic device resets all flag bits of all data nodes to a default value, for example, flag is equal to false.
Specifically, determining whether the data node to be modified in the tree structure of the multilevel data is modified and finished according to the number of nodes, and if the data node to be modified in the tree structure of the multilevel data is modified and finished, storing the data node to be modified, further includes: and judging whether the data nodes in the tree structure of the multi-level data are modified or not according to the number of the nodes of the data nodes to be modified in the tree structure of the multi-level data, and if not, continuing to modify the second data nodes.
It can be seen that, the embodiment of the present application obtains data to be modified; determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data; modifying the first data node; determining a modification status of the first data node; determining a modification transmission direction corresponding to the first data node according to the modification state; and determining the second data node according to the modification transmission direction, and modifying the second data node, so that the problem of dead cycle formation when data streams in the multi-level data modify data downwards and upwards at the same time can be effectively solved.
The embodiments of the present application will be described in detail below with reference to a specific example.
Referring to fig. 3, fig. 3 is a schematic flow chart of a method for processing multilevel data according to an embodiment of the present application, applied to an electronic device, where the method for processing multilevel data includes:
s301, the electronic equipment acquires data to be modified;
s302, the electronic equipment determines a first data node corresponding to the data to be modified in the data nodes to be modified in the tree structure of the multi-level data;
s303, the electronic equipment modifies the first data node;
s304, the electronic equipment extracts the modification state of the first data node;
the electronic equipment modification state is used for indicating whether to modify a data node to be modified next to a first data node in the tree structure of the multilevel data except the first data node.
S305, the electronic equipment determines a modification transmission direction corresponding to the first data node according to the modification state; determining the second data node according to the modification transmission direction, and modifying the second data node;
and the second data node is the next data node to be modified in the tree structure of the multi-level data except the first data node.
S306, the electronic equipment calculates the node number of the data nodes to be modified in the tree structure of the multilevel data according to the first data nodes;
s307, the electronic device determines whether the data node to be modified in the tree structure of the multi-level data is modified or not according to the number of the nodes, and stores the data node to be modified if the data node to be modified in the tree structure of the multi-level data is modified.
It can be seen that, the electronic device of the embodiment of the application acquires data to be modified; determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data; modifying the first data node; extracting a modification state of the first data node; determining a modification transmission direction corresponding to the first data node according to the modification state; determining the second data node according to the modification transmission direction, and modifying the second data node; calculating the node number of data nodes to be modified in a tree structure of the multilevel data according to the first data node; and determining whether the data node to be modified in the tree structure of the multi-level data is modified or not according to the number of the nodes, and storing the data node to be modified if the data node to be modified in the tree structure of the multi-level data is modified. The problem of dead loop formed when data streams in multi-level data are simultaneously modified downwards and upwards can be effectively solved.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device 400 according to an embodiment of the present application, and as shown in the drawing, the electronic device 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more programs 421, where the one or more programs 421 are stored in the memory 420 and configured to be executed by the application processor 410, and the one or more programs 421 include instructions for performing the following steps:
acquiring data to be modified;
determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data;
modifying the first data node;
extracting a modification state of the first data node, wherein the modification state is used for indicating whether to modify a data node to be modified next to the first data node except the first data node in the tree structure of the multilevel data;
determining a modification transmission direction corresponding to the first data node according to the modification state;
and determining the second data node according to the modification transmission direction, and modifying the second data node, wherein the second data node is the next data node to be modified in the tree structure of the multi-level data except the first data node.
In one possible example, in said modifying the first data node, said one or more programs 421 comprise instructions for performing in particular the following steps: modifying data corresponding to the first data node into target data; modifying a node execution state of the first data node, the node execution state indicating whether modification of the first data node is performed.
In one possible example, in terms of determining a modification delivery direction corresponding to the first data node according to the modification status, the one or more programs 421 include instructions for performing the following steps: and if the first data node is not the termination node in the tree structure of the multi-level data, determining the modification transmission direction of the first data node according to the modification state.
In one possible example, in the aspect that the modification transmission direction of the first data node is determined according to the modification status if the first data node is not a termination node in the tree structure of the multi-level data, the one or more programs 421 include specific instructions for performing the following steps: if the first data node is not a termination node in the tree structure of the multi-level data, judging whether the first data node actively modifies the state; if the modification state of the first data node is an active modification state, determining that the modification transfer direction of the data node of the first data node is a first transfer direction; and if the modification state of the first data node is the passive modification state, determining that the modification transmission direction of the data node of the first data node is the second transmission direction according to the passive modification state of the first data node.
In one possible example, the first transfer direction specifically refers to: a preset transfer direction; or, obtaining the transfer direction according to the first data node.
In one possible example, the one or more programs 421 further include instructions specifically for performing the steps of: calculating the number of nodes of the data nodes to be modified in the tree structure of the multilevel data according to the first data node; and determining whether the data node to be modified in the tree structure of the multilevel data is modified or not according to the number of the nodes, and if the data node to be modified in the tree structure of the multilevel data is modified, storing the data node to be modified.
It can be seen that, the embodiment of the present application obtains data to be modified; determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data; modifying the first data node; determining a modification status of the first data node; determining a modification transmission direction corresponding to the first data node according to the modification state; and determining the second data node according to the modification transmission direction, and modifying the second data node, so that the problem of dead cycle formation when data streams in the multi-level data modify data downwards and upwards at the same time can be effectively solved.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 5 is a block diagram of functional units of a multilevel data processing apparatus 500 according to an embodiment of the present application. The apparatus 500 for processing multilevel data comprises:
an acquisition unit configured to acquire data to be modified;
a first determining unit configured to determine a first data node of data nodes to be modified in a tree structure of the multilevel data;
a first modifying unit for modifying the first data node;
a second determining unit, configured to extract a modification state of the first data node, where the modification state is used to indicate whether to modify a data node to be modified next to the first data node except the first data node in the tree structure of the multi-level data;
a third determining unit, configured to determine, according to the modification state, a modification transfer direction corresponding to the first data node;
and a second modification unit, configured to determine the second data node according to the modification transmission direction, and modify the second data node, where the second data node is a next data node to be modified in the tree structure of the multi-level data, except for the first data node.
The apparatus 500 for processing multilevel data may further include a storage unit 503 for storing program codes and data of an electronic device. The storage unit 503 may be a memory.
In one possible example, in terms of modifying the first data node, the first modifying unit 502 is specifically configured to: modifying data corresponding to the first data node into target data; modifying a node execution state of the first data node, the node execution state indicating whether modification of the first data node is performed.
In a possible example, in the aspect that the modification transmission direction corresponding to the first data node is determined according to the modification state, the second modifying unit 504 is specifically configured to: and if the first data node is not the termination node in the tree structure of the multi-level data, determining the modification transmission direction of the first data node according to the modification state.
In a possible example, in the aspect that if the first data node is not a termination node in the tree structure of the multi-level data, the modification transmission direction of the first data node is determined according to the modification status, the second modifying unit 504 is specifically configured to: if the first data node is not a termination node in the tree structure of the multi-level data, judging whether the first data node actively modifies the state; if the modification state of the first data node is an active modification state, determining that the modification transfer direction of the data node of the first data node is a first transfer direction; and if the modification state of the first data node is the passive modification state, determining that the modification transmission direction of the data node of the first data node is the second transmission direction according to the passive modification state of the first data node.
In one possible example, the first transfer direction specifically refers to: a preset transfer direction; or, obtaining the transfer direction according to the first data node.
In one possible example, the second modifying unit 504 further includes instructions specifically for: calculating the number of nodes of the data nodes to be modified in the tree structure of the multilevel data according to the first data node; and determining whether the data node to be modified in the tree structure of the multilevel data is modified or not according to the number of the nodes, and if the data node to be modified in the tree structure of the multilevel data is modified, storing the data node to be modified.
It can be seen that, the embodiment of the present application obtains data to be modified; determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data; modifying the first data node; determining a modification status of the first data node; determining a modification transmission direction corresponding to the first data node according to the modification state; and determining the second data node according to the modification transmission direction, and modifying the second data node, so that the problem of dead cycle formation when data streams in the multi-level data modify data downwards and upwards at the same time can be effectively solved.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A processing method of multilevel data is applied to electronic equipment, and the processing method of multilevel data comprises the following steps:
acquiring data to be modified;
determining a first data node corresponding to data to be modified in data nodes to be modified in a tree structure of multilevel data;
modifying the first data node;
extracting a modification state of the first data node, wherein the modification state is used for indicating whether to modify a data node to be modified next to the first data node except the first data node in the tree structure of the multilevel data;
determining a modification transmission direction corresponding to the first data node according to the modification state;
and determining the second data node according to the modification transmission direction, and modifying the second data node, wherein the second data node is the next data node to be modified in the tree structure of the multi-level data except the first data node.
2. The method of claim 1, wherein modifying the first data node comprises:
modifying data corresponding to the first data node into target data;
and modifying the node execution state of the first data node, wherein the node execution state is used for indicating that the first data node is modified.
3. The method of claim 1, wherein determining the modification delivery direction corresponding to the first data node according to the modification status comprises:
and if the first data node is not the termination node in the tree structure of the multi-level data, determining the modification transmission direction of the first data node according to the modification state.
4. The method of claim 3, wherein determining the modification transmission direction of the first data node according to the modification status if the first data node is not a termination node in the tree structure of the multi-level data comprises:
if the first data node is not a termination node in the tree structure of the multi-level data, judging whether the first data node is in an active modification state;
if the modification state of the first data node is an active modification state, determining that the modification transfer direction of the data node of the first data node is a first transfer direction;
and if the modification state of the first data node is the passive modification state, determining that the modification transmission direction of the data node of the first data node is the second transmission direction according to the passive modification state of the first data node.
5. The method according to claim 4, wherein the first transfer direction is in particular:
a preset transfer direction; or the like, or, alternatively,
and obtaining the transmission direction according to the first data node.
6. The method according to any one of claims 1-5, further comprising:
calculating the number of nodes of the data nodes to be modified in the tree structure of the multilevel data according to the first data node;
and determining whether the data node to be modified in the tree structure of the multilevel data is modified or not according to the number of the nodes, and if the data node to be modified in the tree structure of the multilevel data is modified, storing the data node to be modified.
7. An apparatus for processing multilevel data, the apparatus comprising:
an acquisition unit configured to acquire data to be modified;
the first determining unit is used for determining a first data node in the data nodes to be modified corresponding to the data to be modified in the tree structure of the multilevel data;
a first modifying unit for modifying the first data node;
a second determining unit, configured to extract a modification state of the first data node, where the modification state is used to indicate whether to modify a data node to be modified next to the first data node except the first data node in the tree structure of the multi-level data;
a third determining unit, configured to determine, according to the modification state, a modification transfer direction corresponding to the first data node;
and a second modification unit, configured to determine the second data node according to the modification transmission direction, and modify the second data node, where the second data node is a next data node to be modified in the tree structure of the multi-level data, except for the first data node.
8. The apparatus for processing multilevel data according to claim 7, wherein the first modification unit comprises:
the first modification subunit is used for modifying the data corresponding to the first data node into target data;
and the second modification subunit is used for modifying the node execution state of the first data node, and the node execution state is used for indicating whether the first data node is modified or not.
9. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that it stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN202011128402.1A 2020-10-20 2020-10-20 Method for processing multilevel data and related product thereof Pending CN112214208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011128402.1A CN112214208A (en) 2020-10-20 2020-10-20 Method for processing multilevel data and related product thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011128402.1A CN112214208A (en) 2020-10-20 2020-10-20 Method for processing multilevel data and related product thereof

Publications (1)

Publication Number Publication Date
CN112214208A true CN112214208A (en) 2021-01-12

Family

ID=74056115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011128402.1A Pending CN112214208A (en) 2020-10-20 2020-10-20 Method for processing multilevel data and related product thereof

Country Status (1)

Country Link
CN (1) CN112214208A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541875A (en) * 2010-12-16 2012-07-04 北京大学 Access method, device and system for relational node data of directed acyclic graph
US20130246527A1 (en) * 2012-03-16 2013-09-19 Research In Motion Limited System and Method for Managing Data Using Tree Structures
CN103501337A (en) * 2013-09-29 2014-01-08 方正国际软件有限公司 Multi-grade data node updating and synchronizing system and method
CN107562777A (en) * 2017-07-17 2018-01-09 阿里巴巴集团控股有限公司 Data processing method and its equipment
CN108737487A (en) * 2018-03-21 2018-11-02 腾讯科技(深圳)有限公司 Method of data synchronization and device, storage medium and electronic device
CN111476478A (en) * 2020-04-02 2020-07-31 网易(杭州)网络有限公司 Method and device for processing art plan task

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541875A (en) * 2010-12-16 2012-07-04 北京大学 Access method, device and system for relational node data of directed acyclic graph
US20130246527A1 (en) * 2012-03-16 2013-09-19 Research In Motion Limited System and Method for Managing Data Using Tree Structures
CN103501337A (en) * 2013-09-29 2014-01-08 方正国际软件有限公司 Multi-grade data node updating and synchronizing system and method
CN107562777A (en) * 2017-07-17 2018-01-09 阿里巴巴集团控股有限公司 Data processing method and its equipment
CN108737487A (en) * 2018-03-21 2018-11-02 腾讯科技(深圳)有限公司 Method of data synchronization and device, storage medium and electronic device
CN111476478A (en) * 2020-04-02 2020-07-31 网易(杭州)网络有限公司 Method and device for processing art plan task

Similar Documents

Publication Publication Date Title
US10289649B2 (en) Webpage advertisement interception method, device and browser
JP6488508B2 (en) Web page access method, apparatus, device, and program
WO2015127882A1 (en) Method, apparatus and system for extracting webpage content
WO2015165412A1 (en) Method for modifying webpage and apparatus for modifying webpage
US20170277703A1 (en) Method for Displaying Webpage and Server
CN109145235B (en) Method and device for analyzing webpage and electronic equipment
CN107908946A (en) Method for generating picture verification codes, picture validation code, verification method and device
US11140153B2 (en) Techniques for identification of location of relevant fields in a credential-seeking web page
CN106503111B (en) Webpage code-transferring method, device and client terminal
CN113011677B (en) Parking space arrangement optimization method based on garage and related products
CN103399885A (en) Mining method and device of POI (point of interest) representing images and server
CN104899203B (en) Webpage generation method and device and terminal equipment
CN108228557B (en) Sequence labeling method and device
KR20220099953A (en) dynamic typesetting
CN115757725A (en) Question and answer processing method and device, computer equipment and storage medium
US10387545B2 (en) Processing page
CN114398138A (en) Interface generation method and device, computer equipment and storage medium
CN105320641B (en) Text verification method and user terminal
JP5612556B2 (en) Applying a passfill algorithm when laying out text around objects
CN112214208A (en) Method for processing multilevel data and related product thereof
CN112416858A (en) Document storage method and device, electronic equipment and computer readable storage medium
CN116774973A (en) Data rendering method, device, computer equipment and storage medium
JP2024507029A (en) Web page identification methods, devices, electronic devices, media and computer programs
US20210397663A1 (en) Data reduction in a tree data structure for a wireframe
CN103577449A (en) Phishing website characteristic self-learning mining method and system

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