CN116595057B - Data query method, device, computer equipment and computer program product - Google Patents

Data query method, device, computer equipment and computer program product Download PDF

Info

Publication number
CN116595057B
CN116595057B CN202310863964.8A CN202310863964A CN116595057B CN 116595057 B CN116595057 B CN 116595057B CN 202310863964 A CN202310863964 A CN 202310863964A CN 116595057 B CN116595057 B CN 116595057B
Authority
CN
China
Prior art keywords
node
nodes
task
user
queried
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.)
Active
Application number
CN202310863964.8A
Other languages
Chinese (zh)
Other versions
CN116595057A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310863964.8A priority Critical patent/CN116595057B/en
Publication of CN116595057A publication Critical patent/CN116595057A/en
Application granted granted Critical
Publication of CN116595057B publication Critical patent/CN116595057B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a data query method, a data query device, computer equipment and a computer program product; the method comprises the following steps: responding to a received progress query instruction, and acquiring a node identifier carried in the progress query instruction; determining nodes to be queried from all nodes included in a pre-built infinite nested data structure, wherein the infinite nested data structure is built based on all nodes of items and dependency relations among all nodes; acquiring attribute parameters of each leaf node in the infinite nested data structure; and determining the node progress of the node to be queried according to each attribute parameter, and outputting the node progress of the node to be queried. According to the method and the device, the node progress of the node to be queried in the project can be automatically queried, and the progress determination aiming at multiple layers and multiple dimensions is realized.

Description

Data query method, device, computer equipment and computer program product
Technical Field
The present disclosure relates to data processing technology, and in particular, to a data query method, apparatus, computer device, and computer program product.
Background
Through project progress statistics, the progress situation of the project can be known in time, problems are found, and corresponding measures are taken, so that the aim of improving efficiency is fulfilled; the potential risk can be found, and measures can be taken in time to adjust, so that the aim of reducing the risk is fulfilled. Therefore, project progress statistics are particularly important.
However, in the related art, the automatic statistics cannot be realized, and the multi-level and multi-dimensional progress statistics requirements cannot be met either by manually filling in the schedule or by performing single-level information statistics through an excel tool.
Disclosure of Invention
The embodiment of the application provides a data query method, a data query device, computer equipment, a computer readable storage medium and a computer program product, which can automatically query the node progress of a node to be queried in a project and realize multi-level and multi-dimensional progress determination.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a data query method, which comprises the following steps:
responding to a received progress query instruction, and acquiring a node identifier carried in the progress query instruction;
determining nodes to be queried from all nodes included in a pre-built infinite nested data structure, wherein the infinite nested data structure is built based on all nodes of items and dependency relations among all nodes;
Acquiring attribute parameters of each leaf node in the infinite nested data structure;
and determining the node progress of the node to be queried according to each attribute parameter, and outputting the node progress of the node to be queried.
The embodiment of the application provides a data query device, which comprises:
the first acquisition module is used for responding to the received progress query instruction and acquiring a node identifier carried in the progress query instruction;
the first determining module is used for determining the node to be queried from all nodes included in a pre-built infinite nested data structure, wherein the infinite nested data structure is built based on all nodes of the project and the dependency relationship among all nodes;
the second acquisition module is used for acquiring attribute parameters of each leaf node in the infinite nested data structure;
and the second determining module is used for determining the node progress of the node to be queried according to each attribute parameter and outputting the node progress of the node to be queried.
An embodiment of the present application provides a computer device, including:
a memory for storing computer executable instructions;
and the processor is used for realizing the data query method provided by the embodiment of the application when executing the computer executable instructions stored in the memory.
The embodiment of the application provides a computer readable storage medium, which stores computer executable instructions for implementing the data query method provided by the embodiment of the application when the computer executable instructions are caused to be executed by a processor.
Embodiments of the present application provide a computer program product comprising a computer program or computer-executable instructions which, when executed by a processor, implement the data query method provided by the embodiments of the present application.
The embodiment of the application has the following beneficial effects:
in the embodiment of the application, after receiving a progress query instruction, a node identifier carried in the progress query instruction is obtained; next, determining a node to be queried from all nodes included in the pre-built infinite nested data structure, wherein the infinite nested data structure can be used for representing a multi-level and multi-dimensional node structure; then, obtaining attribute parameters of each leaf node of the infinite nested data structure; and finally, determining the node progress of the leaf node by each attribute parameter, automatically determining the node progress of the non-leaf node by using a step-by-step upward method, namely determining the node progress of each node in the infinite nested data structure, and determining the node progress of the node to be queried and outputting the node progress of the node to be queried because the node to be queried belongs to the node in the infinite nested data structure. Therefore, the node progress of the node to be queried can be automatically determined, and the data query efficiency can be improved; because the node to be queried belongs to the node in the infinite nested data structure, the node progress query in the multi-level and multi-dimensional node structure can be realized.
Drawings
FIG. 1 is a schematic diagram of a network architecture of a data query system 100 according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a server 400 provided in an embodiment of the present application;
FIG. 3 is a schematic flow chart of an implementation of the data query method according to the embodiment of the present application;
FIG. 4 is a schematic flow chart of one implementation of determining node progress provided in an embodiment of the present application;
FIG. 5 is a schematic flow chart of an implementation of determining a total value of a task parameter according to an embodiment of the present application;
FIG. 6 is a flow chart of one implementation of the completed task parameter values provided in an embodiment of the present application;
fig. 7 is a schematic flow chart of another implementation of the data query method according to the embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
In the following description, the terms "first", "second", "third" and the like are merely used to distinguish similar objects and do not represent a specific ordering of the objects, it being understood that the "first", "second", "third" may be interchanged with a specific order or sequence, as permitted, to enable embodiments of the application described herein to be practiced otherwise than as illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of the application is for the purpose of describing the embodiments of the application only and is not intended to be limiting of the application.
Based on the problems existing in the related art, the embodiments of the present application provide a data query method, apparatus, computer device, computer readable storage medium, and computer program product, which can solve the problems that the progress cannot be automatically counted, the progress statistics requirements of multiple levels and multiple dimensions cannot be met, and the like, and hereinafter, an exemplary application of the computer device provided in the embodiments of the present application is described, where the computer device provided in the embodiments of the present application may be implemented as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device), a smart phone, a smart sound box, a smart watch, a smart television, a vehicle-mounted terminal, and other various types of user terminals. In the following, an exemplary application when the computer device is implemented as a server will be described.
Referring to fig. 1, fig. 1 is a schematic diagram of a network architecture of a data query system 100 according to an embodiment of the present application, in order to support a data query application, a terminal 200 is connected to a server 400 through a network 300, where the network 300 may be a wide area network or a local area network, or a combination of the two.
The terminal 200 is configured to send a progress query request to the server 400, where the server 400 is configured to obtain a node identifier carried in the progress query instruction; the server 400 is configured to determine a node to be queried from all nodes included in a pre-built infinite nested data structure, where the infinite nested data structure is built based on all nodes of a project and dependency relationships between the nodes; the server 400 is configured to obtain attribute parameters of each leaf node in the infinite nested data structure; the server 400 is configured to determine a node progress of the node to be queried according to each attribute parameter, and output the node progress of the node to be queried. The server 400 may also transmit the node progress of the node to be queried to the terminal 200 such that the node progress of the node to be queried is presented through the terminal 200.
In some embodiments, the terminal 200 is configured to send an acquisition request for an unlimited nested data structure to the server 400 to obtain an unlimited nested data structure; the server 400 transmits an infinite nested data structure to the terminal 200, wherein the infinite nested data structure is constructed based on each node of the item and the dependency relationship between the each node; the terminal 200 is configured to receive the progress query instruction, and obtain a node identifier carried in the progress query instruction; the terminal 200 is configured to determine a node to be queried from all nodes included in the infinite nested data structure; the terminal 200 is configured to obtain attribute parameters of each leaf node in the infinite nested data structure; the terminal 200 is configured to determine a node progress of the node to be queried according to each attribute parameter, and output the node progress of the node to be queried.
In some embodiments, when the infinite nested data structure at the server 400 side changes, the server 400 may actively send the updated infinite nested data structure to the terminal 200, so that the terminal 200 can timely obtain the updated infinite nested data structure.
In the embodiment of the present application, taking the determination of the node progress by the server 400 as an example, the server 400 can automatically determine the node progress of the node to be queried, thereby improving the degree of automation; because the node to be queried belongs to the node in the infinite nested data structure, and the infinite nested data structure represents the multi-level and multi-dimensional node structure, the node progress query in the multi-level and multi-dimensional node structure can be realized.
In some embodiments, the server 400 may be a stand-alone physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDNs), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 200 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a car-mounted smart terminal, etc. The terminal and the cloud server may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiments of the present application.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a server 400 provided in an embodiment of the present application, and the server 400 shown in fig. 2 includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in server 400 are coupled together by bus system 440. It is understood that the bus system 440 is used to enable connected communication between these components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled in fig. 2 as bus system 440.
The processor 410 may be an integrated circuit chip having signal processing capabilities such as a general purpose processor, such as a microprocessor or any conventional processor, a digital signal processor (Digital Signal Processor, DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable presentation of the media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
Memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. Memory 450 optionally includes one or more storage devices physically remote from processor 410.
Memory 450 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a random access Memory (Random Access Memory, RAM). The memory 450 described in the embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 451 including system programs, e.g., framework layer, core library layer, driver layer, etc., for handling various basic system services and performing hardware-related tasks, for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for accessing other electronic devices via one or more (wired or wireless) network interfaces 420, the exemplary network interface 420 comprising: bluetooth, wireless compatibility authentication (WiFi), and universal serial bus (Universal Serial Bus, USB), etc.;
A presentation module 453 for enabling presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, speakers, etc.) associated with the user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in software, and fig. 2 shows a data query device 455 stored in a memory 450, which may be software in the form of a program, a plug-in, or the like, including the following software modules: the first acquisition module 4551, the first determination module 4552, the second acquisition module 4553 and the second determination module 4554 are logical, and thus may be arbitrarily combined or further split according to the functions implemented. The functions of the respective modules will be described hereinafter.
In other embodiments, the apparatus provided by the embodiments of the present application may be implemented in hardware, and by way of example, the apparatus provided by the embodiments of the present application may be a processor in the form of a hardware decoding processor that is programmed to perform the data query method provided by the embodiments of the present application, e.g., the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), DSPs, programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field-programmable gate arrays (Field-Programmable Gate Array, FPGA), or other electronic components.
The data query method provided by the embodiment of the present application will be described with reference to exemplary applications and implementations of the server provided by the embodiment of the present application.
Cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The cloud technology is based on the general names of network technology, information technology, integration technology, management platform technology, application technology and the like applied by the cloud computing business mode, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing. The solution provided by the embodiment of the application mainly relates to private cloud, and the technology is described below.
A Private Cloud (Private Cloud) is a Cloud infrastructure created with software and hardware resources within a firewall for organizations or departments within an enterprise to share resources within a data center. A private cloud is created, typically cloud device (Infrastructure as a Service, iaaS, infrastructure as a service) software in addition to hardware resources.
Private cloud computing also includes three levels of cloud hardware, cloud platform, cloud services. In contrast, cloud hardware is a user's own personal computer or server, rather than a data center of a cloud computing vendor. Cloud computing manufacturers build data centers to provide public cloud services for millions of users, thus requiring tens of millions of servers. Private cloud computing serves only friends and relatives to individuals, and staff and clients and suppliers to businesses, so personal or business's own personal computers or servers are sufficient to provide cloud services.
The scheme provided by the embodiment of the application relates to private cloud technology, and is specifically described through the following embodiment.
In the following, the data query method provided in the embodiments of the present application is described, and as mentioned above, the computer device implementing the data query method in the embodiments of the present application may be a terminal, a server, or a combination of both. The execution subject of the respective steps will not be repeated hereinafter.
It should be noted that, in the following examples of the data query method, a private cloud scenario is taken as an example for illustration, and those skilled in the art may apply the data query method provided in the embodiments of the present application to data queries in other non-cloud scenarios according to understanding the following.
Referring to fig. 3, fig. 3 is a schematic flow chart of an implementation of the data query method provided in the embodiment of the present application, and the data query method provided in the embodiment of the present application will be described below with reference to the steps shown in fig. 3, where the main body of the steps in fig. 3 is a server.
In step S101, in response to the received progress query instruction, a node identifier carried in the progress query instruction is obtained.
In some embodiments, the progress query instruction is used for querying the node progress of the node to be queried, where the progress query instruction carries the node identifier of the node to be queried. After receiving the progress query instruction, the server can obtain the node identifier carried in the progress query instruction by analyzing the progress query instruction, wherein the node identifier is the node identifier of the node to be queried. The progress query instruction may carry one node identifier, or may carry multiple node identifiers. When carrying a node identifier, characterizing the node progress of a node to be queried; and when the node identifiers are carried, characterizing the node progress of the nodes to be queried.
In some embodiments, the node identifiers are used to represent the nodes in a one-to-one correspondence relationship with the nodes, and the node identifiers in step S101 refer to the node identifiers of the nodes to be queried, and are used to represent the nodes to be queried. Illustratively, the node identity may be represented as NID001, NIDs002, NID003, NIDs004, etc.
In step S102, a node to be queried is determined from each node included in the pre-built infinite nested data structure.
In the embodiment of the application, the infinite nested data structure is constructed based on each node of the project and the dependency relationship between each node.
In some embodiments, the infinite nested data structure includes nodes of different levels, which may represent an event, and illustratively, each node may include an item 1 node, a product 2 node, a product 3 node, a module 1 node, a module 2 node, a module 3 node, a module 4 node, a module 5 node, a task 1 node, a task 2 node, a subtask 1 node, a subtask 2 node, and the like. The project 1 node and the product 1 node, the product 2 node, the product 3 node, the module 1 node, the module 2 node, the module 3 node, the module 4 node, the module 5 node, the task 1 node, the task 2 node, the subtask 1 node and the subtask 2 node belong to nodes with different levels; the product 1 node and the product 2 node and the product 3 node belong to the same level of products, and the product 1 node and the project 1 node, the module 2 node, the module 3 node, the module 4 node, the module 5 node, the task 1 node, the task 2 node, the subtask 1 node and the subtask 2 node belong to different levels of nodes.
In some embodiments, if there is a dependency between two nodes, the two nodes correspondingly have a parent-child relationship in an infinitely nested data structure. Illustratively, item 1 is relied upon by product 1, and then in the infinite nested data structure, the node corresponding to item 1 is the parent of the node corresponding to product 1.
In the embodiment of the application, the node to be queried can be determined from all the nodes based on the node identification of the node to be queried. The node identification of each node can be obtained first, then the target node identification which is the same as the node identification of the node to be queried is determined from the node identifications of each node, and finally the node corresponding to the target node identification is determined as the node to be queried.
In step S103, attribute parameters of each leaf node in the infinite nested data structure are acquired.
In some embodiments, when a node does not have child nodes, then the node is determined to be a leaf node. Based on the above, determining the leaf node without child node from each node of the infinite nested data structure, and acquiring the attribute parameters of the leaf node. The attribute parameters of the leaf node may include a name, a leaf node identifier, a parent node identifier, completion identifier information, and the like. In some embodiments, the attribute parameters may also include an estimated duration of completion of the leaf node.
In step S104, the node progress of the node to be queried is determined according to each attribute parameter, and the node progress of the node to be queried is output.
In some embodiments, referring to fig. 4, the above-mentioned "determining the node progress of the node to be queried according to each attribute parameter" in step S104 may be implemented by the following steps S1041 to S1043, which are described in detail below.
In step S1041, when the node to be queried is a non-leaf node, a task parameter total value of the node to be queried is determined according to each attribute parameter.
In the embodiment of the application, if the node to be queried has a child node, the node to be queried is a non-leaf node.
In some embodiments, referring to fig. 5, the "determining the total value of the task parameters of the node to be queried according to the respective attribute parameters" in the above step S1041 may be implemented by the following steps S411 to S4110, which are specifically described below.
In step S411, it is determined whether each attribute parameter includes an estimated time period.
In some embodiments, each attribute parameter may be parsed to obtain a parsed result; judging whether the analysis result has estimated time length or not, and if so, determining that each attribute parameter comprises the estimated time length; if the analysis result does not have the estimated time length, determining that each attribute parameter does not include the estimated time length.
In the embodiment of the present application, if each attribute parameter includes an estimated duration, step S412 is entered; if each attribute parameter does not include the estimated time length, the process advances to step S417.
In step S412, each child node of the node to be queried is acquired.
In some embodiments, each child node of the node to be queried may be determined based on each dependency, thereby obtaining each child node of the node to be queried.
In step S413, a She Zizi node and a non-She Zizi node are determined from the respective child nodes of the node to be queried.
In some embodiments, leaf children and non-leaf children may be determined from each child of a node to be queried by determining whether each child of the node to be queried exists. When the child node of the node to be queried does not exist, determining the child node of the node to be queried as a leaf child node; when a child node exists in the child node of the node to be queried, the child node of the node to be queried is determined to be a non-She Zizi node.
In step S414, the estimated time length of each leaf child node is obtained, and the estimated time length of each leaf child node is accumulated to obtain a first task total value.
In some embodiments, for the She Zizi node, the analysis result of each leaf child node can be obtained by analyzing the attribute parameters of each leaf child node; obtaining estimated time length of each leaf child node from the analysis result of each She Zizi node; and finally, accumulating each estimated time length to obtain a first accumulated result, and determining the first accumulated result as a first task total value.
In step S415, the total subtask parameter values of the non-leaf child nodes are obtained, and the total subtask parameter values of the non-leaf child nodes are accumulated to obtain a second total task value.
In some embodiments, for the non-She Zizi node, the method for determining the total value of the subtask parameters of each non-leaf sub-node is similar to determining the total value of the task parameters of the node to be queried, that is, the sub-node of the non-She Zizi node is continuously searched until the leaf node of the bottommost layer is found, and the total value of the subtask parameters of the non-She Zizi node is obtained by accumulating the estimated time period layer by layer from bottom to top. Based on the result, the total values of the subtask parameters of the non-leaf child nodes are accumulated again to obtain a second accumulation result, and the second accumulation result is determined to be the second task total value.
In step S416, the sum of the first task total value and the second task total value is determined as the task parameter total value of the node to be queried.
In some embodiments, the first task total value and the second task total value are accumulated to obtain a third accumulated result, and the third accumulated result is determined as the task parameter total value of the node to be queried.
In step S417, each child node of the node to be queried is acquired.
In the embodiment of the application, the child node is a She Zizi node or a non-leaf child node.
In step S418, the number of first nodes belonging to the She Zizi node in the child nodes of the node to be queried is obtained, and the number of the first nodes is determined as the third task total value.
In some embodiments, the first node number of the She Zizi nodes can be determined by a counting method; then, the first node number is determined as a third task total value.
In step S419, the total subtask parameter values of the non-leaf child nodes are obtained, and the total subtask parameter values are accumulated to obtain a fourth total task value.
In some embodiments, the implementation of step S419 is similar to the implementation of step S415 described above, and thus, the implementation of step S419 may refer to the implementation of step S415 described above. The difference between the two steps is that step S419 is to obtain the total subtask parameters of the non-leaf child nodes by accumulating the number of the nodes layer by layer from bottom to top, and step S415 is to obtain the total subtask parameters of the non-She Zizi nodes by accumulating the estimated time period layer by layer from bottom to top.
In step S4110, the sum of the third task total value and the fourth task total value is determined as the task parameter total value of the node to be queried.
In some embodiments, the third task total value and the fourth task total value are accumulated to obtain a fourth accumulated result, and the fourth accumulated result is determined as the task parameter total value of the node to be queried.
With continued reference to fig. 4, the above step S1041 is explained next.
In step S1042, the values of the completed task parameters of the node to be queried are determined according to the respective attribute parameters.
In some embodiments, the attribute parameters further include a completed duration and completion identification information, wherein the completed duration refers to a duration that the leaf node has completed, and the completion identification information is used to characterize whether the leaf node has completed the task. Referring to fig. 6, the above step S1042 may be implemented by the following steps S421 to S429, which are described in detail below.
In step S421, it is determined whether each attribute parameter includes an estimated time period.
In some embodiments, the implementation of step S421 is similar to the implementation of step S411 described above, and thus, the implementation of step S421 may refer to the implementation of step S411 described above.
In the embodiment of the present application, if each attribute parameter includes an estimated duration, step S422 is entered; if each attribute parameter does not include the estimated time period, the process proceeds to step S425.
In step S422, the completed time length of each She Zizi node is obtained, and each completed time length is accumulated to obtain a first completed task value.
When each attribute parameter comprises the estimated duration, the completed duration of each She Zizi node can be obtained from the analysis result of each She Zizi node; and then accumulating the completed time periods to obtain a fifth accumulated result, and determining the fifth accumulated result as a first completed task value.
In step S423, the completed subtask parameter values of each non-leaf child node are obtained, and the completed subtask parameter values are accumulated to obtain a second completed task value.
In some embodiments, the implementation of step S423 is similar to the implementation of step S415 described above, and thus, the implementation of step S423 may refer to the implementation of step S415 described above. The difference between the two steps is that step S423 is to obtain the completed subtask parameter value of the non-leaf child node by accumulating the completed time from bottom to top, and step S415 is to obtain the subtask parameter total value of the non-She Zizi node by accumulating the estimated time from bottom to top.
In step S424, the sum of the first completed task value and the second completed task value is determined as the completed task parameter value of the node to be queried.
In some embodiments, the first completed task value and the second completed task value are accumulated to obtain a sixth accumulated result, and the sixth accumulated result is determined as a completed task parameter value of the node to be queried.
In step S425, completion identification information of each She Zizi node is acquired.
When each attribute parameter does not include the estimated duration, the completion identification information of each She Zizi node can be obtained from the analysis result of each She Zizi node.
In step S426, the second node number of She Zizi nodes for which the completion identification information is the completed identification information is determined.
In some embodiments, the completion identification information may be completed identification information and incomplete identification information, wherein the completed identification information may be represented by a "1"; the incomplete identification information may be represented by "0". Based on this, the number of the completion identification information of "1" may be determined as the second node number.
In step S427, the second node number is determined as a third completed task value.
In step S428, the completed subtask parameter values of each non-leaf child node are obtained, and the completed subtask parameter values are accumulated to obtain a fourth completed task value.
In some embodiments, the implementation of step S428 is similar to the implementation of step S415 described above, and thus, the implementation of step S428 may refer to the implementation of step S415 described above. The difference between the two steps is that step S428 is to obtain the completed subtask parameter value of the non-She Zizi node by accumulating the number of She Zizi nodes with the completed identification information layer by layer from bottom to top, and step S415 is to obtain the subtask parameter total value of the non-She Zizi node by accumulating the estimated time period layer by layer from bottom to top.
In step S429, the sum of the third completed task value and the fourth completed task value is determined as the completed task parameter value of the node to be queried.
In some embodiments, the third completed task value and the fourth completed task value are accumulated to obtain a seventh accumulated result, and the seventh accumulated result is determined as a completed task parameter value of the node to be queried.
With continued reference to fig. 4, the above description is continued with step S1042.
In step S1043, the ratio of the completed task parameter value to the total task parameter value is determined as the node progress of the node to be queried.
In some embodiments, when the node to be queried is a leaf node, if the attribute parameter includes a predicted time length, directly determining the predicted time length of the leaf node as a task parameter total value of the node to be queried, and determining the completed time length of the leaf node as a completed task parameter value of the node to be queried; and finally, determining the ratio of the completed task parameter value to the total task parameter value as the node progress of the node to be queried.
In some embodiments, when the node to be queried is a leaf node, if the attribute parameter does not include the estimated duration, directly determining "1" as a task parameter total value of the node to be queried, and determining completion identification information of the leaf node as a completed task parameter value of the node to be queried; and finally, determining the ratio of the completed task parameter value to the total task parameter value as the node progress of the node to be queried.
In some embodiments, the node progress of the node to be queried may be output by means of a string, chart, video, audio, etc. When the node progress of the node to be queried is determined by the server, the server can send the node progress of the node to be queried to a terminal requesting progress query so as to display the node progress of the node to be queried through the terminal.
Through the steps S1041 to S1043, the node progress of the leaf node can be determined only by the attribute parameter of each leaf node in the infinite nested data structure, and the node progress of the non-leaf node is determined by using a step-by-step upward method, that is, the node progress of each node in the infinite nested data structure is automatically determined. Because the node to be queried belongs to the node in the infinite nested data structure, the node progress of the node to be queried can be automatically determined based on the attribute parameters of each leaf node, so that the automation degree and the efficiency of the node progress determination are improved, and the node progress determination time is shortened.
Through the steps S101 to S104, after receiving the progress query instruction, the node identifier carried in the progress query instruction is obtained; next, determining a node to be queried from all nodes included in the pre-built infinite nested data structure, wherein the infinite nested data structure can be used for representing a multi-level and multi-dimensional node structure; then, obtaining attribute parameters of each leaf node of the infinite nested data structure; and finally, determining the node progress of the node to be queried through each attribute parameter, and outputting the node progress of the node to be queried. Therefore, the node progress of the node to be queried can be automatically determined, and the degree of automation is improved; because the node to be queried belongs to the node in the infinite nested data structure, the node progress query in the multi-level and multi-dimensional node structure can be realized.
Based on the foregoing embodiment, before the step S101 is performed, referring to fig. 7, an infinite nested data structure corresponding to an item may also be constructed through the following steps S001 to S005, which will be described in detail below.
In step S001, an item creation instruction is received.
In the embodiment of the application, the creator identifier is carried in the project creation instruction.
In some embodiments, the project creation instructions are used to create a project, which may be, for example, an automotive production project, a development management project, an administrative approval project, a rehabilitation management project, and the like.
In step S002, in response to the item creation instruction, a first reference identification set having the item creation authority is acquired.
In some embodiments, the first reference identifier set includes a plurality of reference identifiers with permission to create the item, and the first reference identifier set may be preset in advance. Illustratively, the first reference identifier set may include an identifier of creator 1, an identifier of creator 2, an identifier of creator 3, an identifier of creator 4, and the like.
In step S003, when the creator identification exists in the first reference identification set, it is determined that the creator identification has the item creation authority.
In some embodiments, the creator identification is compared with respective reference identifications in the first set of reference identifications, and if there is a target reference identification identical to the creator identification in the reference identifications, the creator identification is characterized as being present in the first set of reference identifications, based on which the creator identification is determined as being an identification with project creation authority.
In some embodiments, if the creator identification is different from any one of the reference identifications, the characterization creator identification does not exist in the first reference identification set, based on which, it is determined that the creator identification is an identification without project creation authority, and the flow is directly ended.
In step S004, the dependency relationships between the nodes of different levels included in the item and the respective nodes are acquired.
In the embodiment of the application, the nodes are obtained by splitting the task step by step on the project.
In some embodiments, the dependency relationships between nodes of different levels and respective nodes contained by the project may be obtained by parsing the project creation instructions. For example, the different levels of nodes may include an automotive project, an engine production line, a frame production line, a tire production line, a seat production line, a rim strip manufacturing line, an inner tube manufacturing line, an outer tire manufacturing line, a screw manufacturing line, an antenna manufacturing line, and the like.
The automobile project comprises an engine production line, a frame production line, a tire production line and a father node of a seat production line, wherein the tire production line comprises a rim strip manufacturing line, an inner tube manufacturing line and a father node of an outer tube manufacturing line. The parent-child relationships of the characterization nodes are the dependency relationships among the nodes.
In step S005, an infinite nested data structure including each node is constructed according to each dependency.
In some embodiments, based on the respective dependency relationships, the method of depth-first search, breadth-first search, minimum spanning tree algorithm, adjacency list storage structure, etc. may be used to construct an infinitely nested data structure containing the respective nodes, i.e., to construct a tree structure. The infinite nested data structure can represent a multi-dimensional, multi-level node.
Through the steps S001 to S005, the creator having the project creation authority can create the project by performing authentication processing on the creator identifier; and a creator without the project creation authority cannot create the project, so that the order and the security of project creation are improved.
Based on the above embodiment, in order to improve the security of data query, the progress query instruction further carries a querier identifier, and before the step S102, the second reference identifier set with query rights for the node to be queried may be obtained from a preset rights table, where the preset rights table stores a mapping relationship between the node identifier of each node and the reference identifier set with query rights for each node; then, when the querier identification exists in the second reference identification set, the node progress of the node to be queried is determined and output.
In some embodiments, after receiving the progress query instruction and before determining the node to be queried, that is, between the step S101 and the step S102, a second reference identifier set is further obtained, and it is determined whether the querier identifier exists in the second reference identifier set, if the querier identifier exists in the second reference identifier set, it is determined that the querier identifier is an identifier having the query authority for the node to be queried, and the step S102 is entered. If the querier identification does not exist in the second reference identification set, the querier identification is determined to be the identification which does not have the query authority for the node to be queried, and the flow is ended. The identification of the inquirer is authenticated, so that the inquirer with the inquiring authority can inquire the node to be inquired, the inquirer without the inquiring authority is forbidden to inquire the node to be inquired, the hierarchical management of the data is improved, and the safety and confidentiality of the data are ensured.
In some embodiments, before the step S101, a preset permission table may be created in advance, and node identifiers of each node in the infinite nested data structure and a plurality of second reference identifiers having query permissions for each node may be obtained first; and then, establishing a mapping relation between each node identifier and a reference identifier set with query authority for the node corresponding to each node identifier, and obtaining a preset authority table.
In some embodiments, each node corresponds to at least one querier with query authority, i.e. the node identifier of each node may correspond to at least one second reference identifier with query authority. Based on the above, a mapping relation between each node identifier and a corresponding second reference identifier is established, so that a preset permission table is obtained. Thus, authentication basis can be provided for authentication processing of the inquirer identification.
In the following, an exemplary application of the embodiments of the present application in an actual cloud application scenario will be described.
The embodiment of the application is used for realizing high-efficiency and flexible rights management, providing an infinite nested task data structure and an automatic progress statistics algorithm, and refining access rights control through a user rights verification and application programming interface (Application Programming Interface, API) method. Meanwhile, a private cloud deployment scheme is supported, and a back-end service, an authentication center, a visual User Interface (UI) and an API layer are deployed by using a containerization technology, so that the system is ensured to be safe and efficient.
The data query method provided by the embodiment of the application can be applied to 5 scenes as shown in the following example.
Scenario 1, an internal project management system for a software development company. Project managers can create projects, products, modules and tasks, automatically calculate the completion progress of each level of tasks, and deploy the tasks in a private cloud environment, so that the safety of the internal data of a company is ensured.
Scenario 2, manufacturing company's production management system. The factory manager can create a production line, a product, a process flow and a task, automatically count the completion progress of each link and provide data support for production scheduling. Meanwhile, the safety of production data is ensured through private cloud deployment.
Scene 3, administrative approval system of security organization. The staff of the security organization can create approval projects, departments, processes and tasks, automatically calculate the completion progress of each level of tasks, and improve administrative approval efficiency. And through private cloud deployment, the security of confidential data is ensured.
And 4, the software development team hopes to construct an agile development management platform for members of the software development team, and the task of each development stage can be required to be checked and operated according to the authority among the members. By applying the technical scheme of the embodiment of the application, efficient task allocation and authority management can be realized, and team cooperation efficiency is improved.
In scenario 5, the medical institution needs to provide a private cloud deployment-based electronic rehabilitation management system for doctors, nurses and administrative staff, and the user can view and manage the patient data in charge of the user according to the authority. The technical scheme of the embodiment of the application can provide a powerful authority management function for the system and ensure the data security and compliance.
In some embodiments, creating the item may include the following steps one through five:
in step one, the statistical level may be divided into a plurality of dimensions, and infinite nesting may be performed by using the dimensions, and illustratively, the nesting may be in the form of items, products, modules, tasks, subtasks, and the like.
Step two, after the user authority is successfully checked, a project can be created by a API createProject method, and the project contains title, description, owner, createdAt, updatedAt and other parameter data; the server then stores the parameter data for the item in a database. Wherein title represents project name, title is character string form; the description represents the item description, which is also in the form of a character string; the owner represents a current project principal, which belongs to a user information set, and can be multiple, i.e. multiple creators exist, based on which the owner can be a plurality of groups; the createdAt represents a creation timestamp, and the createdAt is a character string or a null value; the updatedAt represents the latest updated timestamp, and the updatedAt is a string or a null value.
Step three, after a user successfully creates an item, a product can be created by a API createProduct method, and the product contains title, description, owner, labels, position, progress, id, createdAt, updatedAt and other parameter data; then, the server stores the parameter data of the product into the database. Wherein title represents the product name, title is in the form of character string; the description represents the product description, which is also in the form of a character string; the owner represents the current product responsible person, who belongs to the user information set, and can be multiple, i.e. multiple creators exist, based on which the owner can be a plurality of groups; labels represent the category of products, the classification of the products can be realized through different labels, the labels can comprise a classification name, a color and a classification identifier rid, and the labels belong to a classification set; the position represents the position of the current product in the project, and if the attention of the product is higher, the position of the product is smaller, namely the product is ranked forward, and progress is higher; the progress represents the progress of the product, the progress of all modules in the product can be deduced, the overall progress of the current product is obtained through automatic calculation, and the progress belongs to a numerical value set; id represents a product identifier, and id is a character string; the createdAt represents a creation timestamp, and the createdAt is a character string; the updatedAt represents the latest updated timestamp, and the updatedAt is a character string.
Step four, after the product is successfully created, a module can be created by an API createModule method, wherein the module comprises title, tags, owner, position, progress, id, createdAt, updatedAt, a task tree and other parameter data; the server then stores the parameter data in the database. Wherein title represents the module name, title is in the form of character string; tags represent product classification, are also in the form of character strings, and can be used for classifying modules through different tags; the owner represents the current module responsible person, which belongs to the user information set, and the current product responsible person can be multiple persons, namely, a plurality of creators exist, and based on the current module responsible person, the owner can be a plurality of groups; the position represents the position of the current module in the product, if the attention of the module is higher, the position of the module is smaller, namely, the module is arranged earlier, and the position belongs to a numerical value set; progress represents the progress of the module, and can be deduced by depending on the progress of all tasks in the module, so that the overall progress of the current module is automatically calculated, and the progress belongs to a numerical value set; id represents a module identifier, and id is a character string; the createdAt represents a creation timestamp, and the createdAt is a character string; the updatedAt represents the latest updated timestamp, and the updatedAt is a character string.
Fifthly, a Task tree in the module can comprise an infinitely recursive subtask, wherein tasks are infinitely recursive data structures, subTasks are data structures of another Task, and the Task data structures can comprise title, id, estimate, parentId, checked, subTasks and other parameter data, tasks represent Task data structures, titles represent Task names and belong to character string sets; id represents a task identifier, belonging to a character string set; the estinate represents the estimated duration of the task, and belongs to a representation value set or a null value; the pantId represents a parent node identifier, belongs to a character string set or a null value; the closed represents the completed identification, belonging to the Boolean value set or null value; subTasks represent subTasks, which belong to a power set of a task set, meaning all possible subsets of tasks, or null values.
In some embodiments, the structure is an infinitely nested data structure, i.e., item, product, module, task, sub-task, etc., based on the item. Two methods of determining the overall value of the task parameter are provided, as follows.
First, the user fills in the task tree with an estimated time (estimate). Because the embodiment of the application is an automatic progress statistics scheme, the task of each stage does not need to be assigned with corresponding time, but only the leaf node of the bottommost layer needs to be subjected to time estimation, namely, the estimated time is only assigned to the leaf node of the bottommost layer.
Because the task tree is a task tree which can be infinitely nested, if the estimated time of one task tree is required to be obtained, a Depth-First Search (DFS) is required to find the leaf node of the task tree, the estimated time of the internal node is obtained by accumulating the estimated time of the leaf node, and the estimated time is updated to the estimated time of the internal node, so that the estimated time of the internal node is updated once. Wherein, the internal node refers to nodes except the root node and the leaf node in the task tree. The estimated time corresponds to the estimated duration in other embodiments.
Formula (1);
the above formula (1) refers to a recursive function of the task tree, and characterizes that if a node is a leaf node, the estimated time of the leaf node is directly obtained; if the node is a non-leaf node, the estimated time of the node is obtained by accumulating the estimated time of each child node.
Based on this, the same method is used to traverse the accumulated internal nodes, as shown in formula (2), the estimated time of the node at the next higher level can be obtained until the root node of the task tree is traversed. Thus obtaining the estimated time of the whole tree. Referring to equation (3), and updating this value into the corresponding module, the estimated time of the primary module is obtained.
Formula (2);
wherein,is->Is a child node of (1), and->Comprises->And a child node.
Formula (3);
wherein,representing the estimated time of the module->Representing the task node comprised by the module, i.e. the root node comprised by the module.
And by analogy, the estimated time of the product and the project can be obtained, so that the estimated time can be determined as the total progress value. The total progress value corresponds to the total task parameter value in other embodiments.
Second, if the estimated time is not included in the parameter values, the progress total value is determined as follows.
At this point, the depth-first algorithm is still used, but the estimated time is no longer determined, but the number of subtasks is determined. Referring to equation (4), if there are subtasks, leaf nodes continue to be found all the time, and the total number is counted and updated onto the internal nodes of the task tree. And by analogy, obtaining the total progress value of the root node.
Formula (4);
in the formula (4), if the node is a leaf node, the total progress value of the node is represented as 1; if the node is a non-leaf node, the number of sub-tasks of the sub-node of the node is accumulated,representation->The child nodes represented.
By the same method, the total progress value of the module, the product and the project can be obtained. Wherein the total progress value of the module can be determined by the following formula (5).
Equation (5);
wherein,representing the total value of the progress of the module,/->The representation module contains the number of root nodes,indicating the number of tasks at the next level.
In some embodiments, after obtaining the estimated total progress value, it is also necessary to determine the current completed progress, and then use the percentage to represent the progress. Wherein the completed progress corresponds to the completed task parameter values in other embodiments.
And traversing the task tree by using the DFS for determining the completed progress of the task level, finding out leaf nodes, judging a completion (closed) attribute, and identifying whether the sub-node task is completed. When all child nodes have completed, the progress of the internal node owning those child nodes is marked as 100%, and the completion attribute is modified true (true). If the current local node has 4 leaf node tasks and the completion attribute of the task states of 3 leaf nodes is true, the task calculation result of the local node is 3/4, namely 75%, and the determination formula is shown in formula (6):
equation (6);
Wherein,indicating completed progress->Representing the total value of progress>Indicating progress or task progress.
The embodiment of the application adopts the concept of stepwise recursion, and the local nodes of each level and each current level are marked with progress, so that the root node and the task progress of a higher level are always searched. In some embodiments, the progress may also be determined using an average of the progress of all local nodes currently to optimize the progress.
In some embodiments, the local node task progress algorithm may refer to the following equation (7), where local nodes refer to nodes in the task tree other than root and leaf nodes.
Equation (7);
in the above formula (7), if the node is a leaf node and the completion attribute is true, the task progress is 1; if the node is a leaf node and the completion attribute is false, the task progress is 0; if the node is a non-leaf node, the task progress is the sum of the task progress of each child node of the node.
In some embodiments, the root node task progress optimization algorithm is as shown in equation (8):
equation (8);
in the above formula (8), if the root node is a leaf node, the result of the formula (6) may be directly determined as the task progress of the root node; if the root node is a non-leaf node, determining an average value of task progress of the leaf node of the root node as the task progress of the root node.
In some embodiments, the progress scheme for obtaining a module may be: and obtaining all task progress under the current module, and obtaining the overall progress of the current module in an average progress obtaining mode. Let T be the set of all root node tasks in the module, n be the number of root node tasks, a recursive function will be usedTo determine the progress of each task.
Equation (9);
in the above-mentioned formula (9),representing the progress of the module or the task progress of the module.
In some embodiments, the progress method of the product and the project is analogized, and the progress of the product can be obtained by the average value of the tasks of the module.
In the embodiment of the application, private cloud deployment may be implemented in the following manner, including:
in the privateization cluster (node), a containerization scheme is used for deploying the back-end service of the storage progress, and an authentication center of the processing authority, a visual UI and an API layer in different containers respectively.
The reverse proxy server (e.g., nmginx) is installed in front of the container, SSL termination is enabled to ensure transport layer security. By configuring access control and speed limiting, the container can be protected from malicious requests to ensure the security of the container. Client requests may be distributed to different backend container instances to achieve load balancing.
The Docker network and service discovery are used to ensure that the communication between them is normal. Creating a custom network: docker network create- -driver bridge my-network; connecting the container to a custom network: dock run-net = my-network-name container1 < image1>; and resolving the container name by using a DNS service built in the Docker to realize service discovery.
Using a YAML file that installs and configures Kubernetes clusters, write deployments (deployments) and services (services), define containers and Service discovery rules that need to be deployed. The use of kubectl command to apply YAML files to clusters ensures that the container will have a backup scheme to start even if it encounters a problem.
In the embodiment of the application, the rights management may be implemented in the following manner, including:
the server database imports user information in a privately-arranged part in advance and is used for identifying all user information with authority in the current privately-arranged environment. This data should contain the unique identification of the user (e.g., username, ID, etc.) and other necessary public information. This data is saved as a CSV or JSON formatted file.
The database table structure is designed to create a new table in the database to store these user information. This table should contain all the fields (e.g., id, username, etc.) required for the user data described above.
Three exemplary creation schemes are provided herein for selecting an appropriate database (e.g., mySQL, postgreSQL, mongoDB, etc.) and importing the consolidated data into the created user table using an appropriate tool. The following are some exemplary methods of importation.
Import method 1 MySQL uses LOAD DATA INFILE statement or mysqlimport tool to import CSV files into MySQL database.
Import method 2, postgreSQL imports CSV files into the PostgreSQL database using COPY statements or pgAdmin tools.
Import method 3, mongoDB imports JSON file into MongoDB database using mongomport command.
And sending the user name and the password to the server through the API to carry out login verification, and checking whether the provided user name or ID exists in the user table or not by inquiring the user table in the database, so that only the user imported into the database can access the privateization environment.
The server may assign (assign) users to different content, such as items, products, modules, tasks, etc., and only see the corresponding assigned content. The authentication center of the server receives the user name of the current user and the uin in the cookie, wherein after the user logs in, the user can send the user name of the current user and the uin in the cookie in an API (application program interface) form through the get verification, if the current user has no authority, the verification is failed, and the back end outputs 403 an error; if the current user has the authority, the back end encrypts the information after the user authentication is successful in a cookie through an idToken form, and returns the information to the user.
After the authority verification passes, as the cookie has the idToken, the server is requested by using an API using method getProjects ({ userInfo, idToken }), and the server firstly decodes the identity verification token (decode idToken) to judge that the current user has the corresponding authority, and if the verification passes, other parameters are used to acquire all item information of the user.
After entering an project of an assignment current user, the current project id is added in the request URL, and the method is used through an APIAnd requesting the server, wherein the server firstly decodes the identity verification token, judges that the current user has corresponding authority, and obtains the related data of the product by using other parameters if the verification is passed. Wherein the parameter user information (userInfo) is optional padding, and if the parameter is not transferred, the back end returns to the current item (projectId)Some products; if the user information is filled, the data distributed to the current user is checked for screening.
After entering a product distributed to the current user, the current product id is added in the request URL, and the method is used through the APIThe request server firstly decodes the authentication token, judges that the current user has corresponding authority, and if the authentication is passed, uses other parameters to acquire all modules of the user in the current product. The user information is selected and filled, and if the user information parameters are not transmitted, the back end returns to all modules under the current product; if the user information is filled in, the data distributed to the current user is checked and screened.
After entering a module of a designated user, the request URL will add the current module id, using the method through the APIAnd requesting a server. The server first decodes the authentication token and judges that the current user has corresponding authority. If the verification is passed, all tasks in the current module are acquired by using other parameters, and the tasks comprise an infinitely recursive task tree. The user information is selected and filled, and if the parameter of the user information is not transmitted, the back end returns all tasks under the current module; if the user information is filled in, the task allocated to the current user is checked and screened.
In the embodiment of the application, the task tree is an infinite recursion data structure, and the subtasks are another task tree data structure.
According to the data query method provided by the embodiment of the application, the multi-level task relationship is realized through the infinitely nested task data structure, so that task management is clearer, follow-up and arrangement of tasks at all levels are facilitated, and flexible task management is realized. Based on the estimated time or the task number filled by the user, the completion progress of each level of tasks is automatically calculated, the project management efficiency is effectively improved, the user is helped to know the project progress condition in real time, and automatic progress statistics is realized. And the authority management mechanism is adopted to carry out hierarchical control on the access authority of the user, so that the user with corresponding authority can only access related information, the data security is ensured, and the refined authority control is ensured. The method realizes the deployment of the back-end service, the authentication center, the visual UI and the API layer in the privately-owned cluster by utilizing the containerization technology, and meets the requirements of enterprises on data security, system stability and expandability. The method is convenient to integrate with other systems through an API method, supports new function expansion, and meets personalized requirements of different enterprises. The method can help enterprises optimize project management processes, and improve team cooperation efficiency, so that overall productivity is improved.
It can be appreciated that in the embodiments of the present application, related data such as node identifiers, dependencies, attribute parameters, and the like are involved, and the collection, use, and processing of the related data is required to comply with related laws and regulations and standards of related countries and regions.
Continuing with the description below of an exemplary structure implemented as a software module for the data querying device 455 provided in embodiments of the present application, in some embodiments, as shown in fig. 2, the software module stored in the data querying device 455 of the memory 450 may include:
the first obtaining module 4551 is configured to obtain a node identifier carried in a progress query instruction in response to a received progress query instruction;
a first determining module 4552, configured to determine a node to be queried from each node included in a pre-constructed infinite nested data structure, where the infinite nested data structure is constructed based on each node of an item and a dependency relationship between each node;
a second obtaining module 4553, configured to obtain attribute parameters of each leaf node in the infinite nested data structure;
and the second determining module 4554 is configured to determine a node progress of the node to be queried according to each attribute parameter, and output the node progress of the node to be queried.
In some embodiments, the second determining module 4554 is further configured to:
when the node to be queried is a non-leaf node, determining a task parameter total value of the node to be queried according to each attribute parameter;
determining the completed task parameter values of the nodes to be queried according to the attribute parameters;
and determining the ratio of the completed task parameter value to the total task parameter value as the node progress of the node to be queried.
In some embodiments, the second determining module 4554 is further configured to:
when the attribute parameters comprise estimated time length, acquiring sub-nodes of the node to be queried;
determining She Zizi nodes and non-She Zizi nodes from all child nodes of the node to be queried;
obtaining estimated time length of each leaf child node, and accumulating the estimated time length of each leaf child node to obtain a first task total value;
acquiring the total subtask value of each non-leaf child node, and accumulating the total subtask value of each non-leaf child node to obtain a second total subtask value;
and determining the sum of the first task total value and the second task total value as the task parameter total value of the node to be queried.
In some embodiments, the second determining module 4554 is further configured to:
acquiring the completed time length of each She Zizi node, and accumulating each completed time length to obtain a first completed task value;
acquiring the completed subtask parameter values of the non-leaf sub-nodes, and accumulating the completed subtask parameter values to obtain a second completed task value;
and determining the sum of the first completed task value and the second completed task value as the completed task parameter value of the node to be queried.
In some embodiments, the second determining module 4554 is further configured to:
when the attribute parameters do not include the estimated time length, acquiring each child node of the node to be queried, wherein the child nodes are leaf child nodes or non-leaf child nodes;
acquiring the number of first nodes belonging to She Zizi nodes in all child nodes of the node to be queried, and determining the number of the first nodes as a third task total value;
acquiring the total value of the subtask parameters of each non-leaf child node, and accumulating the total value of each subtask parameter to obtain a fourth task total value;
and determining the sum of the third task total value and the fourth task total value as the task parameter total value of the node to be queried.
In some embodiments, the second determining module 4554 is further configured to:
acquiring the completion identification information of each She Zizi node;
determining the number of second nodes of She Zizi nodes with the completed identification information;
determining the number of the second nodes as a third completed task value;
acquiring the completed subtask parameter values of the non-leaf sub-nodes, and accumulating the completed subtask parameter values to obtain a fourth completed task value;
and determining the sum of the third completed task value and the fourth completed task value as the completed task parameter value of the node to be queried.
In some embodiments, the data querying device 455 further includes:
the first receiving module is used for receiving an item creation instruction, wherein the item creation instruction carries a creator identifier;
the third acquisition module is used for responding to the project creation instruction and acquiring a first reference identifier set with project creation permission;
a third determining module, configured to determine that the creator identifier has an item creation authority when the creator identifier exists in the first reference identifier set;
a fourth obtaining module, configured to obtain dependency relationships between nodes of different levels included in the item and each node, where the nodes are obtained by splitting a task step by step on the item;
And the construction module is used for constructing an infinite nested data structure containing each node according to each dependency.
In some embodiments, the data querying device 455 further includes:
a fifth obtaining module, configured to obtain, from a preset authority table, a second reference identifier set having a query authority for the node to be queried, where a mapping relationship between a node identifier of each node and a reference identifier set having a query authority for each node is stored in the preset authority table;
and the fourth determining module is used for determining and outputting the node progress of the node to be queried when the querier identifier exists in the second reference identifier set.
In some embodiments, the data querying device 455 further includes:
a sixth obtaining module, configured to obtain node identifiers of each node in the infinite nested data structure and a plurality of second reference identifiers having query rights for each node;
the establishing module is used for establishing a mapping relation between each node identifier and a reference identifier set with query authority for the node corresponding to each node identifier to obtain the preset authority table.
It should be noted that, the description of the data query device in the embodiments of the present application is similar to the description of the data query method embodiment described above, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the data query device, please refer to the description of the embodiments of the data query method of the present application for understanding.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the data query method according to the embodiment of the application.
Embodiments of the present application provide a computer-readable storage medium having stored therein executable instructions that, when executed by a processor, cause the processor to perform a data query method provided by embodiments of the present application, for example, the data query method as shown in fig. 3 and 7.
In some embodiments, the computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; but may be a variety of devices including one or any combination of the above memories.
In some embodiments, the executable instructions may be in the form of programs, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, the executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a hypertext markup language (Hyper Text Markup Language, HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
As an example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or, alternatively, distributed across multiple sites and interconnected by a communication network.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and scope of the present application are intended to be included within the scope of the present application.

Claims (10)

1. The data query method is characterized by being applied to a private cloud, wherein the private cloud comprises a back-end service deployed in a containerization mode, an authentication center, a visual user interface and an application program interface layer; the method comprises the following steps:
Integrating with other systems through the application program interface layer, and expanding new functions of the private cloud;
dividing the statistical level of the infinite nested data structure into a plurality of dimensions of infinite nesting, and creating the plurality of dimensions of infinite nesting through the application program interface layer when the authentication center authenticates that a user has project creation rights, wherein the plurality of dimensions of infinite nesting comprise projects, products, modules, tasks, subtasks and subtasks;
receiving unique identification information of the user through the application program interface layer, wherein the unique identification information comprises a user name and a password of the user;
when the unique identification information of the user exists in a user table in a database, determining that the user can access the private cloud, wherein the user table contains the unique identification information of each user and item information accessible by the user;
responding to a received progress query instruction, and acquiring a node identifier carried in the progress query instruction;
the progress query instruction carries an item serial number and an identity verification token;
when the authentication token is decoded through the authentication center to determine that the user has query rights, the item serial number is returned through the back-end service, wherein the query rights are configured for nodes of different levels in a hierarchical manner and are used for enabling only users with corresponding rights to access related nodes;
When the progress query instruction does not contain user information parameters, returning all products corresponding to the item serial numbers through the back-end service; when the progress query instruction contains the user information parameters, returning the project information accessible to the user through the back-end service;
returning the product information through the backend service when entering a product that is assigned to the user and when decoding the authentication token through the authentication center to determine that the user has the query rights for the product;
when the progress query instruction does not contain the user information parameters, returning all module information of the product through the back-end service; when the progress query instruction contains the user information parameters, returning the user accessible item information corresponding to the product through the back-end service;
returning the module information through the backend service when entering a module of one of the users and when decoding the authentication token through the authentication center to determine that the user has the module's query rights;
when the progress query instruction does not contain the user information parameters, returning all task information of the module through the back-end service; when the progress query instruction contains the user information parameters, returning the user accessible project information corresponding to the module through the back-end service;
Determining a node to be queried from all nodes included in the pre-built infinite nested data structure, wherein the infinite nested data structure is built based on all nodes of different levels of items and dependency relations among all nodes;
acquiring attribute parameters of each leaf node in the infinite nested data structure;
when the node to be queried is a non-leaf node and each attribute parameter comprises estimated time length, determining She Zizi nodes and non-She Zizi nodes from all sub-nodes of the node to be queried, wherein the leaf sub-nodes are the bottommost layers of task trees;
acquiring estimated time lengths filled in each She Zizi node of the task tree, and accumulating the estimated time lengths of each leaf child node to obtain a first task total value;
traversing the nodes of the previous level from the nodes of each She Zizi until traversing the root node of the task tree to perform the following processing: acquiring the total value of the subtask parameters of each non-leaf child node, and accumulating the total value of the subtask parameters of each non-leaf child node to obtain a second total value of the tasks;
determining the sum of the first task total value and the second task total value as the task parameter total value of the node to be queried;
When the attribute parameters do not include the estimated time length, each child node of the node to be queried is obtained, wherein the child node is the leaf child node or the non-She Zizi node;
acquiring the number of first nodes belonging to the She Zizi node in each child node of the node to be queried, and determining the number of the first nodes as a third task total value;
acquiring the total value of the subtask parameters of each non-leaf child node, and accumulating the total value of the subtask parameters to obtain a fourth total value of the tasks;
determining the sum of the third task total value and the fourth task total value as a task parameter total value of the node to be queried;
determining the completed task parameter values of the nodes to be queried according to the attribute parameters;
and determining the ratio of the completed task parameter value to the task parameter total value as the node progress of the node to be queried, storing the node progress through the back-end service, and outputting the node progress of the node to be queried through the visual user interface.
2. The method according to claim 1, wherein the attribute parameters further include a completed time period, and the determining the completed task parameter value of the node to be queried according to the respective attribute parameters includes:
Acquiring the completed time length of each She Zizi node, and accumulating each completed time length to obtain a first completed task value;
acquiring the completed subtask parameter values of the non-leaf sub-nodes, and accumulating the completed subtask parameter values to obtain a second completed task value;
and determining the sum of the first completed task value and the second completed task value as the completed task parameter value of the node to be queried.
3. The method according to claim 1, wherein the attribute parameters further include completion identification information, and the determining the completed task parameter value of the node to be queried according to the respective attribute parameters includes:
acquiring the completion identification information of each She Zizi node;
determining the number of second nodes of She Zizi nodes with the completed identification information;
determining the number of the second nodes as a third completed task value;
acquiring the completed subtask parameter values of the non-leaf sub-nodes, and accumulating the completed subtask parameter values to obtain a fourth completed task value;
and determining the sum of the third completed task value and the fourth completed task value as the completed task parameter value of the node to be queried.
4. A method according to any one of claims 1 to 3, further comprising:
receiving an item creation instruction, wherein the item creation instruction carries a creator identifier;
responding to the project creation instruction, and acquiring a first reference identifier set with project creation permission;
determining that the creator identification has project creation rights when the creator identification exists in the first reference identification set;
acquiring the dependency relationship between nodes of different levels contained in the project and each node, wherein the nodes are obtained by carrying out step-by-step task splitting on the project;
and constructing an infinite nested data structure containing each node according to each dependency.
5. A method according to any one of claims 1 to 3, wherein the progress query instruction further carries a querier identification, the method further comprising:
obtaining a second reference identifier set with query rights to the node to be queried from a preset rights table, wherein the preset rights table stores the mapping relationship between the node identifiers of all nodes and the reference identifier set with query rights to all nodes;
And when the querier identification exists in the second reference identification set, determining and outputting the node progress of the node to be queried.
6. The method as recited in claim 5, wherein the method further comprises:
acquiring node identifiers of all nodes in the infinite nested data structure and a plurality of second reference identifiers with query rights for all the nodes;
and establishing a mapping relation between each node identifier and a reference identifier set with query authority for the node corresponding to each node identifier, and obtaining the preset authority table.
7. The data query device is characterized by being applied to a private cloud, wherein the private cloud comprises a back-end service deployed in a containerization mode, an authentication center, a visual user interface and an application program interface layer; the device comprises:
the first acquisition module is used for integrating with other systems through the application program interface layer and expanding the new functions of the private cloud; dividing the statistical level of the infinite nested data structure into a plurality of dimensions of infinite nesting, and creating the plurality of dimensions of infinite nesting through the application program interface layer when the user has the project creation right through the authentication of the authentication center, wherein the plurality of dimensions of infinite nesting comprise projects, products, modules, tasks, subtasks and subtasks; receiving unique identification information of the user through the application program interface layer, wherein the unique identification information comprises a user name and a password of the user; when the unique identification information of the user exists in a user table in a database, determining that the user can access the private cloud, wherein the user table contains the unique identification information of each user and item information accessible by the user; responding to a received progress query instruction, and acquiring a node identifier carried in the progress query instruction; the progress query instruction carries an item serial number and an identity verification token;
The first determining module is used for returning the item serial number through the back-end service when the authentication token is decoded through the authentication center to determine that the user has the inquiry authority, wherein the inquiry authority is configured for nodes of different levels in a hierarchical mode and is used for enabling only the user with corresponding authority to access the related nodes;
when the progress query instruction does not contain user information parameters, returning all products corresponding to the item serial numbers through the back-end service; when the progress query instruction contains the user information parameters, returning the project information accessible to the user through the back-end service;
returning the product information through the backend service when entering a product that is assigned to the user and when decoding the authentication token through the authentication center to determine that the user has the query rights for the product;
when the progress query instruction does not contain the user information parameters, returning all module information of the product through the back-end service; when the progress query instruction contains the user information parameters, returning the user accessible item information corresponding to the product through the back-end service;
Returning the module information through the backend service when entering a module of one of the users and when decoding the authentication token through the authentication center to determine that the user has the module's query rights;
when the progress query instruction does not contain the user information parameters, returning all task information of the module through the back-end service; when the progress query instruction contains the user information parameters, returning the user accessible project information corresponding to the module through the back-end service;
determining a node to be queried from all nodes included in the pre-built infinite nested data structure, wherein the infinite nested data structure is built based on all nodes of different levels of items and dependency relations among all nodes;
the second acquisition module is used for acquiring attribute parameters of each leaf node in the infinite nested data structure;
the second determining module is used for determining She Zizi nodes and non-She Zizi nodes from all sub-nodes of the node to be queried when the node to be queried is a non-leaf node and each attribute parameter comprises estimated duration, wherein the leaf sub-node is the bottommost layer of the task tree; acquiring estimated time lengths filled in each She Zizi node of the task tree, and accumulating the estimated time lengths of each leaf child node to obtain a first task total value; traversing the nodes of the previous level from the nodes of each She Zizi until traversing the root node of the task tree to perform the following processing: acquiring the total value of the subtask parameters of each non-leaf child node, and accumulating the total value of the subtask parameters of each non-leaf child node to obtain a second total value of the tasks; determining the sum of the first task total value and the second task total value as the task parameter total value of the node to be queried;
When the attribute parameters do not include the estimated time length, each child node of the node to be queried is obtained, wherein the child node is the leaf child node or the non-She Zizi node; acquiring the number of first nodes belonging to the She Zizi node in each child node of the node to be queried, and determining the number of the first nodes as a third task total value; acquiring the total value of the subtask parameters of each non-leaf child node, and accumulating the total value of the subtask parameters to obtain a fourth total value of the tasks; determining the sum of the third task total value and the fourth task total value as a task parameter total value of the node to be queried;
determining the completed task parameter values of the nodes to be queried according to the attribute parameters;
and determining the ratio of the completed task parameter value to the task parameter total value as the node progress of the node to be queried, storing the node progress through the back-end service, and outputting the node progress of the node to be queried through the visual user interface.
8. A computer device, the device comprising:
a memory for storing computer executable instructions;
A processor for implementing the data query method of any one of claims 1 to 6 when executing computer-executable instructions stored in the memory.
9. A computer readable storage medium storing computer executable instructions which when executed by a processor implement the data query method of any one of claims 1 to 6.
10. A computer program product comprising a computer program or computer-executable instructions which, when executed by a processor, implements the data query method of any of claims 1 to 6.
CN202310863964.8A 2023-07-14 2023-07-14 Data query method, device, computer equipment and computer program product Active CN116595057B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310863964.8A CN116595057B (en) 2023-07-14 2023-07-14 Data query method, device, computer equipment and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310863964.8A CN116595057B (en) 2023-07-14 2023-07-14 Data query method, device, computer equipment and computer program product

Publications (2)

Publication Number Publication Date
CN116595057A CN116595057A (en) 2023-08-15
CN116595057B true CN116595057B (en) 2024-02-27

Family

ID=87599400

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310863964.8A Active CN116595057B (en) 2023-07-14 2023-07-14 Data query method, device, computer equipment and computer program product

Country Status (1)

Country Link
CN (1) CN116595057B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107705029A (en) * 2017-10-17 2018-02-16 北京恒华龙信数据科技有限公司 A kind of computational methods and system of engineering construction progress
CN108197909A (en) * 2018-03-24 2018-06-22 浙江鼎力工程项目管理有限公司 A kind of project process supervision control system
CN113177749A (en) * 2021-06-29 2021-07-27 武汉华信数据系统有限公司 Resource management method and device
CN114840574A (en) * 2022-04-12 2022-08-02 深信服科技股份有限公司 Data query method, server, node and storage medium
CN115049369A (en) * 2022-06-24 2022-09-13 广东电网有限责任公司 Project management method and device, electronic equipment and storage medium
WO2023050705A1 (en) * 2021-09-30 2023-04-06 苏州浪潮智能科技有限公司 Monitoring data management method and apparatus, electronic device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107705029A (en) * 2017-10-17 2018-02-16 北京恒华龙信数据科技有限公司 A kind of computational methods and system of engineering construction progress
CN108197909A (en) * 2018-03-24 2018-06-22 浙江鼎力工程项目管理有限公司 A kind of project process supervision control system
CN113177749A (en) * 2021-06-29 2021-07-27 武汉华信数据系统有限公司 Resource management method and device
WO2023050705A1 (en) * 2021-09-30 2023-04-06 苏州浪潮智能科技有限公司 Monitoring data management method and apparatus, electronic device and storage medium
CN114840574A (en) * 2022-04-12 2022-08-02 深信服科技股份有限公司 Data query method, server, node and storage medium
CN115049369A (en) * 2022-06-24 2022-09-13 广东电网有限责任公司 Project management method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姚世峰.《城市轨道交通云计算应用指南》.北京:中国铁道出版社,2020,第56-67页. *

Also Published As

Publication number Publication date
CN116595057A (en) 2023-08-15

Similar Documents

Publication Publication Date Title
CN109688120B (en) Dynamic authority management system based on improved RBAC model and Spring Security framework
US7949569B2 (en) Distributed device information management system as a distributed information repository system
US9729592B2 (en) System and method for distributed virtual assistant platforms
US8819068B1 (en) Automating creation or modification of database objects
US20150067503A1 (en) System and method for virtual assistants with agent store
US20170078392A1 (en) Federation and Inter-Organization Collaboration in Data Analysis
WO2015031486A1 (en) System and method for virtual assistants with shared capabilities and agent store
CN105830049A (en) Automated experimentation platform
US11032288B2 (en) Method, apparatus, and computer program product for managing access permissions for a searchable enterprise platform
US9830385B2 (en) Methods and apparatus for partitioning data
JP7453426B2 (en) Network management systems, methods, devices and electronic equipment
US10469584B2 (en) Techniques and architectures for managing disparate heterogeneous cloud-based resources
US20210225072A1 (en) Generating space models from map files
US9823922B1 (en) Source code mapping through context specific key word indexes and fingerprinting
CN113987541A (en) Data access control method and device and electronic equipment
CN111858615A (en) Database table generation method, system, computer system and readable storage medium
JP2022505223A (en) Universal governance
WO2015039105A1 (en) System and method for distributed virtual assistant platforms
US20190332713A1 (en) Methods and systems for managing physical spaces, associated devices, and users
CN111339193B (en) Category encoding method and device
TW201710944A (en) System and method for authentication
US11409724B2 (en) Hashed balanced tree data structure
CN116595057B (en) Data query method, device, computer equipment and computer program product
US11803677B2 (en) Dynamic asset management system and methods for generating interactive simulations representing assets based on automatically generated asset records
CN115543428A (en) Simulated data generation method and device based on strategy template

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
GR01 Patent grant
GR01 Patent grant