CN110688542B - Infrastructure searching method and device - Google Patents

Infrastructure searching method and device Download PDF

Info

Publication number
CN110688542B
CN110688542B CN201910832051.3A CN201910832051A CN110688542B CN 110688542 B CN110688542 B CN 110688542B CN 201910832051 A CN201910832051 A CN 201910832051A CN 110688542 B CN110688542 B CN 110688542B
Authority
CN
China
Prior art keywords
information
infrastructure
preset position
mileage
hash function
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
CN201910832051.3A
Other languages
Chinese (zh)
Other versions
CN110688542A (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.)
China Academy of Railway Sciences Corp Ltd CARS
Infrastructure Inspection Institute of CARS
Beijing IMAP Technology Co Ltd
Original Assignee
China Academy of Railway Sciences Corp Ltd CARS
Infrastructure Inspection Institute of CARS
Beijing IMAP Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Academy of Railway Sciences Corp Ltd CARS, Infrastructure Inspection Institute of CARS, Beijing IMAP Technology Co Ltd filed Critical China Academy of Railway Sciences Corp Ltd CARS
Priority to CN201910832051.3A priority Critical patent/CN110688542B/en
Publication of CN110688542A publication Critical patent/CN110688542A/en
Application granted granted Critical
Publication of CN110688542B publication Critical patent/CN110688542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an infrastructure searching method and device, wherein the method comprises the following steps: acquiring characteristic information of the mileage of the infrastructure to be tested, and establishing a hash function according to the characteristic information of the mileage of the infrastructure to be tested; and inputting the mileage information of the preset position into the hash function, and outputting the infrastructure information of the preset position. According to the method and the device, the characteristic information of the mileage of the infrastructure to be detected can be acquired, the hash function is established according to the characteristic information of the mileage of the infrastructure to be detected, the mileage information of the preset position is input into the hash function, and the infrastructure information of the preset position can be output.

Description

Infrastructure searching method and device
Technical Field
The invention relates to the technical field of data retrieval, in particular to an infrastructure searching method and device.
Background
The data searching and retrieving is to determine data with a keyword equal to a preset value in the data set to be retrieved according to the preset value. At present, in some application scenarios, the railway infrastructure needs to be retrieved quickly, and therefore, it is necessary to provide an infrastructure search method.
In the prior art, traversal retrieval of an unordered data set and binary search of an ordered table are generally used, but the two methods cannot realize accurate positioning of the infrastructure to be detected, and the searching efficiency is low.
Disclosure of Invention
The embodiment of the invention provides an infrastructure searching method, which is used for accurately positioning an infrastructure to be detected and improving the searching efficiency and comprises the following steps:
acquiring characteristic information of the mileage of the infrastructure to be tested, and establishing a hash function according to the characteristic information of the mileage of the infrastructure to be tested;
and inputting the mileage information of the preset position into the hash function, and outputting the infrastructure information of the preset position.
Optionally, the expression of the hash function h (key) is:
H(KEY)=KEY/D;
the KEY is mileage information of a preset position, and the D is a distance between two infrastructures.
Optionally, the method further includes: judging whether the mileage information of a preset position exists or not in the process of inputting the mileage information of the preset position into the hash function and outputting the infrastructure information of the preset position;
and if so, searching the infrastructure information of the preset position again.
Optionally, the infrastructure information at the preset position is searched again by using the binary search tree.
The embodiment of the invention also provides an infrastructure searching device, which is used for accurately positioning the infrastructure to be detected and improving the searching efficiency, and comprises the following components:
the function creating module is used for acquiring the characteristic information of the mileage of the infrastructure to be tested and creating a hash function according to the characteristic information of the mileage of the infrastructure to be tested;
and the information query module is used for inputting the mileage information of the preset position into the hash function and outputting the infrastructure information of the preset position.
Optionally, the expression of the hash function h (key) is:
H(KEY)=KEY/D;
the KEY is mileage information of a preset position, and the D is a distance between two infrastructures.
Optionally, the apparatus further comprises: the collision processing module is used for judging whether a plurality of collided mileage information of the preset position exists in the process of inputting the mileage information of the preset position into the hash function and outputting the infrastructure information of the preset position;
and if so, searching the infrastructure information of the preset position again.
Optionally, the conflict handling module is further configured to: and searching the infrastructure information of the preset position again by using the binary search tree.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the foregoing method is stored in the computer-readable storage medium.
In the embodiment of the invention, the characteristic information of the mileage of the infrastructure to be detected is obtained, the hash function is established according to the characteristic information of the mileage of the infrastructure to be detected, and the mileage information of the preset position is input into the hash function, so that the infrastructure information of the preset position can be output.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a flow chart of an infrastructure lookup method in an embodiment of the invention;
FIG. 2 is a schematic structural diagram of an infrastructure lookup apparatus according to an embodiment of the present invention;
fig. 3 is a diagram illustrating an exemplary infrastructure lookup apparatus according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
The data searching and retrieving is to determine data with a keyword equal to a preset value in the data set to be retrieved according to the preset value. At present, in some application scenarios, the railway infrastructure needs to be retrieved quickly, and therefore, it is necessary to provide an infrastructure search method.
The railway infrastructure comprises contact net pillars, signal transponders, ground magnetic inductors, bridge tunnels and the like, and the basic data distribution has the characteristics of discrete distribution in the mileage direction, long distance between each other and irregular distribution.
An embodiment of the present invention provides an infrastructure search method, as shown in fig. 1, where the method includes:
step 101, obtaining characteristic information of the mileage of the infrastructure to be tested, and establishing a hash function according to the characteristic information of the mileage of the infrastructure to be tested.
And 102, inputting mileage information of a preset position into the hash function, and outputting infrastructure information of the preset position.
As can be seen from fig. 1, in the infrastructure searching method provided in the embodiment of the present invention, the feature information of the mileage of the infrastructure to be detected is obtained, the hash function is established according to the feature information of the mileage of the infrastructure to be detected, and the mileage information of the preset position is input into the hash function, so that the infrastructure information of the preset position can be output.
In an embodiment, the hash function h (key) is expressed as:
H(KEY)=KEY/D;
wherein, KEY is mileage information of a preset position, and D is a distance between two infrastructures.
Specifically, for example, when infrastructure information of the P location needs to be acquired, the mileage data of the P location is used as a KEY of a hash function (for example, if the mileage of P is 100m, the KEY is 100, and a specific numerical value of the KEY is determined according to a field actual situation); for D, first, it is determined that information of several infrastructures in the P location is to be queried, and if information of multiple different infrastructures is to be searched, a distance between two adjacent different infrastructures is taken as D, and assuming that a distance between a transponder and a ground magnetic sensor in the P location to be searched is 50m, a value of D is 50 m. If the information of only one infrastructure of the P location is queried, the distance between two adjacent same infrastructures is taken as D to take the transponder of the P location to be searched as an example, and assuming that the distance between two adjacent transponders is 100m, the value of D is 100 m. The KEY and D values may be different for different types of railway infrastructure and different line environments according to the distribution rule of the railway infrastructure.
In an embodiment of the present invention, in order to successfully complete the infrastructure lookup operation when the hash lookup fails, the method further includes: judging whether the mileage information of a preset position exists or not in the process of inputting the mileage information of the preset position into the hash function and outputting the infrastructure information of the preset position;
and if so, searching the infrastructure information of the preset position again.
Further, the infrastructure information of the preset position is searched again by using the binary search tree.
During specific implementation, the two-branch search tree is created by using the mileage information of the plurality of conflicting preset positions, and then the infrastructure information of the preset positions is searched again by using the two-branch search tree.
Based on the same inventive concept, the embodiment of the present invention further provides an infrastructure search apparatus, as described in the following embodiments. Because the principle of the infrastructure search device for solving the problem is similar to that of the infrastructure search method, the implementation of the infrastructure search device can refer to the implementation of the infrastructure search method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
An embodiment of the present invention provides an infrastructure search apparatus, as shown in fig. 2, the apparatus includes:
the function creating module 201 is configured to obtain feature information of the mileage of the infrastructure to be tested, and create a hash function according to the feature information of the mileage of the infrastructure to be tested;
the information query module 202 is configured to input mileage information of a preset location into the hash function, and output infrastructure information of the preset location.
In the embodiment of the present invention, the expression of the hash function h (key) is:
H(KEY)=KEY/D;
the KEY is mileage information of a preset position, and the D is a distance between two infrastructures.
In an embodiment of the present invention, as shown in fig. 3, the apparatus further includes: the collision processing module 301 is configured to determine whether there are multiple colliding pieces of mileage information at preset positions in the process of inputting mileage information at preset positions into the hash function and outputting infrastructure information at preset positions;
and if so, searching the infrastructure information of the preset position again.
In an embodiment of the present invention, the conflict handling module is further configured to: and searching the infrastructure information of the preset position again by using the binary search tree.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program for executing the above method is stored.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (6)

1. An infrastructure lookup method, comprising:
acquiring the characteristic information of the mileage corresponding to the infrastructure of the preset position to be detected, and establishing a hash function according to the characteristic information of the mileage corresponding to the infrastructure of the preset position to be detected;
mileage information of a preset position is input into the hash function, and infrastructure information of the preset position is output;
the expression of the hash function H (KEY) is:
H(KEY)=KEY/D;
the KEY is mileage information of a preset position, if information of multiple different infrastructures is to be searched, D is a distance between two adjacent different infrastructures, and if information of one infrastructure is to be searched, D is a distance between two adjacent same infrastructures.
2. The method of claim 1, further comprising: judging whether a plurality of conflicting mileage information of the preset position exist in the process of inputting the mileage information of the preset position into the hash function and outputting the infrastructure information of the preset position;
and if so, searching the infrastructure information of the preset position again by using the binary search tree.
3. An infrastructure lookup apparatus, comprising:
the function creating module is used for acquiring the characteristic information of the mileage corresponding to the infrastructure of the preset position to be detected and creating a hash function according to the characteristic information of the mileage corresponding to the infrastructure of the preset position to be detected;
the information query module is used for inputting mileage information of a preset position into the hash function and outputting infrastructure information of the preset position;
the expression of the hash function H (KEY) is:
H(KEY)=KEY/D;
the KEY is mileage information of a preset position, if information of multiple different infrastructures is to be searched, D is a distance between two adjacent different infrastructures, and if information of one infrastructure is to be searched, D is a distance between two adjacent same infrastructures.
4. The apparatus of claim 3, further comprising: the collision processing module is used for judging whether a plurality of collided mileage information of the preset position exists in the process of inputting the mileage information of the preset position into the hash function and outputting the infrastructure information of the preset position;
and if so, searching the infrastructure information of the preset position again by using the binary search tree.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 2 when executing the computer program.
6. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 2.
CN201910832051.3A 2019-09-04 2019-09-04 Infrastructure searching method and device Active CN110688542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910832051.3A CN110688542B (en) 2019-09-04 2019-09-04 Infrastructure searching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910832051.3A CN110688542B (en) 2019-09-04 2019-09-04 Infrastructure searching method and device

Publications (2)

Publication Number Publication Date
CN110688542A CN110688542A (en) 2020-01-14
CN110688542B true CN110688542B (en) 2022-09-13

Family

ID=69107800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910832051.3A Active CN110688542B (en) 2019-09-04 2019-09-04 Infrastructure searching method and device

Country Status (1)

Country Link
CN (1) CN110688542B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043695A (en) * 2006-03-23 2007-09-26 上海宇梦通信科技有限公司 Method for storing and maintaining user equipment information in mobile communication system
CN106526643A (en) * 2016-12-30 2017-03-22 国网浙江省电力公司杭州供电公司 Positioning method of power transmission line inspection personnel
CN206327389U (en) * 2016-12-27 2017-07-14 上海铁路局科学技术研究所 A kind of railway positioning system based on contact net bar image recognition

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101043695A (en) * 2006-03-23 2007-09-26 上海宇梦通信科技有限公司 Method for storing and maintaining user equipment information in mobile communication system
CN206327389U (en) * 2016-12-27 2017-07-14 上海铁路局科学技术研究所 A kind of railway positioning system based on contact net bar image recognition
CN106526643A (en) * 2016-12-30 2017-03-22 国网浙江省电力公司杭州供电公司 Positioning method of power transmission line inspection personnel

Also Published As

Publication number Publication date
CN110688542A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN108829610B (en) Memory management method and device in neural network forward computing process
CN106649346B (en) Data repeatability checking method and device
CN114162140B (en) Optimal lane matching method and system
CN105550225A (en) Index construction method and query method and apparatus
CN107480260B (en) Big data real-time analysis method and device, computing equipment and computer storage medium
CN107291745B (en) Data index management method and device
CN109299205B (en) Method and device for warehousing spatial data used by planning industry
CN110704096A (en) Packaging method and device of front-end item, storage medium and electronic equipment
CN111046042A (en) Quick retrieval method and system based on space-time collision
CN106648839B (en) Data processing method and device
CN104317850A (en) Data processing method and device
CN113918658A (en) Method and device for recovering data
CN110688542B (en) Infrastructure searching method and device
CN114003034A (en) Method, equipment and storage medium for making routing inspection plan of routing inspection robot
CN112035169B (en) Jump processing method and device, computer equipment and computer readable storage medium
CN111026736B (en) Data blood margin management method and device and data blood margin analysis method and device
CN110019295B (en) Database retrieval method, device, system and storage medium
CN111143424A (en) Characteristic scene data mining method and device and terminal
CN103955449A (en) Target sample positioning method and device
CN104038356A (en) Execution method, configuration apparatus and processing apparatus for data route
CN106372233B (en) Data acquisition system storage method and device
CN110427381A (en) A kind of data processing method and relevant device
CN105138524A (en) Method and apparatus for creating document node path index and server
CN205139976U (en) Management system for tools and equipment
CN110716929A (en) Control and deployment processing method, device and equipment

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