Device information retrieval method based on position tree and medium

By constructing a location tree-based equipment information retrieval method, and utilizing multidimensional location vectors and B+ tree data structures, the problem of low efficiency in equipment information retrieval in large-scale equipment management systems is solved, enabling fast and accurate equipment positioning and management.

CN121457571APending Publication Date: 2026-02-03CHINA NATIONAL OFFSHORE OIL (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511516189.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing technologies in large-scale equipment information management systems suffer from inefficient equipment information retrieval methods with slow response times. This is especially problematic when there is a large number of devices with complex location relationships, making it difficult to achieve fast and accurate equipment positioning.

Method used

A device information retrieval method based on location tree is constructed. By building a multi-dimensional location vector and location tree, and using the B+ tree data structure, device information can be retrieved quickly, including location information management of multiple dimensions such as device ID, geographical block, building, and room number.

Benefits of technology

It enables rapid and accurate location of equipment information, adapts to the needs of large-scale equipment management, and has good scalability, practicality and efficiency, shortening equipment retrieval time and improving equipment management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121457571A_ABST
    Figure CN121457571A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment information retrieval method based on a position tree and a medium. The method comprises the following steps: constructing a position vector: constructing a multi-dimensional position vector of equipment according to multi-dimensional data of the equipment; constructing a position tree: constructing the position tree of the equipment through the multi-dimensional position vector of the equipment; and equipment information retrieval: performing downward retrieval from a root node of the position tree according to the position vector dimension of the equipment until a leaf node corresponding to the multi-dimensional position vector is retrieved, and obtaining corresponding equipment information from the leaf node. According to the device information retrieval method based on the position tree, rapid and accurate device information positioning is achieved, the requirement for large-scale device information management can be met, and good expansibility, practicability and high efficiency are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information retrieval, and in particular to a device information retrieval method based on a position tree and a medium. BACKGROUND

[0002] With the rapid development of technologies such as the Internet of Things, smart buildings, and smart cities, the number and variety of devices have increased dramatically, and the importance of device information management and location tracking has become increasingly prominent. In large device information management systems, existing technologies have low efficiency and slow response speed in device information retrieval methods, especially in cases where the number of devices is large and the location relationship is complex, these problems become more prominent. SUMMARY

[0003] The technical problem to be solved by the present application is to provide a device information retrieval method based on a position tree and a medium, which solves at least one of the defects of the related art mentioned in the background art: the device information retrieval method has low efficiency and slow response speed.

[0004] The technical solution adopted by the present application to solve its technical problem is: constructing a device information retrieval method based on a position tree, comprising the following steps: Building a position vector: constructing a multi-dimensional position vector of a device according to multiple dimensional data of the device; Building a position tree: constructing a position tree of the device through the multi-dimensional position vector of the device; Device information retrieval: retrieving from the root node of the position tree according to the dimension of the position vector of the device, until the leaf node corresponding to the multi-dimensional position vector is retrieved, and obtaining the corresponding device information from the leaf node.

[0005] In some embodiments, the step of constructing a position vector comprises: Collecting multi-dimensional information parameters of different positions of the device, and defining a multi-dimensional position vector according to a preset method; Standardizing the multi-dimensional position vector to obtain a standardized multi-dimensional position vector; Storing the standardized multi-dimensional position vector to a database.

[0006] In some embodiments, storing the standardized multi-dimensional position vector to a database comprises: storing the standardized multi-dimensional position vector to the database in the form of a table; each dimension of the multi-dimensional position vector corresponds to a different field in the table.

[0007] In some embodiments, the multi-dimensional position vector is a multi-dimensional position vector with a timestamp; The step of constructing a position vector further comprises updating the multi-dimensional position vector according to the timestamp attached to the multi-dimensional position vector.

[0008] In some embodiments, the step of constructing the location tree comprises: converting the multi-dimensional location vector into a sub-node of the location tree, thereby constructing the location tree storing the device information; the sub-node comprises an internal node and / or a leaf node; the internal node is used to retrieve the corresponding leaf node; and the leaf node stores the device information.

[0009] In some embodiments, the step of constructing the location tree is followed by the step of inserting the multi-dimensional location vector into the constructed location tree. The step of inserting the multi-dimensional location vector into the constructed location tree comprises: finding the insertion position: starting from the root node of the location tree, finding the leaf node corresponding to the multi-dimensional location vector to be inserted; inserting the device information: directly storing the device information corresponding to the multi-dimensional location vector into the leaf node.

[0010] In some embodiments, the step of finding the insertion position comprises: starting from the root node of the location tree, finding the first sub-node corresponding to the multi-dimensional location vector according to the joint index of the multi-dimensional location vector; entering the first sub-node, finding the second sub-node corresponding to the multi-dimensional location vector according to the joint index of the multi-dimensional location vector; repeating the traversal step until the leaf node corresponding to the multi-dimensional location vector is found.

[0011] In some embodiments, the step of inserting the device information comprises: judging whether the leaf node to be inserted with the device information exceeds the maximum capacity after the insertion of the device information, and if not, directly inserting; if yes, splitting the leaf node to be inserted with the device information and then inserting the device information.

[0012] In some embodiments, the step of splitting the leaf node to be inserted with the device information comprises: sorting the device information of the leaf node according to the location vector, and dividing the sorted device information into a left part and a right part; inserting the minimum location vector in the right part and the device information thereof into the parent node of the leaf node.

[0013] The application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the device information retrieval method based on the location tree according to any one of the above embodiments.

[0014] By implementing the application, the following beneficial effects are achieved: The application constructs a position vector: constructs a multi-dimensional position vector of the device according to multi-dimensional data of the device; constructs a position tree: constructs a position tree of the device through the multi-dimensional position vector of the device; device information retrieval: according to the dimension of the position vector of the device, searches from the root node of the position tree downward until the leaf node corresponding to the multi-dimensional position vector is searched, and obtains the corresponding device information from the leaf node. The device information retrieval method based on the position tree realizes fast and accurate device information positioning, can adapt to large-scale device information management requirements, and has good expansibility, practicality and high efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0015] The application will be further described below in combination with the drawings and embodiments, and the drawings show: Figure 1 A flow chart of an embodiment of the device retrieval method based on the position tree of the application is shown; Figure 2 A flow chart of the position vector construction step of an embodiment of the device retrieval method based on the position tree of the application is shown; Figure 3 A flow chart of the insertion position searching step of an embodiment of the device retrieval method based on the position tree of the application is shown; Figure 4 A position tree schematic diagram of two-dimensional position vector construction of an embodiment of the device retrieval method based on the position tree of the application is shown; Figure 5 A flow chart of all steps of an embodiment of the device retrieval method based on the position tree of the application is shown. DETAILED DESCRIPTION

[0016] In order to have a clearer understanding of the technical features, objects and effects of the application, the specific embodiments of the application will be described in detail with reference to the drawings.

[0017] It should be noted that the flow chart shown in the drawings is only illustrative, and does not necessarily include all the contents and operations / steps, nor does it necessarily execute in the order described. For example, some operations / steps can be further divided, and some operations / steps can be combined or partially combined, so the actual execution order may be changed according to the actual situation.

[0018] The block diagram shown in the drawings is only a functional entity, and does not necessarily correspond to a physically independent entity. That is, the functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0019] As Figure 1As shown, the present application discloses a device information retrieval method based on a position tree, comprising the following steps: Constructing a position vector: constructing a multi-dimensional position vector of the device according to the multi-dimensional data of the device; Constructing a position tree: constructing a position tree of the device through the multi-dimensional position vector of the device; Device information retrieval: retrieving from the root node of the position tree according to the dimension of the position vector of the device, until the leaf node corresponding to the multi-dimensional position vector is retrieved, and obtaining the corresponding device information from the leaf node.

[0020] The plurality of dimensions at least includes: device ID, regional block, building, room number, etc. Each dimension represents a level of device position.

[0021] Specifically, the multi-dimensional position vector of the device is not only a coordinate, but also usually includes some additional information to help accurately describe the position information of the device. Assuming that the position vector of device i is Its multi-dimensional position vector can be represented as: Wherein is the component of the kth dimension of device i, representing the spatial position attribute of the device.

[0022] Exemplarily, the multi-dimensional position vector of the device is The example parameters are shown in Table 1 as follows: Table 1 Device Multi-dimensional position information parameters As Figure 2 shown, in some embodiments, the step of constructing a position vector comprises: collecting multi-dimensional information parameters of different positions of the device, and defining a multi-dimensional position vector according to a preset method.

[0023] Specifically, the method of defining a multi-dimensional position vector for the multi-dimensional information parameters in Table 1 is as follows: for non-numeric data such as “regional block” and “building” in the position vector, design the data dimension independently design the coding rules: within the same dimension, assign a unique integer to each unique non-numeric value (such as: the same “regional block” dimension: A1→1, A2→2, etc.; the same “building” dimension: A1-1→1, A1-2→2, etc.), convert it into a “dimensionally distinguishable and computable” numerical code, that is, convert the multi-dimensional position information parameters in Table 1 into a multi-dimensional position vector ; then standardize the multi-dimensional position vector to obtain a standardized multi-dimensional position vector; store the standardized multi-dimensional position vector to the database.

[0024] The specific steps of normalizing the multi-dimensional position vector are to convert each multi-dimensional information parameter into a standardized form with zero mean and unit variance, and the normalization formula is as follows: wherein, represents the mean of the multi-dimensional information parameter, represents the standard deviation of the multi-dimensional information parameter.

[0025] In a large equipment management system, data collection and preprocessing are key steps to ensure the accuracy of equipment positioning and system performance. By combining multiple location information parameters, the physical location of the equipment, sensor data, and other auxiliary information are analyzed to ultimately generate a multi-dimensional position vector of the equipment. By normalizing the multi-dimensional position vector, the scale differences between different data sources and different dimensions are eliminated, so that all data can be compared under the same standard, ensuring the consistency and comparability of the equipment location information.

[0026] In some embodiments, the acquisition of multi-dimensional information parameters includes: combining multiple positioning technologies, analyzing the location of the equipment, synthesizing different sensor data, and constructing a multi-level equipment position vector covering multi-dimensional information parameters such as geographical blocks, buildings, and room numbers.

[0027] First, using differential GPS (DGPS) technology, the latitude and longitude information of the equipment is obtained in real time through the GPS module to determine the geographical block where the equipment is located. Combined with indoor data, the physical location of the equipment is estimated according to the signal strength (RSSI) data between the equipment and the surrounding Wi-Fi access points (AP) using the triangulation method. For dynamic equipment, combined with the motion data collected by accelerometers, gyroscopes and other sensors in real time, combined with the kinematic model, the current position of the equipment is calculated in real time, and the result is corrected by the external positioning system to improve the positioning accuracy. In addition, for robots and drones equipped with cameras or LiDAR, more accurate positioning is performed through SLAM technology combined with image processing and environment mapping. Finally, the equipment position information obtained by the above various positioning technologies is fused to obtain the multi-dimensional information parameters of the equipment position vector.

[0028] Specifically, the multi-dimensional position vector of the equipment constructed by the multi-dimensional information parameters will not only include physical location coordinates (such as latitude and longitude, room coordinates, etc.), but also cover timestamps, equipment status, positioning accuracy and other additional information to provide a more comprehensive and accurate description of the equipment location.

[0029] In some embodiments, the normalized multi-dimensional position vector is stored in a database, including: storing the normalized multi-dimensional position vector in the database in the form of a table; each dimension of the multi-dimensional position vector corresponds to a different field in the table.

[0030] Specifically, in terms of data storage, the multidimensional location vector data is managed using a MySQL database, all multidimensional location vectors are stored in a location vector table, and a unique identifier is used as the primary key, such as a multidimensional location vector ID. Each dimension in the location vector table is provided with a corresponding field, such as an x-dimension field for a regional block, a y-dimension field for a building, etc., for storing the integer assigned to the corresponding dimension. The complete multidimensional location vector is finally stored in the location vector table according to the corresponding dimensions, and the location vector table can completely retain the dimension information and integrity of the location vector.

[0031] Each table stores the device location information of each dimension, i.e., each level, and is associated by an external key. The database design includes a device table and a location table, where the device table records device ID, device type, device status, etc., and the location table records device ID and corresponding location dimension information.

[0032] In some embodiments, the multidimensional location vector is a time-stamped multidimensional location vector. The step of constructing the location vector further includes updating the multidimensional location vector according to the time stamp attached to the multidimensional location vector.

[0033] The device location of each dimension usually changes over time, so the multidimensional location vector needs to be updated regularly or in real time. The location vector of each dimension is attached with a time stamp to record the location of the device at a certain time point. Through historical data, real-time collection and processing of multidimensional location data of the device, tracking of the motion trajectory of the device and calculation of its position in the multi-level space, the latest device location vector of each dimension is generated, and the multidimensional location vector is managed in the background system.

[0034] In some embodiments, the step of constructing the location tree includes: Converting the multidimensional location vector into a child node of the location tree, thereby constructing the location tree storing the device information; The child node includes an internal node and / or a leaf node; the internal node is used to retrieve the corresponding leaf node; and the leaf node stores the device information.

[0035] The location tree adopts a B+ tree data structure, aiming to effectively represent and manage the location relationship of the device in space. The location tree divides the space into different levels through a tree-like hierarchical structure, each node represents a joint key of the location in space, and each leaf node stores specific device information related to the location. The location vector of the device contains multiple dimensions (such as regional blocks, buildings, floors, room numbers, and in-room locations), and efficient management is achieved through the joint index of these dimensions.

[0036] Each internal node of the position tree represents a certain level of space, forming a tree structure. Each internal node can have a parent node and several child nodes, the parent node being the node of the previous level connected to the current internal node, and the child nodes being the nodes of the next level connected to the current internal node, the child nodes being located to more specific spatial positions through key value indexing; the key value is a joint keyword of the device position, for example , for indexing and sorting; the keyword is used to locate the child node, which points to other internal nodes or leaf nodes, and the key value of each internal node represents a certain level of space (geographical block, building, or floor, etc.); the data part of the current internal node stores detailed device information, such as device ID, geographical block, building, room number, etc.

[0037] In the position tree, device information is stored through leaf nodes, which are the nodes at the bottom of the position tree and sequentially map to specific position vectors (such as geographical block, building, floor, room number, etc.).

[0038] In some embodiments, the step of constructing the position tree is followed by the step of inserting the multi-dimensional position vector into the constructed position tree; Inserting the multi-dimensional position vector into the constructed position tree includes: Finding the insertion position: starting from the root node of the position tree, find the leaf node corresponding to the multi-dimensional position vector to be inserted; Inserting device information: storing the device information corresponding to the multi-dimensional position vector directly into the leaf node.

[0039] The multi-dimensional position vector is inserted into the constructed position tree, which is a hanging operation. For large-scale device systems, the number of devices usually reaches several thousand or even tens of thousands, therefore, the hanging operation must be efficient to ensure that the insertion and update of multi-dimensional position information are completed within a short time.

[0040] As shown in Figure 3 , in some embodiments, the step of finding the insertion position includes: Starting from the root node of the position tree, find the first child node that meets the multi-dimensional position vector according to the joint index of the multi-dimensional position vector; Enter the first child node and find the second child node that meets the multi-dimensional position vector according to the joint index of the multi-dimensional position vector; Repeat the traversal steps until the leaf node corresponding to the multi-dimensional position vector is found.

[0041] The joint index combines multiple key values of the multi-dimensional location vector into a joint key according to a preset priority order. When constructing the location tree, the sorting and searching of the entire tree strictly follow the lexicographic order of the joint key. The joint key is stored in the nodes of the location tree as an index key, used to guide the search and finally point to the location containing the device location data, i.e., the leaf node.

[0042] Specifically, assuming that the multi-dimensional location vector of the device is According to the multi-dimensional location vector of the device, start from the root node ROOT of the location tree, i.e., N = ROOT, where N is the current internal node, and the root node ROOT is the only node of the first layer of the location tree. Then, perform layer-by-layer searching according to each dimension of the location vector Assuming that the current internal node N is a node on the second layer, the current internal node N has multiple child nodes, and the multiple child nodes are searched in order according to the third dimension of the location vector The corresponding child node, i.e., according to the formula Wherein, FindChild is a function for finding the most suitable child node in the current internal node according to each dimension of the location vector. Repeat the above steps until the leaf node L is found. When the leaf node L is found, return the leaf node, i.e., according to the formula Wherein, LeafNode() is a leaf node positioning function. The leaf node is the node at the bottom layer of the location tree, and the device information is stored thereon. After the corresponding leaf node is located, the corresponding leaf node is returned, i.e., the queried device information is returned.

[0043] In some embodiments, the step of inserting device information includes: judging whether the leaf node to which the device information is inserted exceeds the maximum capacity after the device information is inserted. If not, the device information is directly inserted; if yes, the leaf node to which the device information is inserted is split and the device information is inserted.

[0044] Specifically, after the leaf node corresponding to the multi-dimensional location vector is found, the device information is inserted into the leaf node. If the leaf node is not full, the device information is directly inserted. If the leaf node is full, the leaf node needs to be split.

[0045] Exemplarily, the inserted device information includes device ID, device state, device type, etc. Assuming that the device information is as follows: Assuming that the leaf node L can store at most M device information. If the leaf node L is not full, the device information is inserted into the leaf node L, and the formula is as follows: Wherein, is the device information to be inserted, L is the leaf node before the device information is inserted, The leaf node after inserting device information; if device information is inserted If the leaf node L exceeds its maximum capacity M, then the leaf node needs to be split.

[0046] In some embodiments, splitting the leaf node into which device information is to be inserted includes: Sort the device information of the leaf nodes according to the position vector, and divide the sorted device information into left and right parts; Insert the minimum position vector in the right part and its device information into the parent node of the leaf node.

[0047] Specifically, assuming that the leaf node L before inserting device information has M device information entries, according to the B+ tree splitting strategy, the M device information entries are divided into two, creating a new leaf node. And sort the device information according to the location vector, that is ,in, Let i be the i-th position vector of the device and i-th device information; The device information is divided into two parts, the left part Includes information on M / 2 devices, right part Includes information on M-(M / 2) devices, i.e. , .

[0048] The right part minimum position vector Insert into the parent node.

[0049] For the process of finding the insertion position, the search at each level requires O(d) time, where d is the dimension of the position vector; for the process of inserting device information, the search time complexity is O(d). ), where N is the total number of device information entries in the location tree; therefore, the total time complexity of inserting device information and splitting operations is O(d). ).

[0050] In some embodiments, the step of inserting device information further includes: If the parent node of the leaf node into which device information is inserted also exceeds the maximum capacity after inserting the minimum position vector in the right part, then split the parent node.

[0051] In some embodiments, the device information retrieval step, which involves searching downwards from the root node of the location tree based on the device's location vector dimension, includes: performing a layer-by-layer search on each node of the location tree according to the dimension components of the multidimensional location vector corresponding to the current level. To locate the corresponding child nodes, during the query, first sort by geographical block. Perform a search, narrow down the search scope, and then search by building. Querying, and finally according to floor Querying, and finally according to floor and so on to further narrow the scope. By reducing the dimension number of each query through the layer-by-layer searching method, the comparison and searching cost is reduced.

[0052] Specifically, the searching starts from the root node Root of the position tree, i.e. N = Root, where N is the current internal node and Root is the root node of the position tree; each current internal node contains multiple child nodes, and each child node corresponds to a certain position range. In the root node Root of the position tree, the first dimension (e.g. regional block ) of the device position vector determines along which child node to search down; In the current internal node N, the child node corresponding to the current position vector dimension component is found, assuming that the current searching dimension component is (i.e. any one of ), each child node of the current internal node N is sequentially accessed until the child node corresponding to the position vector dimension component is found, and the formula is: , where i = 1, 2, …, d; assuming that the current internal node N stores interval or range information, the searching operation is essentially locating the child node corresponding to the current dimension vector .

[0053] In some embodiments, in the device information retrieval step, until the leaf node corresponding to the multi-dimensional position vector is retrieved, the corresponding device information is obtained from the leaf node, including: layer-by-layer searching down until the leaf node L corresponding to each dimension of the multi-dimensional position vector is found, the leaf node L stores complete device information including device ID, device state, device type, etc., i.e. ; once the leaf node L is found, the detailed information of the device can be directly obtained from the leaf node L, if the leaf node stores information of multiple devices, further comparison of the position vector is needed to accurately locate the specific device, i.e. from the leaf node L, the device information corresponding to the given position vector is searched , and the specific formula is: .

[0054] Each device has a position vector, and the position vector is the key of the B+ tree, and each device information is the value of the leaf node. The core of the B+ tree searching process is to start from the root node, search in the child nodes of each layer according to the order of each dimension (each component of the position vector), until the corresponding leaf node is found, and then return the detailed information of the device from the leaf node. For the complexity of the searching process, in the B+ tree, the time complexity of the searching is O(d ), where d is the dimension of the position vector, and N is the total number of nodes in the position tree.

[0055] Specifically, as shown in Figure 4 , taking a two-dimensional position vector as an example, it is assumed that there are four devices, respectively , , , , and the device information of the four devices is stored in the leaf nodes. It is assumed that the device information of device is searched for. The search process is as follows: starting from the root node, if the first dimension of the two-dimensional position vector of the device is less than 2, the left child node is pointed to, if the first dimension of the position vector of the device is greater than or equal to 2, the right child node is pointed to, if the first dimension is 1, the left child node of the root node is pointed to; then, starting from the left child node of the root node, i.e., the current node, if the second dimension of the two-dimensional position vector of the device is less than 2, the left child node of the current node is pointed to, if the second dimension of the two-dimensional position vector of the device is greater than or equal to 2, the right child node of the current node is pointed to, if the second dimension is 2, the right child node of the current node is pointed to, i.e., the leaf node at the bottom layer stores the device information of device , and the device information of device is returned.

[0056] As shown in Figure 5 , in some embodiments, the method further includes introducing a cache mechanism to cache the child nodes or leaf nodes whose access times exceed a preset threshold to an in-memory database. Specifically, the frequently accessed child nodes or leaf nodes are cached to the in-memory database, thereby reducing the number of disk accesses, and a cache index structure Trie tree (i.e., a dictionary tree or a prefix tree) is established in the in-memory database, the device positions or device information that have been queried are cached, and for the device positions or device information that are frequently queried, they are directly obtained in the in-memory database, avoiding multiple retrievals from the B+ tree.

[0057] In some embodiments, the method further includes, for a plurality of device information retrieval requests, merging the plurality of device information retrieval requests into one batch query. Specifically, by retrieving a plurality of position ranges in the B+ tree at one time, the overhead of multiple searches is reduced, and if the device positions in a position range are queried, the chain table structure between the leaf nodes can be directly used for sequential scanning, avoiding repeated calculation of each query and improving the query efficiency.

[0058] The embodiment deploys the position tree-based device information retrieval method of the application, and in the embodiment, the device management system of the oil and gas exploitation industry is taken as an application scenario. In view of the fact that a large number of production devices are distributed in different operation companies, platforms, systems and other complex physical locations, the position tree-based device information retrieval method is adopted to improve the efficiency and accuracy of device location information management, facilitate device fault positioning, maintenance scheduling and other work, and includes the following steps: Device position tree construction step: position level definition, the system defines the hierarchical structure of the device position according to the actual layout of the industrial site in advance. For example, the highest layer is the name of the operation company (such as XX operation company), the second layer is different platforms (such as oil and gas fields, processing plants), the third layer is different systems in the platform (such as mechanical systems, electrical systems, instrument systems, etc.), and the fourth layer is a pry block (such as a compressor pry, a cooler pry, etc.). Data structure selection, a tree-shaped data structure is selected to store device location information, each node represents a location entity (such as a certain operation company, platform or pry block), and the node includes attribute fields such as location name, location code, parent node pointer (pointing to the previous layer position node), etc. Initial position tree construction, according to the operation company planning data and device layout drawings, start from the highest layer operation company node, and add the position nodes of each level to the tree in turn. First, create a platform node and set its parent node to the operation company node; then create a system node for each platform, with the parent node corresponding to the corresponding platform; then create a pry block node for each system, with the parent node corresponding to the corresponding system; finally, create a corresponding node at the specific device placement location point layer and associate it to the previous layer area node. During the construction process, a unique location code is assigned to each location node, which can be generated according to certain rules such as hierarchical coding combination (operation company code-platform code-system code-py block location code) to facilitate subsequent quick retrieval and positioning; Insertion of position information step: position information preparation, enter the basic information of the device in the device management system, including device number, device name, device type, and belonging location code. Among them, the belonging location code needs to be strictly filled in according to the location code of each node in the position tree defined previously; insertion of position information, when a new device is added, the system searches for and matches from the root node (operation company node) in the position tree according to the device belonging location code input by the user. During the search process, first compare the prefix of the current internal node location code with the prefix of the device belonging location code. If they are not consistent, skip this node and its subtree; if they are consistent, enter the child node of this node and continue recursive search, layer by layer down to the leaf node (specific device location point node) that completely matches the device belonging location code. Once the matching position node is found, the device information is inserted into the node, establishing the association between the device and the location, for example, a device list attribute is added to the position node, and the device is added to the list. Device location retrieval step: according to the location path, the user inputs the location path where the device is located, for example, "XX work company→XX platform→wet gas compression system→compressor pry", the system locates the target location node in the location tree according to this path layer by layer, and then obtains all the device information hung under the node and displays it. In order to speed up the retrieval speed, an index is established in each node of the location tree in advance, and the location name or location code is used for quick positioning, avoiding the performance loss caused by traversing the entire tree layer by layer from the root node; or, according to the device attribute retrieval combined with the location screening, the user inputs part of the attributes of the device (such as device name keyword, device type, etc.), the system first quickly filters out a batch of device candidates that meet the conditions through the device attribute index (such as device name inverted index, device type hash table index, etc.). Then, for the devices in this candidate set, according to their belonging location code, the corresponding location nodes in the location tree are batch-positioned, and at the same time, according to the user's further location range screening condition (for example, only view the devices of a certain work company), the results are filtered, and finally the devices and their detailed location information that meet all conditions are returned.

[0059] The method further comprises a location tree caching mechanism step: the constructed location tree data is loaded into the in-memory database cache, and is regularly updated and synchronized according to the actual location changes, so that when the device is hung and retrieved, the location tree in the in-memory database is directly operated, greatly reducing the time overhead of frequent reading of data from the database and the like persistent storage, and improving the response speed of operation.

[0060] The method further comprises a device location change step: when the device has a location change (such as the device is moved to a new location point), the system first locates the original location node of the device in the location tree, removes it from the device list of the original node, and then finds the new target location node in the location tree according to the new location code, and re-hangs the device. The whole process ensures that the location change operation can be quickly and accurately completed through an optimized algorithm (such as using the hierarchical relationship of the location code to quickly locate), and the related index is updated in time, without affecting the subsequent retrieval operation.

[0061] After applying this method in the device management system, in the face of thousands of production devices distributed in multiple work companies and different platforms, the device maintenance personnel can quickly query the accurate location of a specific device through the system, and the average retrieval time is shortened by more than 80% compared with the traditional method; when the device is moved and other location changes are made, the system can also complete the update and adjustment of the insertion relationship within a few seconds, greatly improving the efficiency of device management and reducing the problems such as production delay caused by chaotic device location information.

[0062] In some embodiments, the method further comprises device information retrieval based on a graph database. Specifically, the graph database is used to store device location information, i.e., the association between devices and locations, each device and each location is stored as a node in the graph database, and the insertion relationship between devices and locations and the hierarchical relationship between locations are represented by edges; when a new device is added, the corresponding location node is found in the graph database according to the location information of the device, and then the edge between the device node and the location node is established, thereby completing the hanging of the device and the location, for example, by using the query language of the graph database, the target location node is quickly located, and then the corresponding edge is added; the powerful graph traversal and query capability of the graph database is used to retrieve the device location, for example, by using the query statement of the graph database, all device nodes hanging under a certain location node can be found by traversing along the edge from the location node; or the location node to which a device node belongs can be found by traversing along the edge in the opposite direction from the device node, and then the complete location path of the device and other information can be obtained.

[0063] In some embodiments, the method further comprises device information retrieval based on device address code mapping. Specifically, a unique address code is designed for each device, which directly contains the location information of the device in the location tree, for example, the code can use hierarchical numbers or letter combinations, each layer representing a location level of the device, such as job company code, platform code, system code, block code, and device serial number, etc. The address code of the device is determined when the device is registered or installed, and the code is directly bound with the device information and stored in the database. Since the code itself embodies the location information of the device, the insertion relationship between the device and the location is embodied by the code, and there is no need to perform complex location tree insertion operations. By analyzing the address code of the device, the location information of the device can be directly obtained, for example, according to the codes in each layer of the device address code, the corresponding location names of the job company, platform, and block can be found in the pre-defined location code table, thereby constructing the complete location path of the device. For location-related retrieval, pattern matching or range query can also be directly performed on the device address code.

[0064] In some embodiments, the method further comprises device information retrieval based on device classification tags and location relationship. Specifically, in addition to the basic information and location information of the device, a plurality of classification tags are defined for the device, such as device type, function, department to which the device belongs, etc., and the location information is also assigned to the device as a special tag; in the device management system, in addition to recording the location code of the device, the corresponding device classification tags are added to the device, and the device is associated with the location and various classification tags; the device location can be retrieved by combining the query conditions such as the type of the device, the location code, etc. For example, all devices of a certain type under a certain platform or all devices with a certain function in a certain system are found. In this way, the device can be retrieved not only by location, but also more flexibly in combination with other attributes of the device.

[0065] In some embodiments, the method further comprises device information retrieval based on holographic retrieval mechanism combination. Specifically, a holographic index is established for all device information and location information in the device management system, including device name, device number, location code, location name, device type, etc. All key information. The holographic index can be constructed using search engine technology such as Elasticsearch, etc., which can realize fast search and fuzzy matching of text information; when the device location needs to be retrieved, the holographic index is searched directly, for example, the keyword of the device name or the keyword of the location name is input in the search box, and the search engine will quickly return the related device and its location information. This way can realize the fast retrieval of device location information, and can also meet some fuzzy query requirements, such as remembering the approximate location of the device or part of the device name, etc.

[0066] The application also constructs a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the device information retrieval method based on the location tree as described in any of the above embodiments.

[0067] The device information retrieval method based on the location tree of the application aims to create a device location knowledge base, so as to realize fast connection and retrieval of the device, and the unknown number construction and dynamic updating method based on the B+ tree enhances the management efficiency of the device location data, and realizes fast positioning through layer-by-layer searching and combination of multiple dimensions of the location vector.

[0068] It can be understood that the above embodiments only express part of the embodiments of the present application, the description is more specific and detailed, but it cannot be understood as the limitation of the patent scope of the present application. It should be pointed out that for ordinary skilled in the art, the above embodiments or technical features can be freely combined without departing from the concept of the present application, and several modifications and improvements can be made, which belong to the protection scope of the present application, that is, the embodiments described in "in some embodiments" can be freely combined with any embodiment above and below. Therefore, any equivalent transformation and modification within the scope of the claims of the present application shall belong to the scope of the claims of the present application.

Claims

1. A method of retrieving device information based on a location tree, characterized by, The method comprises the following steps: constructing a position vector: constructing a multi-dimensional position vector of the device according to multi-dimensional data of the device; constructing a position tree: constructing a position tree of the device through the multi-dimensional position vector of the device; device information retrieval: retrieving from a root node of the position tree according to dimensions of the position vector of the device until a leaf node corresponding to the multi-dimensional position vector is retrieved, and obtaining corresponding device information from the leaf node.

2. The location tree-based device information retrieval method according to claim 1, wherein, The step of constructing the position vector comprises: collecting multi-dimensional information parameters of different positions of the device, and defining a multi-dimensional position vector according to a preset method; standardizing the multi-dimensional position vector to obtain a standardized multi-dimensional position vector; storing the standardized multi-dimensional position vector into a database.

3. The location tree-based device information retrieval method according to claim 2, wherein, The step of storing the standardized multi-dimensional position vector into the database comprises: storing the standardized multi-dimensional position vector into the database in the form of a table; each dimension of the multi-dimensional position vector corresponds to a different field in the table.

4. The method of claim 2, wherein, The multi-dimensional position vector is a multi-dimensional position vector with a time stamp; The step of constructing the position vector further comprises updating the multi-dimensional position vector according to a time stamp attached to the multi-dimensional position vector.

5. The method of claim 1, wherein, The step of constructing the position tree comprises: converting the multi-dimensional position vector into a child node of the position tree, thereby constructing a position tree storing device information; the child node comprises an internal node and / or a leaf node; the internal node is used to retrieve a corresponding leaf node; and the leaf node stores device information.

6. The location tree-based device information retrieval method according to claim 5, wherein, The step of constructing the position tree further comprises inserting the multi-dimensional position vector into the constructed position tree. The step of inserting the multi-dimensional position vector into the constructed position tree comprises: finding an insertion position: finding a leaf node corresponding to the multi-dimensional position vector to be inserted from a root node of the position tree; inserting device information: directly storing device information corresponding to the multi-dimensional position vector into the leaf node.

7. The location tree-based device information retrieval method according to claim 6, wherein, The step of finding the insertion position comprises: starting from the root node of the position tree and finding a first child node meeting the multi-dimensional position vector according to a joint index of the multi-dimensional position vector; entering the first child node and finding a second child node meeting the multi-dimensional position vector according to the joint index of the multi-dimensional position vector; repeating the traversal step until a leaf node corresponding to the multi-dimensional position vector is found.

8. The location tree-based device information retrieval method according to claim 6, wherein, The step of inserting the device information comprises: judging whether the leaf node to be inserted with the device information exceeds a maximum capacity after the device information is inserted, and if not, directly inserting; if yes, splitting the leaf node to be inserted with the device information and then inserting the device information.

9. The location tree-based device information retrieval method according to claim 8, wherein, The step of splitting the leaf node to be inserted with the device information comprises: sorting device information of the leaf node according to the position vector, and dividing the sorted device information into a left part and a right part; inserting a minimum position vector in the right part and device information thereof into a parent node of the leaf node.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the device information retrieval method based on the position tree according to any one of claims 1-9.