CN114036344A - Method and device for device coding, electronic device and computer storage medium - Google Patents

Method and device for device coding, electronic device and computer storage medium Download PDF

Info

Publication number
CN114036344A
CN114036344A CN202111255608.5A CN202111255608A CN114036344A CN 114036344 A CN114036344 A CN 114036344A CN 202111255608 A CN202111255608 A CN 202111255608A CN 114036344 A CN114036344 A CN 114036344A
Authority
CN
China
Prior art keywords
database
equipment
coding
coded
coded data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111255608.5A
Other languages
Chinese (zh)
Inventor
赵振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
NR Electric Co Ltd
NR Engineering 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 NR Electric Co Ltd, NR Engineering Co Ltd filed Critical NR Electric Co Ltd
Priority to CN202111255608.5A priority Critical patent/CN114036344A/en
Publication of CN114036344A publication Critical patent/CN114036344A/en
Pending legal-status Critical Current

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/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present disclosure provides a method of device encoding, the method comprising: globally coding the power equipment according to the coding file of the identification system to obtain coded data; storing the encoded data in an encoded database; wherein, one coded data mark uniquely identifies one power device in the coded database; establishing a retrieval index according to the coding items in the coding database; obtaining a search entry according to the equipment model name in the central relational database; matching the search entries with the retrieval indexes to obtain matching results; if the search entry is matched with the index, correspondingly storing the coded data in the coded data base into a central relational database, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric power equipment; data intercommunication and sharing can be realized, and coding efficiency is improved; the disclosure also provides a device encoding apparatus, an electronic device and a computer storage medium.

Description

Method and device for device coding, electronic device and computer storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a device encoding method and apparatus, an electronic device, and a computer storage medium.
Background
At present, a plurality of different professional systems such as a monitoring system, a runout system, a security system and the like are built in a hydropower station data center, and different professional systems have different modeling angles and model paradigms for hydropower station unit equipment, so that data barriers exist among the professional systems, and efficient data intercommunication or sharing cannot be realized.
Therefore, there is a need for a device that enables efficient interworking or sharing of data between different professional systems.
Disclosure of Invention
The disclosure provides a device encoding method and apparatus, an electronic device, and a computer storage medium.
A first aspect of the present disclosure provides a method of device encoding, the method comprising: globally coding the power equipment according to the coding file of the identification system to obtain coded data; storing the encoded data in an encoded database; wherein one of the coded data identifiers uniquely identifies one of the electrical devices in the coded database; establishing a retrieval index according to the coding entries in the coding database; obtaining a search entry according to the equipment model name in the central relational database; matching the search entries with the retrieval indexes to obtain matching results; and if the search entry is matched with the retrieval index, correspondingly storing the coded data in the coded database into the central relational database, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric power equipment.
Optionally, before storing the encoded data in an encoded database, the method further comprises: determining whether the coded data of the power equipment is repeated with the coded data of the power equipment stored in the coded data base; and if not, storing the coded data of the coded file in the coded database.
Optionally, the establishing a retrieval index according to the encoded entry in the encoded database includes: traversing the coding entries of the coding database; establishing a retrieval index for the device name of the power device in the encoding entry; wherein the retrieval index comprises: the name index of the power device, the device name of the power device, and the encoded data of the power device.
Optionally, the obtaining a search term according to the device model name in the central relational database includes: constructing a retrieval data structure according to the equipment model name in the central relational database; and obtaining a search entry according to the retrieval data structure.
Optionally, if the search term matches the search index, correspondingly storing the encoded data in the encoded database to the central relational database, and correspondingly storing the encoded data stored in the central relational database and the device information of the corresponding power device, includes: if the search entry is matched with the retrieval index, assigning the coded data in the coded database to a corresponding equipment model of the central relational database; correspondingly storing the corresponding equipment model of the assigned coded data in the central relational database, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric equipment.
Optionally, the matching the search term with the search index to obtain a matching result includes: and carrying out fuzzy matching on the equipment model name in the search entry and the equipment name of the electric power equipment in the retrieval index to obtain a matching result.
A second aspect of the present disclosure provides an apparatus for device encoding, the apparatus comprising: the first acquisition module is used for globally encoding the power equipment according to the encoding file of the identification system to obtain encoded data; a first storage module for storing the encoded data in an encoded database; wherein one of the coded data identifiers uniquely identifies one of the electrical devices in the coded database; the establishing module is used for establishing a retrieval index according to the coding items in the coding database; the second acquisition module is used for acquiring a search entry according to the equipment model name in the central relational database; the matching module is used for matching the search entry with the retrieval index to obtain a matching result; and the second storage module is used for correspondingly storing the coded data in the coded database to the central relational database if the search entry is matched with the retrieval index, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric power equipment.
Optionally, the apparatus further comprises: a determining module for determining whether the encoded data of the power device is repeated with the encoded data of the power device already stored in the encoded database before storing the encoded data in the encoded database; and if not, the first storage module is used for storing the coded data of the coded file in the coded database.
A third aspect of the present disclosure provides an electronic device, comprising: a processor; a memory for storing a computer program capable of running on the processor; wherein the processor, when executing the computer program, performs the steps of the method of device coding of the first aspect.
A fourth aspect of the present disclosure provides a computer storage medium having computer-executable instructions stored thereon; the computer executable instructions, when executed by a processor, are capable of implementing the method of device coding as described above in relation to the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the embodiment of the disclosure provides a method for globally encoding power equipment according to an encoding file of an identification system to obtain encoded data; storing the encoded data in an encoded database; establishing a retrieval index according to the coding entries in the coding database; obtaining a search entry according to the equipment model name in the central relational database; matching the search entries with the retrieval indexes to obtain matching results; if the search entry is matched with the retrieval index, correspondingly storing the coded data in the coded data base into the central relational database, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric power equipment; compared with the correlation of the equipment codes derived by the hydropower station signal identification system and the equipment models in the data center relational database manually by professional technicians in the related technology, the embodiment of the application can obtain the search terms according to the equipment model names in the central relational database; matching the search entries with the retrieval indexes to obtain matching results; data intercommunication and sharing between different professional systems and the hydropower station signal identification system in the central relational database can be automatically and efficiently realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
FIG. 1 is a flow diagram illustrating a method of device encoding in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of device encoding in accordance with an illustrative embodiment;
FIG. 3 is a flow diagram illustrating a method of device encoding in accordance with an illustrative embodiment;
FIG. 4 is a flow diagram illustrating a method of device encoding in accordance with an illustrative embodiment;
FIG. 5 is a flow diagram illustrating a method of device encoding in accordance with an illustrative embodiment;
FIG. 6 is a flow diagram illustrating a method of device encoding in accordance with an illustrative embodiment;
FIG. 7 is a flowchart illustrating a method of device encoding in accordance with an exemplary embodiment;
FIG. 8 is a flow diagram illustrating a method of device encoding in accordance with an illustrative embodiment;
FIG. 9 is a flowchart illustrating a method of device encoding in accordance with an exemplary embodiment;
FIG. 10 is a flowchart illustrating a method of device encoding in accordance with an exemplary embodiment;
FIG. 11 is a block diagram of an apparatus for encoding by a device according to an exemplary embodiment;
fig. 12 is a schematic structural diagram of an apparatus for encoding by a device according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with embodiments of the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosed embodiments, as detailed in the appended claims.
The embodiment of the present disclosure provides a device encoding method, which is shown in fig. 1 and includes:
step S101, globally encoding the power equipment according to the encoding file of the identification system to obtain encoded data;
step S102, storing the coded data in a coded database; wherein one of the coded data identifiers uniquely identifies one of the electrical devices in the coded database;
step S103, establishing a retrieval index according to the coding entries in the coding database;
step S104, obtaining a search entry according to the equipment model name in the central relational database;
step S105, matching the search entry with the retrieval index to obtain a matching result;
and step S106, if the search entry is matched with the retrieval index, correspondingly storing the coded data in the coded database into the central relational database, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric power equipment.
In the embodiment of the present disclosure, the identification system includes, but is not limited to: a power device identification system. The electrical equipment identification system is used for storing a code file for identifying electrical equipment.
The power device identification system may include at least one of:
identification systems of electrical devices comprised by the hydroelectric power station;
an identification system of electrical equipment comprised by the wind power plant;
an identification system of power equipment contained in the thermal power station;
identification system of electrical equipment of a nuclear power plant.
The power equipment includes but is not limited to at least one of the following:
a water turbine;
a wind turbine;
a utility boiler;
a steam turbine;
a gas turbine;
a generator;
a transformer;
a transmission line;
a transformer;
a contactor is provided.
In the embodiment of the present disclosure, in step S101, validity and validity of a storage path of an encoded file are checked, and if the check is passed, the power device is globally encoded to obtain encoded data. Here, the globally encoding the power device includes: analyzing and verifying the device name, the device code and the hierarchical relationship between the devices, which are stored in the code file and correspond to the electric power devices, to obtain the coded data uniquely identifying one electric power device and the hierarchical relationship between the corresponding device name and the devices.
The global coding here may be: the encoding data obtained by adopting the global encoding can be the encoding which is stored in the encoding database and uniquely identifies one power device.
In the embodiment of the present disclosure, the coded data of the electrical equipment refers to global uniform coding performed on the electrical equipment according to a coding standard, and the coding includes global uniform coding performed according to a hydropower station equipment coding specification, such as a process-related identification code, an installation location identification code, and a geographical location identification code of the electrical equipment.
In the embodiment of the present disclosure, in step S102, the encoded data is stored in an encoded database, and the corresponding device names and hierarchical relationships between the devices are stored in the encoded database in a tree structure.
In one embodiment, the storing of the encoded data in a tree structure includes, but is not limited to: the tree structure is constructed according to the hierarchical relationship among the devices, for example, if one power equipment module comprises a plurality of sub power equipment, the power equipment module is higher than the sub power equipment in hierarchy, and the power equipment module is used as the highest hierarchy of the tree structure. In this way, the multi-level power equipment modules are correspondingly stored in a multi-level tree structure according to the level relation corresponding to the installed inclusion relation.
In this embodiment of the present disclosure, in step S103, establishing a retrieval index according to the encoding entry in the encoding database includes: and establishing indexes for the coding entries in the coding database of the tree structure by using an inverted index technology, wherein the coding entries correspond to the hierarchical relationship among the devices. And, the index is stored in a distributed full-text search engine.
In the embodiment of the present disclosure, the inverted index is an indexing method, and is used to store a mapping of a storage location in a document or a group of documents at a single time in a full-text search.
In one embodiment, retrieving the index includes at least: the name of the device.
In one embodiment, the index further includes device encoding data and a device hierarchy based on the device name.
In this embodiment of the present disclosure, in step S104, the central relational database is a hydropower station data central relational database, and stores device models corresponding to the electrical devices of different professional systems, and because different professional systems have different modeling angles and different model paradigms for the unit devices of the hydropower station, the device models are different. The key included in the name of the device model is the same as the device name in the encoding database.
In one embodiment, the device model name under any professional system in the central relational database or the keyword contained in the device name can be used as the search entry.
In the embodiment of the present disclosure, in step S105, the search term is matched with the search index to obtain a matching result. And carrying out fuzzy matching on the equipment model name in the search entry and the equipment name contained in the retrieval index to obtain a matching result.
In the embodiment of the disclosure, fuzzy matching is performed on the device model name as a keyword, and the device model name is matched with the device name included in the search index.
In this embodiment of the present disclosure, in step S106, if the search entry matches the index, and it indicates that the device model corresponds to the device, the coded data of the identification system is assigned to the device corresponding to the professional system of the central relational database, and is stored in the professional system of the central relational database, and the coded data stored in the central relational database is stored in correspondence with the device information of the corresponding power device.
In the embodiment of the disclosure, the coded data of the power equipment of the identification system is assigned and stored in the central relational database and the equipment model corresponding to the power equipment, and first, a retrieval index is established based on the established coded database. And matching the search entry obtained based on the equipment model name in the central relational database with the retrieval index. And if the search entries are matched with the indexes, assigning the coded data in the coded data base to an equipment model of a professional system of the central relational database, and further storing the coded data in the central relational database. Thus, efficient and automatic data intercommunication or sharing between the identification system and the central relational database is realized.
In some embodiments, if the fuzzy matching is successful, outputting the search term and the retrieval index of which the fuzzy matching is successful, receiving user input based on the output search term and the retrieval index, and determining an accurate matching result of the device model name in the search term and the device name contained in the retrieval index. If the matching result indicating the fuzzy matching is input by the user to be correct, the search entry is indicated to be matched with the index, the equipment model corresponding to the search entry corresponds to the power equipment corresponding to the retrieval index, step S106 is executed, the coded data in the coded data base is correspondingly stored in the central relational database, and the coded data stored in the central relational database is correspondingly stored with the equipment information of the power equipment corresponding to the power generation equipment.
In this embodiment of the disclosure, in the step S102, with reference to fig. 2, before the encoded data is stored in the encoded database, the method further includes:
step S1021, determining whether the coded data of the power equipment is repeated with the coded data of the power equipment stored in the coded database;
step S1022, if not repeated, store the encoded data of the encoded file in the encoded database.
In the embodiment of the present disclosure, before the encoded data is stored in the encoded database, a storage path for identifying a system encoded file needs to be set, and connection information of the encoded database needs to be set, where the connection information includes an IP address, a port number, a user name, a password, and the like.
In the embodiment of the present disclosure, the storage path of the encoded file and the validity and validity of the connection information of the encoded database need to be checked, and if the check is passed, step S1021 is executed.
In the embodiment of the present disclosure, in step S1021, it is determined whether the encoded data is repeated, and if there is no repetition of the encoded data, step S1022 is executed.
In the embodiment of the disclosure, when the coded data is determined to be repeated, the abnormal error information is fed back.
In the embodiment of the disclosure, when it is determined that the encoded data is not repeated, it may be further determined whether the device name in the encoded file is repeated, if so, abnormal error information is fed back, and if not, it is continuously determined whether the device power device in the encoded file has a device of a previous level.
In the embodiment of the disclosure, regarding whether the unit electrical equipment in the encoded file has the equipment in the previous level, since the encoded data and the equipment name of the storage equipment in the encoded file are stored according to the level of the unit electrical equipment, the traversal inspection is started from the electrical equipment in the highest level, and other electrical equipment except the electrical equipment in the highest level should have the equipment in the previous level, except the equipment in the highest level of the first inspection, it is only necessary to inspect whether the electrical equipment has the equipment in the previous level, and it can be determined whether the equipment is an isolated equipment. And if the power equipment is determined to be the isolated equipment, feeding back abnormal error information to the user.
In the embodiment of the disclosure, after the encoded data of the unit device in the encoded file is determined to be not repeated, the device name is not repeated, and the unit device is not an isolated device, the encoded data of the encoded file, the device name and the hierarchical relationship between the devices are stored in the encoded database, so that the accuracy and the effectiveness of the hierarchical relationship between the encoded data, the device name and the devices in the encoded database can be guaranteed.
In this embodiment of the disclosure, in the step S103, as shown in fig. 3, the establishing a retrieval index according to the coding entry in the coding database includes:
step S1031, traversing the coding entries of the coding database;
step S1032, building a retrieval index for the device name of the electrical device in the encoding entry; wherein the retrieval index comprises: the name index of the power device, the device name of the power device, and the encoded data of the power device.
In this embodiment of the disclosure, before performing step S1031, the method further includes: setting connection information of a distributed full-text search engine, wherein the connection information comprises an IP address, a port number, a user name and a password; and verifying the legality and validity of the connection information, and if the verification is passed, executing step S1031 through an access interface of the coding database.
In the embodiment of the present disclosure, if the verification fails, the abnormal error information is fed back.
In the present disclosed embodiment, step S1032 is performed after step S1031 is performed. In step S1032, a retrieval index is created for the device name of the electric power device in the code entry, and the index is stored in the distributed full-text search engine. The retrieval index includes: the name index of the power device, the device name of the power device, and the encoded data of the power device.
In the embodiment of the disclosure, the name index, the equipment name and the coded data of the power equipment are used as the content of the retrieval index by establishing the search engine and the index, so that retrieval and name matching can be conveniently carried out by using the retrieval index subsequently, and the matching efficiency and the data sharing efficiency are improved.
In this embodiment of the present disclosure, in step S104, with reference to fig. 4, the obtaining a search term according to an equipment model name in a central relational database includes:
step S1041, constructing a retrieval data structure according to the device model name in the central relational database;
step S1042, obtaining a search entry according to the retrieval data structure.
In this embodiment of the present disclosure, before performing step S1041, the obtaining of the device model name includes: and loading equipment models of different professional systems in the central relational database. In step S1041, the device model in the central relational database is traversed, and a retrieval structure is constructed using the device model name as a key.
In the embodiment of the present disclosure, after step S1042 is executed, a distributed full-text search engine access interface is called to match a search term constructed by a search data structure with an index of a search engine. I.e. step S105 is performed.
In the embodiment of the disclosure, since the device model name and the device name of the electric power device corresponding to the identification system have higher coincidence, a retrieval data structure is constructed by the device model name, and then a search term is obtained, and then fuzzy matching is performed, so that matching efficiency and accuracy can be improved.
In this disclosure, in step S106, with reference to fig. 5, if the search term matches the search index, the correspondingly storing the encoded data in the encoded database to the central relational database, and the correspondingly storing the encoded data stored in the central relational database and the device information of the corresponding power device includes:
step S1061, if the search entry is matched with the retrieval index, assigning the coded data in the coded database to a corresponding device model of the central relational database;
step S1062, correspondingly storing the corresponding device model of the assigned encoded data in the central relational database, and correspondingly storing the encoded data stored in the central relational database and the device information of the corresponding power device.
In the embodiment of the present disclosure, in step S1061, if the search term is matched with the index, assigning the encoded data in the encoded database to a corresponding device model of the central relational database; here, the device model may be made to have the unified encoding data stored in the encoding database.
In the embodiment of the present disclosure, in step S1062, the corresponding device model of the assigned encoded data is correspondingly stored in different professional systems in the central relational database, and is correspondingly stored with the device information of the corresponding power device, so that encoded data of the same device corresponding to different professional systems in the central relational database and the identifier system are consistent, and data intercommunication and sharing between different professional systems are implemented.
In this embodiment of the present disclosure, in step S105, as shown in fig. 6, the matching the search term with the search index to obtain a matching result includes:
step S1051, performing fuzzy matching on the device model name in the search entry and the device name of the power device in the search index to obtain a matching result.
In the embodiment of the disclosure, the fuzzy matching means that no matter what the position of the keyword or the word is in the name of the equipment model, the word only needs to appear, the fuzzy matching can automatically split the keyword into a unit structure, perform logic operation, and judge the matching degree.
In one embodiment, fuzzy matching means that, for a device model name in a search entry, there may be a case where the device model name is not completely consistent with a device name of an electric device in a search index, for example, when the device model name is not named according to a specification, a part of characters or letters are not consistent with the electric device name in the search index, and another part is consistent with the electric device name in the search index, but the device model name and the device name in the search index are all indicated by the same corresponding device, and fuzzy matching also quickly matches the device model name with the device name in the search index in this case.
In the embodiment of the present disclosure, in step S1051, fuzzy matching refers to matching through corresponding letters in simple keywords, so that matching efficiency can be improved.
In the embodiment of the disclosure, the device model name is used as a search entry and is subjected to fuzzy matching with the power device name in the retrieval index, so that the matching accuracy can be improved.
In connection with the above embodiments, the following examples are provided:
example 1: a method of device encoding.
The method for coding the equipment model equipment of the hydropower station data center comprises the following steps: analyzing and checking the hydropower station signal identification system coding file, and introducing the equipment name, the equipment code and the equipment interlayer level relation of the unit equipment into a coding database of a tree structure; establishing indexes for the coding entries in the coding database by using an inverted index technology and storing the indexes in a distributed full-text search engine; fuzzy matching is carried out on equipment models established by different professional systems in the hydropower station data center relational database and index records in the distributed full-text search engine, and the overall codes in the index records which are successfully matched are assigned to the corresponding matched equipment models in the hydropower station data center relational database and are updated to the relational database. The method can reduce the manpower input of the hydropower station data center equipment model equipment coding method, avoid artificial coding errors and improve the coding efficiency of different professional system equipment model equipment coding methods.
The hydraulic resource is used as clean energy and plays a key role in optimizing the energy structure. The installed capacity of partial hydropower stations reaches the level of ten million kilowatts, and the digital and intelligent monitoring and operation of the total station unit equipment are challenged with higher difficulty. At present, the construction of a hydropower station data center relates to the system integration of a monitoring system, a runout system, a trust system and other systems with multiple professional directions and multiple functions, and how to break the data barriers among the professional systems and realize efficient data sharing, so that the data is reasonably utilized, the economic value behind the data is mined, and the construction difficulty of the hydropower station data center is formed.
In order to solve the problem of low overall coding efficiency of the hydropower station data center equipment model, the invention provides a hydropower station data center equipment model equipment coding method, which can realize fuzzy matching of an equipment model and unit equipment and complete full-automatic overall coding of the equipment model.
The method can carry out fuzzy association matching on the equipment codes derived by the hydropower station signal identification system and the equipment models in the data center relational database, and the coding process is carried out automatically, so that the labor input and the coding workload are reduced, the artificial error codes are avoided, the coding efficiency of the equipment model coding method of different professional systems is improved, and the data intercommunication and sharing among different professional systems are ensured.
Fig. 7 is a flowchart of a hydropower station data center equipment model global coding method, which mainly includes the following steps:
step S201, analyzing and checking a code file exported by a hydropower station signal identification system, and importing the global name, the global code and the inter-equipment level relation of hydropower station equipment into a code database of a tree structure;
step S202, establishing indexes for the coding entries in the coding database with the tree structure by using an inverted index technology, and storing the indexes in a distributed full-text search engine;
step S203, providing a graphical coding tool, providing a fuzzy correlation function in the graphical coding tool, carrying out fuzzy matching on model names of equipment models of different professional systems in the hydropower station data center relational database and equipment names of index records in the distributed full-text search engine, and assigning global codes in the index records which are successfully matched to the equipment models which are correspondingly matched in the hydropower station data center relational database;
step S204, filling the global code of the equipment model in the hydropower station data center relational database into the hydropower station data center relational database;
and step S205, the graphical coding tool provides a correlation cancellation function, the fuzzy correlation operation can be cancelled, and the filling of the global codes of the equipment models in the hydropower station data center relational database is cancelled.
Fig. 8 is a detailed process of analyzing and verifying the coded file of the hydropower station signal identification system, which includes the following steps:
s301, setting a storage path of a hydropower station signal identification system coding file;
step S302, setting connection information of the tree structure coding database, wherein the connection information comprises an IP address, a port number, a user name and a password;
step S303, carrying out validity and validity check on the storage path of the coded file and the connection information of the tree-structure coded database, if the check is passed, jumping to step S304, otherwise, feeding back abnormal error information to the user;
step S304, loading the code file for analysis, judging whether the equipment codes of the unit equipment in the code file are repeated, if not, jumping to step S305, otherwise, feeding back abnormal error information to the user;
s305, judging whether the equipment name of the unit equipment in the encoded file is repeated, if not, jumping to S306, otherwise, feeding back abnormal error information to the user;
step S306, judging whether the unit equipment in the encoded file has equipment of a previous level, if so, jumping to step S307, otherwise, the equipment is isolated equipment, and feeding back abnormal error information to a user;
and S307, calling an access interface of the coding database, and storing the device name, the device code and the inter-device level relation of the unit device in the coding file in the coding database.
FIG. 9 is a process of indexing the code entries in the tree-structured code database, comprising the steps of:
step S401, setting connection information of a distributed full-text search engine, wherein the connection information comprises an IP address, a port number, a user name and a password;
s402, carrying out validity and validity check on the connection information of the distributed full-text search engine, if the check is passed, jumping to step 403, otherwise, feeding back abnormal error information to the user;
step S403, traversing the coding entries in the coding database through the access interface of the tree-structured coding database;
s404, establishing an index for the unit equipment name in the coding entry by using an inverted index technology;
step S405, storing the index record in the distributed full-text search engine, wherein the data structure of the index record comprises a name index, a device name and a device code.
Fig. 10 is a method process of equipment model fuzzy matching and equipment encoding in a hydropower station data center relational database, including the steps of:
s501, loading equipment models of different professional systems in a hydropower station data center relational database;
step S502, traversing the equipment model in the relational database, and constructing a retrieval data structure by using the equipment name as a keyword;
step S503, calling a distributed full-text search engine access interface, carrying out fuzzy matching with index records in the full-text search engine by taking the retrieval data structure in the step S502 as a parameter, if the matching is successful, jumping to the step S504, otherwise, judging whether the traversal of the equipment model in the relational database is finished, if not, jumping to the step S502, otherwise, ending the encoding process;
step S504, assigning the device codes stored in the index records of the distributed full-text search engine to the device models corresponding to the relational database;
and step S505, updating the method equipment model for completing the equipment coding into a hydropower station data center relational database. And judging whether the equipment model in the relational database is traversed and ended, if not, skipping to the step S502, and otherwise, ending the encoding process.
In the embodiment of the present disclosure, as shown in fig. 11, an apparatus 700 for device coding is provided, where the apparatus 700 includes:
the first obtaining module 701 is configured to perform global coding on the power device according to the coding file of the identification system to obtain coded data;
a first storage module 702 for storing the encoded data in an encoded database; wherein one of the coded data identifiers uniquely identifies one of the electrical devices in the coded database;
an establishing module 703, configured to establish a retrieval index according to the coding entry in the coding database;
a second obtaining module 704, configured to obtain a search term according to the device model name in the central relational database;
the matching module 705 is used for matching the search terms with the retrieval indexes to obtain matching results;
the second storage module 706 is configured to, if the search term matches the search index, correspondingly store the encoded data in the encoded database in the central relational database, and correspondingly store the encoded data stored in the central relational database and the device information of the corresponding power device.
In the embodiment of the present disclosure, as shown in fig. 12, the apparatus 700 further includes:
a determining module 707 for determining whether the encoded data of the power device is repeated with the encoded data of the power device already stored in the encoded database before storing the encoded data in the encoded database;
if not, the first storage module 701 is configured to store the encoded data of the encoded file in the encoded database.
In the embodiment of the present disclosure, the establishing module 703 is further configured to:
an encoding entry for traversing the encoding database;
the retrieval index is used for establishing a retrieval index for the equipment name of the power equipment in the code entry; wherein the retrieval index comprises: the name index of the power device, the device name of the power device, and the encoded data of the power device.
In this embodiment of the disclosure, the second obtaining module 704 is further configured to:
the system comprises a central relational database, a database server and a database server, wherein the central relational database is used for storing equipment model names;
and the search module is used for obtaining the search terms according to the retrieval data structure.
In this embodiment of the present disclosure, the second storage module 706 is further configured to:
and if the search entry is matched with the retrieval index, correspondingly storing the coded data in the coded database into the central relational database, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric power equipment.
In this embodiment of the present disclosure, the matching module 705 is further configured to:
and the search term is used for carrying out fuzzy matching on the equipment model name in the search term and the equipment name of the electric power equipment in the retrieval index to obtain a matching result.
In an embodiment of the present disclosure, there is provided an electronic device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the steps of the device coding method when running the computer service.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In an embodiment of the present disclosure, a storage medium having computer-executable instructions therein is provided; the computer executable instructions are executed by a processor to implement the steps in the method of device coding described above.
Alternatively, the integrated unit according to the embodiment of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the application document.

Claims (10)

1. A method of device encoding, the method comprising:
globally coding the power equipment according to the coding file of the identification system to obtain coded data;
storing the encoded data in an encoded database; wherein one of the coded data identifiers uniquely identifies one of the electrical devices in the coded database;
establishing a retrieval index according to the coding entries in the coding database;
obtaining a search entry according to the equipment model name in the central relational database;
matching the search entries with the retrieval indexes to obtain matching results;
and if the search entry is matched with the retrieval index, correspondingly storing the coded data in the coded database into the central relational database, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric power equipment.
2. The device encoding method of claim 1, wherein prior to storing the encoded data in an encoded database, the method further comprises:
determining whether the coded data of the power equipment is repeated with the coded data of the power equipment stored in the coded data base;
and if not, storing the coded data of the coded file in the coded database.
3. The device coding method according to claim 1, wherein the establishing a retrieval index according to the coding entry in the coding database comprises:
traversing the coding entries of the coding database;
establishing a retrieval index for the device name of the power device in the encoding entry; wherein the retrieval index comprises: the name index of the power device, the device name of the power device, and the encoded data of the power device.
4. The device coding method according to claim 1, wherein the obtaining a search term according to a device model name in a central relational database comprises:
constructing a retrieval data structure according to the equipment model name in the central relational database;
and obtaining a search entry according to the retrieval data structure.
5. The device coding method according to claim 1, wherein if the search term matches the search index, correspondingly storing the coded data in the coded database in the central relational database, and correspondingly storing the coded data stored in the central relational database with device information of a corresponding power device, comprises:
if the search entry is matched with the retrieval index, assigning the coded data in the coded database to a corresponding equipment model of the central relational database;
correspondingly storing the corresponding equipment model of the assigned coded data in the central relational database, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric equipment.
6. The device coding method according to claim 3, wherein matching the search term with the search index to obtain a matching result comprises:
and carrying out fuzzy matching on the equipment model name in the search entry and the equipment name of the electric power equipment in the retrieval index to obtain a matching result.
7. An apparatus for device encoding, the apparatus comprising:
the first acquisition module is used for globally encoding the power equipment according to the encoding file of the identification system to obtain encoded data;
a first storage module for storing the encoded data in an encoded database; wherein one of the coded data identifiers uniquely identifies one of the electrical devices in the coded database;
the establishing module is used for establishing a retrieval index according to the coding items in the coding database;
the second acquisition module is used for acquiring a search entry according to the equipment model name in the central relational database;
the matching module is used for matching the search entry with the retrieval index to obtain a matching result;
and the second storage module is used for correspondingly storing the coded data in the coded database to the central relational database if the search entry is matched with the retrieval index, and correspondingly storing the coded data stored in the central relational database and the equipment information of the corresponding electric power equipment.
8. The device-encoded apparatus of claim 7, further comprising:
a determining module for determining whether the encoded data of the power device is repeated with the encoded data of the power device already stored in the encoded database before storing the encoded data in the encoded database;
and if not, the first storage module is used for storing the coded data of the coded file in the coded database.
9. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing a computer program capable of running on the processor; wherein the content of the first and second substances,
the processor is adapted to perform the steps of the method of encoding the device of any of claims 1 to 6 when running the computer program.
10. A computer storage medium having stored thereon computer-executable instructions; the computer-executable instructions are executed by a processor to implement a method of encoding the apparatus of any of claims 1 to 6.
CN202111255608.5A 2021-10-27 2021-10-27 Method and device for device coding, electronic device and computer storage medium Pending CN114036344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111255608.5A CN114036344A (en) 2021-10-27 2021-10-27 Method and device for device coding, electronic device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111255608.5A CN114036344A (en) 2021-10-27 2021-10-27 Method and device for device coding, electronic device and computer storage medium

Publications (1)

Publication Number Publication Date
CN114036344A true CN114036344A (en) 2022-02-11

Family

ID=80135548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111255608.5A Pending CN114036344A (en) 2021-10-27 2021-10-27 Method and device for device coding, electronic device and computer storage medium

Country Status (1)

Country Link
CN (1) CN114036344A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115034346A (en) * 2022-06-01 2022-09-09 浙江省标准化研究院(金砖国家标准化(浙江)研究中心、浙江省物品编码中心) Unique product code assigning method and device based on GS1 code, and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115034346A (en) * 2022-06-01 2022-09-09 浙江省标准化研究院(金砖国家标准化(浙江)研究中心、浙江省物品编码中心) Unique product code assigning method and device based on GS1 code, and storage medium
CN115034346B (en) * 2022-06-01 2023-04-07 浙江省标准化研究院(金砖国家标准化(浙江)研究中心、浙江省物品编码中心) Unique product code assigning method and device based on GS1 codes and storage medium

Similar Documents

Publication Publication Date Title
CN111861484B (en) Security protocol apparatus, authentication method, terminal apparatus, and method for executing terminal apparatus
CN113189451A (en) Power distribution network fault positioning studying and judging method, system, computer equipment and storage medium
CN111046000B (en) Government data exchange sharing oriented security supervision metadata organization method
CN113495902A (en) Data processing method and data standard management system
CN114218318B (en) Data processing system and method for electric power big data
CN114036344A (en) Method and device for device coding, electronic device and computer storage medium
CN113362024B (en) Application program development multi-module collaboration system based on block chain
CN112699281B (en) Alarm event rule mining method and system based on gspan algorithm
CN113312258A (en) Interface testing method, device, equipment and storage medium
CN112711649A (en) Database multi-field matching method, device, equipment and storage medium
CN110941831A (en) Vulnerability matching method based on fragmentation technology
CN116126807A (en) Log analysis method and related device
CN115828243A (en) Static code flow analysis method based on scanning scheme
CN108763053A (en) Bury the generation method and terminal device of a title
CN111352818B (en) Application program performance analysis method and device, storage medium and electronic equipment
CN111143622B (en) Fault data set construction method based on big data platform
CN110955760B (en) Evaluation method of judgment result and related device
CN111917861A (en) Knowledge storage method and system based on block chain and knowledge graph and application thereof
CN114721582A (en) Information sharing method and device and related equipment
CN116383020B (en) Internet data analysis management system and method based on blockchain
CN113570345B (en) Automatic power failure range identification system based on construction project circuit diagram
CN103605777A (en) Database index processing method and device
CN114462903B (en) Water, electricity and gas business applying system
CN117194501B (en) DCS trend measurement point jump logic configuration method, system, equipment and medium
CN111667217B (en) Warehouse network information storage method

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