CN106878404B - Centralized meter reading method based on feature codes - Google Patents

Centralized meter reading method based on feature codes Download PDF

Info

Publication number
CN106878404B
CN106878404B CN201710059160.7A CN201710059160A CN106878404B CN 106878404 B CN106878404 B CN 106878404B CN 201710059160 A CN201710059160 A CN 201710059160A CN 106878404 B CN106878404 B CN 106878404B
Authority
CN
China
Prior art keywords
meter reading
meter
code
feature code
feature
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
CN201710059160.7A
Other languages
Chinese (zh)
Other versions
CN106878404A (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.)
Hangzhou Nenglian Science & Technology Co ltd
Original Assignee
Hangzhou Nenglian Science & 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 Hangzhou Nenglian Science & Technology Co ltd filed Critical Hangzhou Nenglian Science & Technology Co ltd
Priority to CN201710059160.7A priority Critical patent/CN106878404B/en
Publication of CN106878404A publication Critical patent/CN106878404A/en
Application granted granted Critical
Publication of CN106878404B publication Critical patent/CN106878404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C19/00Electric signal transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Abstract

The invention relates to a centralized meter reading method based on a feature code, which comprises the following steps: adding a size class number and a feature code, and setting rules of the feature code, wherein the rules comprise corresponding rules and adjusting rules; determining a feature code through a corresponding rule according to the size class number and the meter reading protocol; initializing a meter reading port, adjusting meter reading parameters and generating a meter reading frame according to the adjustment rule of the feature code. The technical scheme provided by the invention can be realized by a method that one concentrator is compatible with meters with different protocols and types, the returned data of the meters can be stored in the same format, and the meter has self-setting capability and can be optimized aiming at the meter communication of different manufacturers.

Description

Centralized meter reading method based on feature codes
Technical Field
The invention relates to a data acquisition technology, in particular to a centralized meter reading method based on a feature code.
Background
In the field of meter reading of water-gas heat of public utilities, manual reading is adopted before, in recent years, automatic meter reading is gradually realized by arranging a concentrator, the concentrator is connected with a control center computer, meter reading data of a user is read according to instructions of the control center, and the data is sent back to the control center or the instructions of a master control station are transmitted to a meter reading controller. However, the existing concentrator does not have interpretation and inspection of protocols, and in addition, no national or provincial unified protocol detection mechanism exists, the interpretation of the protocols by manufacturers is different, so that the current intelligent meter reading protocol is five-door, and has various protocols such as CJ188-2004, DLT645/97, and the like, even under the same protocol, the transmission sequence of data is different, and the return difference of electrical parameters is larger, so that one concentrator cannot be compatible with different meters such as a water meter, an electric meter, a gas meter, and the like, cannot be compatible with different meter models under the same meter class, and cannot be well compatible with meters made by different manufacturers under the same meter model.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for realizing compatibility of meters with different protocols and types through one concentrator, wherein the returned data of the meters can be stored in the same format, and the meter has self-setting capability and can be optimized aiming at the meter communication of different manufacturers.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a centralized meter reading method based on feature codes comprises the following steps:
s1) adding the size class number and the feature code, and setting rules of the feature code, wherein the rules comprise corresponding rules and adjusting rules;
s2), after a meter reading module of the concentrator receives a meter reading task, sending meter reading information in the meter reading task to a meter reading thread, wherein the meter reading information comprises a size class number, a meter reading protocol and meter reading parameters;
s3) the meter reading thread analyzes the meter reading information and determines the feature code according to the size class number and the meter reading protocol and the corresponding rule;
s4) the concentrator initializes the meter reading port according to the adjustment rule of the feature code obtained in S3;
s5) the concentrator adjusts meter reading parameters according to the adjustment rule of the feature code obtained in the step S3;
s6) the concentrator determines a meter reading protocol according to the feature code obtained in S3, combines the meter reading parameters obtained in S5 to generate a meter reading frame, and sends the frame to a meter.
The uniform format meter reading task sent by the server can be extracted and adjusted by the concentrator by setting the size class number, the feature code and the corresponding rule, and the meter reading port and the meter reading frame can adapt to the communication requirements between different meters, so that the compatibility between different meters under the same meter reading terminal is realized.
Further, the method also comprises the following steps:
s7) after receiving the meter reading frame, the meter returns to the frame;
s8), after receiving the meter reading frame, the meter reading module adjusts the data in the meter reading frame according to the adjustment rule of the feature code obtained in S3, and stores the data in a unified format.
And the uniform format storage of the data in the returned table frame can be realized through the feature codes and is read by the server.
Furthermore, the codes to be determined are added in the step S1, and the feature codes are sorted; if the size class number and the meter reading protocol have no corresponding feature code according to the corresponding rule in the step S3, determining the code to be fixed, assigning a feature code at the head of the sequence to the code to be fixed and adopting an adjusting rule of the corresponding feature code, and initializing, adjusting and determining according to the adjusting rule of the code to be fixed in steps S4 to S6; if the generated meter reading frame fails to be sent to the meter in step S6 or if the meter reading module does not receive the meter reading frame in step S8, assigning a feature code of the next bit in the sequence to the code to be determined and adopting an adjustment rule corresponding to the feature code, and returning to perform initialization, adjustment and determination in steps S4 to S6 according to the adjustment rule of the code to be determined.
If the newly set meter does not set the corresponding rule in the concentrator, the matching can be tried through the existing rule, and because the type of the meter is limited, the automatic corresponding and setting of most rules of the newly added meter can be realized through the mode.
Preferably, the feature codes are sorted according to a meter reading protocol; and the undetermined code is assigned with a feature code under the meter reading protocol with the same meter reading information.
Through grouping matching, the matching speed can be increased, and the automatic matching time is greatly shortened.
Preferably, a manufacturer code is further added in step S1; the meter reading information in the step S2 further includes a manufacturer code; determining the feature code through the corresponding rule according to the size class number, the manufacturer code and the meter reading protocol in the step S3; initializing the meter reading port according to the adjustment rule of the feature code obtained in step S3 in step S4 includes setting timeout time.
Because the timeout time of the next frame of the meters manufactured by different manufacturers under the same meter model in the semi-industrial mode may have differences, such as 150ms, 300ms, etc., the traditional mode is uniformly set to an upper limit value of 1000ms, so that unnecessary waiting is generated in the communication process, and the timeout time of the meters can be respectively set by adding the manufacturer code and the feature code corresponding to each other.
Preferably, the meter reading parameters include a meter address and a data flag, and the adjusting of the meter reading parameters according to the adjustment rule of the feature code obtained in step S3 in step S5 includes determining whether to add special address data, and adjusting data content and data sequence in the meter address and the data flag. Because the address listed in the same meter and the address in the meter reading parameter have difference, for example, the address listed in the meter is a 14-bit address, and the communication related address only needs 10 bits, the data length, the data position and the preset rule in the meter reading parameter may have difference, so the concentrator needs to be added to judge whether to add special address data, and for the difference of the addresses, the address bit is supplemented at a specific position and then correspondingly adjusted, thereby adapting to different meter reading task formats.
Compared with the prior art, the invention has the following advantages and effects: the uniform format meter reading task sent by the server can be extracted and adjusted by the concentrator by setting the size class number, the feature code and the corresponding rule, and the meter reading port and the meter reading frame can adapt to the communication requirements between different meters, so that the compatibility between different meters under the same meter reading terminal is realized. And the uniform format storage of the data in the returned table frame can be realized through the feature codes and is read by the server. If the newly set meter is not set with the corresponding rule in the concentrator, the matching can be tried through the existing rule, the automatic corresponding and setting of most of the newly added meter rules are realized, and the matching speed is accelerated through grouping matching. The overtime time of the meter can be set by adding the manufacturer code corresponding to the feature code. Whether special address data are added or not is judged by adding, so that different meter reading task formats are adapted.
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, and 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 these drawings without creative efforts.
FIG. 1 is a flow chart of example 1.
FIG. 2 is a flowchart of example 2.
FIG. 3 is a flowchart of example 3.
Detailed Description
The present invention will be described in further detail with reference to examples, which are illustrative of the present invention and are not to be construed as being limited thereto.
Example 1:
as shown in fig. 1, in the present embodiment, the server is remotely connected to the concentrator, wherein the concentrator is connected to various types of meters through an Mbus meter reading bus. Before receiving a meter reading task of a server, adding a size class number and a feature code into a concentrator, wherein the size class number and the feature code can be set as numerical values, characters or character strings, and setting rules of the feature code, the rules comprise corresponding rules and adjusting rules, and the corresponding relation is the many-to-one or one-to-one mapping between the size class number, a meter reading protocol and the feature code. After the setting is finished, the concentrator starts to receive the data frame transmitted by the server, the concentrator decodes the data frame of the server, the meter reading task is distributed to a meter reading module under the concentrator for processing, and the meter reading module stores the meter reading task locally. When the meter reading module needs to be executed, the corresponding meter reading task is called from the local and the meter reading information in the meter reading task is extracted by the meter reading thread, the meter reading information comprises a size class number, a meter reading protocol and a meter reading parameter with a uniform format, the size class number and the feature code corresponding to the meter reading protocol are searched through the corresponding rule after the extraction, and the feature code of the meter reading task is determined. The concentrator initializes the meter reading port according to the feature code and the adjustment rule thereof, including the data bit of communication, the check mode and the stop bit. Meanwhile, the concentrator adjusts meter reading parameters according to the feature code and the adjustment rule thereof, the uniform format meter reading parameters transmitted by the server are in a form of 'frame start character 68H + meter type T + address field A0A 1A 2A 3A 4A 5A 6+ control code C + DATA length field L + DATA mark DATA + check code CS + end character 16H', the concentrator firstly detects whether the meter reading parameter length meets the requirement according to the DATA length in the adjustment rule, if the address field of part of manufacturers can default four bits of A5A 6, the concentrator adjusts the sequence of the meter reading parameters or/and modifies specific DATA bits through the adjustment rule after completing the four bits through 0000, and the adjustment process is common DATA format rewriting and is not repeated here. And rewriting the meter reading parameters with the uniform format into meter reading parameters which accord with the communication with a specific meter through the adjustment. After the two steps are finished, the concentrator determines a meter reading protocol and a meter reading parameter according to the feature code to generate a meter reading frame, and the meter reading frame is sent to a meter specified by an address field in the meter reading parameter through a meter reading port and an Mbus meter reading bus. And after receiving the meter reading frame, the meter operates according to the data mark in the meter reading frame and replies the meter frame after the operation is finished. And after receiving the meter frame, the meter reading module reversely adjusts the data in the meter frame according to the adjustment rule of the feature code, so that the data is rewritten into a uniform format which can be read by the server and then is locally stored.
Example 2:
as shown in fig. 2, the flow of this embodiment is substantially the same as that of embodiment 1, but the difference is that a manufacturer code is added, so after the feature code is determined, the timeout time parameter of the next frame in the semi-manual mode can be set according to a specific meter when the meter reading port is initialized, and the adding of the special address bit can be directly set in the adjustment rule without detecting the length of the meter reading parameter when the meter reading parameter is adjusted, so that more time can be saved in the communication and adjustment processes compared with embodiment 1.
Example 3:
as shown in fig. 3, a part of the process of this embodiment is the same as that of embodiment 1, and the difference is that a to-be-fixed code is added, feature codes are sorted and sequenced according to meter reading protocols, and the addition judgment of the feature codes is determined by a size class number and the meter reading protocols, if the size class number and the meter reading protocols can determine the feature codes through corresponding rules, the subsequent process is the same as that of embodiment 1 (not shown in the figure), if the size class number and the meter reading protocols cannot meet the corresponding rules, the to-be-fixed code is initially assigned as a first feature code in a list the same as the meter reading protocols under a meter reading task, and corresponding adjustment rules are used, wherein the processes of initializing a meter reading port through the to-be-fixed code, adjusting meter reading parameters and generating meter reading frames are the same as when the feature codes are used, and then a concentrator tries to send the generated meter reading frames to a meter (judge whether, if the concentrator is successful in sending, whether the meter successfully replies the meter frame (whether the meter reading frame is correct or not is judged), if the steps are successful, the adjusted meter frame is saved, and simultaneously, a new corresponding rule is formed by the feature code corresponding to the code to be determined, the size class number and the meter reading protocol for recording. If any one of the steps fails, assigning the feature code of the next bit in the sequence to the pending code, adopting the adjustment rule corresponding to the feature code, and reinitializing the meter reading port, adjusting the meter reading parameters and generating a meter reading frame according to the new assignment and the adjustment rule until the feature codes in the list are successfully used or the feature codes in the list are still failed. The process is mainly used for adding a new meter, rules do not need to be reset in the concentrator after the new meter is added, correct feature codes and adjustment rules can be automatically tried when a meter reading task of the new meter is received for the first time, and therefore automatic configuration of the feature codes and the rules is achieved. But if the corresponding type of table was never added in the concentrator or there are situations that require feature codes and rules to be reset.
In addition, it should be noted that the specific embodiments described in the present specification may differ in the shape of the components, the names of the components, and the like. All equivalent or simple changes of the structure, the characteristics and the principle of the invention which are described in the patent conception of the invention are included in the protection scope of the patent of the invention. Various modifications, additions and substitutions for the specific embodiments described may be made by those skilled in the art without departing from the scope of the invention as defined in the accompanying claims.

Claims (5)

1. A centralized meter reading method based on feature codes comprises the following steps:
s1) adding the large and small type numbers and the feature codes, and setting rules of the feature codes, wherein the rules comprise corresponding rules and adjusting rules, the corresponding rules are the mapping relation between the large and small type numbers, the meter reading protocol and the feature codes, and the adjusting rules have the functions of initializing meter reading ports and adjusting meter reading parameters;
s2), after a meter reading module of the concentrator receives a meter reading task, sending meter reading information in the meter reading task to a meter reading thread, wherein the meter reading information comprises a size class number, a meter reading protocol and meter reading parameters;
s3) the meter reading thread analyzes the meter reading information and determines the feature code according to the size class number and the meter reading protocol and the corresponding rule;
s4) the concentrator initializes the meter reading port according to the adjustment rule of the feature code obtained in S3;
s5) the concentrator adjusts meter reading parameters according to the adjustment rule of the feature code obtained in the step S3;
s6) the concentrator determines a meter reading protocol according to the feature code obtained in S3, and generates a meter reading frame by combining the meter reading parameters obtained in S5 and sends the frame to a meter;
s7) after receiving the meter reading frame, the meter returns to the frame;
s8), after receiving the meter reading frame, the meter reading module adjusts the data in the meter reading frame according to the adjustment rule of the feature code obtained in S3, and stores the data in a unified format.
2. The centralized meter reading method based on the feature code as claimed in claim 1, wherein:
adding the codes to be fixed in the step S1, and sequencing the feature codes;
if the size class number and the meter reading protocol have no corresponding feature code according to the corresponding rule in the step S3, determining the code to be fixed, assigning a feature code at the head of the sequence to the code to be fixed and adopting an adjusting rule of the corresponding feature code, and initializing, adjusting and determining according to the adjusting rule of the code to be fixed in steps S4 to S6;
if the generated meter reading frame fails to be sent to the meter in step S6 or if the meter reading module does not receive the meter reading frame in step S8, assigning a feature code of the next bit in the sequence to the code to be determined and adopting an adjustment rule corresponding to the feature code, and returning to perform initialization, adjustment and determination in steps S4 to S6 according to the adjustment rule of the code to be determined.
3. The centralized meter reading method based on the feature code as claimed in claim 2, wherein: the feature codes are sorted according to a meter reading protocol; and the undetermined code is assigned with a feature code under the meter reading protocol with the same meter reading information.
4. The centralized meter reading method based on the feature code as claimed in claim 1, wherein:
a manufacturer code is also added in the step S1;
the meter reading information in the step S2 further includes a manufacturer code;
determining the feature code through the corresponding rule according to the size class number, the manufacturer code and the meter reading protocol in the step S3;
initializing the meter reading port according to the adjustment rule of the feature code obtained in step S3 in step S4 includes setting timeout time.
5. The centralized meter reading method based on the feature code as claimed in claim 1, wherein: the meter reading parameters include meter addresses and data marks, and the step S5 of adjusting the meter reading parameters according to the adjustment rule of the feature code obtained in step S3 includes determining whether to add special address data, and adjusting data contents and data sequence in the meter addresses and data marks.
CN201710059160.7A 2017-01-23 2017-01-23 Centralized meter reading method based on feature codes Active CN106878404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710059160.7A CN106878404B (en) 2017-01-23 2017-01-23 Centralized meter reading method based on feature codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710059160.7A CN106878404B (en) 2017-01-23 2017-01-23 Centralized meter reading method based on feature codes

Publications (2)

Publication Number Publication Date
CN106878404A CN106878404A (en) 2017-06-20
CN106878404B true CN106878404B (en) 2020-06-16

Family

ID=59158823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710059160.7A Active CN106878404B (en) 2017-01-23 2017-01-23 Centralized meter reading method based on feature codes

Country Status (1)

Country Link
CN (1) CN106878404B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595114A (en) * 2018-03-23 2018-09-28 宁波三星医疗电气股份有限公司 After a kind of change of affiliated partner can copy reading historical record method
CN111122966B (en) * 2019-12-27 2022-05-17 宁波三星医疗电气股份有限公司 Load identification module data transmission method, device and system
CN111768607A (en) * 2020-06-24 2020-10-13 浪潮电子信息产业股份有限公司 Multi-table counting data acquisition method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609454A (en) * 2009-07-22 2009-12-23 上海可鲁系统软件有限公司 A kind of data storage and report method and smart machine thereof
CN102621921A (en) * 2012-03-13 2012-08-01 江西省电力科学研究院 Programmer for electric energy meters
CN102637203A (en) * 2012-03-15 2012-08-15 广西电网公司电力科学研究院 Method for processing electric quantity data and monitoring master station for automatic electric energy metering systems
CN103714177A (en) * 2014-01-08 2014-04-09 云南电力试验研究院(集团)有限公司电力研究院 Method for processing flexible configurable electricity meter stipulations in electric power meter reading and method for meter reading

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609454A (en) * 2009-07-22 2009-12-23 上海可鲁系统软件有限公司 A kind of data storage and report method and smart machine thereof
CN102621921A (en) * 2012-03-13 2012-08-01 江西省电力科学研究院 Programmer for electric energy meters
CN102637203A (en) * 2012-03-15 2012-08-15 广西电网公司电力科学研究院 Method for processing electric quantity data and monitoring master station for automatic electric energy metering systems
CN103714177A (en) * 2014-01-08 2014-04-09 云南电力试验研究院(集团)有限公司电力研究院 Method for processing flexible configurable electricity meter stipulations in electric power meter reading and method for meter reading

Also Published As

Publication number Publication date
CN106878404A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106878404B (en) Centralized meter reading method based on feature codes
JP2010532599A (en) Apparatus and method for realizing communication protocol adaptation function
JP2010272971A (en) Control system and method for rewriting control program
CN110855686B (en) SPI protocol communication method, system, equipment and computer storage medium
US11212658B2 (en) Method for providing near filed communication device information for user and system therefor
CN103378994A (en) Method and terminal for testing communication equipment
US7890666B2 (en) Embedded protocol selection technique, related interface and computer program product
CN103217956A (en) Industrial control system as well as control method and control device thereof
CN106126446A (en) A kind of USB device and the method identifying MacOS system thereof
CN111510363A (en) Slave station conversion device based on MODBUS protocol and control method thereof
CN109218149B (en) Equipment access method, device, network system and gateway
CN113466688A (en) Motor parameter identification method, device, motor, system and storage medium
CN116737640A (en) Information acquisition method, device, equipment and storage medium
CN105787408A (en) Card reader supporting high-speed data communication, and work method thereof
CN113961496A (en) Communication circuit system, method, chip and storage medium
CN111580857B (en) Equipment firmware online configuration method, device and system
CN111371799B (en) Method, device and equipment for controlling data receiving and transmitting of MCTP (Multi-channel media Port) controller
CN110533897B (en) Socket-based coffee roasting communication method
CN212486527U (en) Slave station conversion device based on MODBUS protocol
KR101810196B1 (en) Communication module in inverter
CN112134851A (en) Interface protocol generation method of train signal system
CN208861168U (en) A kind of single-chip microcontroller firmware remote update system
CN104331281B (en) A kind of proxy server and method that remote control function is provided for LXI modules
CN110475240B (en) SIM card type identification method and device of cloud SIM application terminal and terminal
CN113282286B (en) Algorithm development method and device

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