CN115474109B - Electric power system multithreading communication method and system based on CAN bus - Google Patents

Electric power system multithreading communication method and system based on CAN bus Download PDF

Info

Publication number
CN115474109B
CN115474109B CN202211355771.3A CN202211355771A CN115474109B CN 115474109 B CN115474109 B CN 115474109B CN 202211355771 A CN202211355771 A CN 202211355771A CN 115474109 B CN115474109 B CN 115474109B
Authority
CN
China
Prior art keywords
communication
thread
meter
data
intelligent electric
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
CN202211355771.3A
Other languages
Chinese (zh)
Other versions
CN115474109A (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.)
Anhui Bonus Information Technology Co ltd
Suzhou Power Supply Co of State Grid Anhui Electric Power Co Ltd
Original Assignee
Anhui Bonus Information Technology Co ltd
Suzhou Power Supply Co of State Grid Anhui Electric Power 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 Anhui Bonus Information Technology Co ltd, Suzhou Power Supply Co of State Grid Anhui Electric Power Co Ltd filed Critical Anhui Bonus Information Technology Co ltd
Priority to CN202211355771.3A priority Critical patent/CN115474109B/en
Publication of CN115474109A publication Critical patent/CN115474109A/en
Application granted granted Critical
Publication of CN115474109B publication Critical patent/CN115474109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/12Arrangements for remote connection or disconnection of substations or of equipment thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/30Arrangements in telecontrol or telemetry systems using a wired architecture
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q2209/00Arrangements in telecontrol or telemetry systems
    • H04Q2209/60Arrangements in telecontrol or telemetry systems for transmitting utility meters data, i.e. transmission of data from the reader of the utility meter

Abstract

The invention provides a multithreading communication method and a multithreading communication system of an electric power system based on a CAN bus, wherein a power server responds to a background meter reading operation instruction, and sends a meter reading communication request to an intelligent electric meter in a dormant interception mode based on multipath communication; and the power server performs data interaction with the data acquisition unit based on the main control thread to complete multi-thread communication. The invention improves the multithreading communication efficiency of the intelligent ammeter and the electric power server.

Description

Electric power system multithreading communication method and system based on CAN bus
Technical Field
The present application relates to the field of wireless communication technologies, and in particular, to a method and a system for multithread communication in a power system based on a CAN bus.
Background
As the coverage area of the power grid is continuously increased, the maintenance work of the power grid is more and more difficult. The method for reading the electric energy meter accessed to the power grid is very complex work, especially for the actual position of the electric energy meter, the corresponding meter users of the electric energy meter and the corresponding electric energy meter data in the previous period, the meter reading personnel need to check the electric energy meter one by one and complete the meter reading work one by one, the labor intensity of the operating personnel is increased, and the data are easily mistaken in the actual operation process due to errors.
Aiming at various defects of manual meter reading, various intelligent electric energy meters appear in the prior art, and the function of remote meter reading of the intelligent electric energy meters is realized by utilizing a network so as to reduce the labor intensity of operators. However, a special meter reading system needs to be constructed for the intelligent electric energy meter, a communication network needs to be erected independently, meter reading cost is greatly increased, multi-thread communication cannot be achieved during meter reading, searching or awakening operation on the intelligent electric energy meter cannot be performed in a background of meter reading, the intelligent electric energy meter needs to maintain a communication mode with the background in real time, workload of the intelligent electric energy meter is increased, and automatic dormancy or awakening cannot be performed according to communication requirements.
Disclosure of Invention
In view of the above problems, an object of the present application is to provide a power system multithread communication method and system based on a CAN bus, so as to improve the multithread communication efficiency between an intelligent electric meter and a power server.
The purpose of the application is realized by adopting the following technical scheme:
in a first aspect, the present application provides a power system multithreading communication method based on a CAN bus, which is applied to multithreading communication between an intelligent ammeter and a power server in a CAN bus communication manner, and includes the following steps:
the electric power server responds to a background meter reading operation instruction and sends a meter reading communication request to the intelligent electric meter in the dormant monitoring mode based on multi-path communication, wherein the meter reading communication request comprises a wake-up instruction in the dormant monitoring mode and an electric meter data acquisition instruction;
the power server performs data interaction with the data collector bundled by the intelligent electric meters on the basis of a wireless or wired network and establishes a master control thread, wherein the data collector establishes a communication sub-thread connected with each lower intelligent electric meter on the basis of a CAN (controller area network) bus and establishes a process table forming a link with each intelligent electric meter;
the data acquisition unit starts the intelligent ammeter connected with the corresponding communication sub-thread based on the meter reading communication request, the intelligent ammeter after responding to the awakening instruction enters a data detection mode, ammeter data in the current time period are acquired and transmitted, and a multi-thread controlled communication mode is entered;
the electric power server performs data interaction with the data acquisition unit based on the main control thread to complete multi-thread communication, and the intelligent electric meter is switched to enter a default sleep interception mode under overtime control.
As a further scheme of the invention, a communication protocol is established between the power server and at least one data collector in a 485 communication line, RPC or electronic carrier mode and is used for transmission or communication of uplink data, a service module at the power server end is independent of the RPC, and the service module executes a remote process call function through an interface provided by the RPC.
As a further scheme of the present invention, the power server performs data interaction with the data collector bundled by the smart meters based on a wireless or wired network and establishes a main control thread, and further includes:
establishing a main control thread between the power server and the data collector based on a 485 communication line, RPC or an electronic carrier mode, wherein the main control thread is used for initiating a link request by the power server or responding to a processing link request by the data collector;
and establishing communication sub-threads between the data collector and each downlink intelligent electric meter based on the master control thread, wherein each communication sub-thread is connected corresponding to one CAN, and the CAN of the intelligent electric meter connected with the data collector forms a CAN bus for receiving and sending messages through the communication sub-threads.
The method further comprises the step of recording link information of the communication sub-thread of each intelligent electric meter in a process table forming a link, wherein the link information comprises the command receiving and sending and data transmission processes of the intelligent electric meters.
As a further scheme of the present invention, before the data collector starts the smart meter connected to the corresponding communication sub-thread based on the meter reading communication request, the method further includes binding the smart meter, and the method for binding the smart meter includes:
traversing the descending intelligent electric meter of the data acquisition unit based on the awakening instruction of the meter reading communication request;
if the awakening instruction is matched with the corresponding intelligent electric meter, executing awakening instruction operation, switching the intelligent electric meter from a dormancy monitoring mode to a data detection mode, and entering a multi-thread controlled communication mode;
if the awakening instruction is not matched with the corresponding intelligent electric meter, acquiring the identifier of the downlink intelligent electric meter of the data acquisition device, starting the unbound intelligent electric meter to enter a to-be-bound mode and feeding back the to-be-bound instruction;
the electric power server binds based on the received to-be-bound instruction and sends an effective binding instruction to the intelligent electric meter, and the intelligent electric meter enters a data detection mode and a multi-thread controlled communication mode after receiving the effective binding instruction.
As a further scheme of the invention, the smart meter is switched to enter a default sleep interception mode under timeout control, wherein the smart meter under the multithreading controlled communication mode starts a timing mechanism, and when the controlled communication operation is not executed beyond a preset time threshold, the smart meter is judged to be overtime and actively enters the sleep interception mode.
As a further scheme of the present invention, when the smart meter after responding to the wake-up instruction enters a data detection mode and collects and transmits meter data of a current time period, the method further includes:
the intelligent ammeter sends a data transmission process instruction based on the collected ammeter data in the current time period;
the data acquisition unit receives the data transmission progress instruction based on the communication sub-thread and determines the working progress of data transmission of the intelligent electric meter based on a progress table;
and when the intelligent electric meter receives the multi-thread event, the multi-thread event is added to the asynchronous task allocation thread corresponding to each intelligent electric meter controlled by the data acquisition unit, the asynchronous task queue is executed based on the added asynchronous task allocation thread, and the next task is automatically and asynchronously executed after the work process is completed within the process pool permission range.
As a further scheme of the invention, when the asynchronous task queue is executed based on the added asynchronous task allocation thread, the data acquisition unit is also used for periodically polling the process pool based on the asynchronous task allocation thread, when detecting that the process in the process pool is completed, automatically generating an exit mark for the completed process, and selecting and executing process information in the rest asynchronous tasks.
In a second aspect, in another embodiment provided by the present invention, a power system multithreading communication system based on a CAN bus is provided, which is applied to multithreading communication between a smart meter and a power server by using a CAN bus communication method, and includes: the intelligent ammeter monitoring system comprises a request sending module, a data acquisition module and a data acquisition module, wherein the request sending module is used for receiving a meter reading communication request sent by a power server to an intelligent ammeter in a dormant monitoring mode, and the meter reading communication request comprises a wake-up instruction and an ammeter data acquisition instruction in the dormant monitoring mode; the thread establishing module is used for the power server to perform data interaction with the data collector bundled by the intelligent electric meters on the basis of a wireless or wired network and establish a master control thread, wherein the data collector establishes a communication sub-thread connected with each lower intelligent electric meter on the basis of a CAN (controller area network) bus and establishes a process table forming a link with each intelligent electric meter; the data acquisition module is used for starting the intelligent ammeter connected with the corresponding communication sub-thread according to the meter reading communication request, responding to the awakening instruction, enabling the intelligent ammeter to enter a data detection mode, acquiring and transmitting ammeter data in the current time period and entering a multi-thread controlled communication mode; the mode switching module is used for the force server to perform data interaction with the data acquisition unit based on the main control thread to complete multi-thread communication, and the intelligent electric meter is switched to enter a default dormancy interception mode under overtime control; the electric meter binding module is used for collecting the identification of the intelligent electric meter which is descended by the data collector when the awakening instruction is not matched with the corresponding intelligent electric meter, starting the unbound intelligent electric meter to enter a to-be-bound mode and feeding back the to-be-bound instruction, the power server binds based on the received to-be-bound instruction and sends an effective binding instruction to the intelligent electric meter, and the intelligent electric meter enters a data detection mode and a multithreading controlled communication mode after receiving the effective binding instruction.
In a third aspect, in a further embodiment provided by the present invention, a computer device is provided, which includes a memory and a processor, the memory stores a computer program, and the processor executes the steps corresponding to the method for multithread communication based on a CAN bus in an electric power system as described in the first aspect.
In a fourth aspect, in a further embodiment of the present invention, a storage medium is provided, where at least one executable instruction is stored, and the executable instruction causes a processor to execute the steps corresponding to the method for the multi-thread communication of the CAN-bus based power system according to the first aspect.
Drawings
The present application is further described below with reference to the drawings and examples.
Fig. 1 is a flowchart of a multithread communication method for a power system based on a CAN bus according to an embodiment of the present disclosure;
fig. 2 is a system block diagram of a multi-thread communication system of a power system based on a CAN bus according to an embodiment of the present application;
fig. 3 is a block diagram of a computer device according to an embodiment of the present application.
Detailed Description
The present application is further described with reference to the accompanying drawings and the detailed description, and it should be noted that, in the case of no conflict, any combination between the embodiments or technical features described below may form a new embodiment.
The technical solutions in the exemplary embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the exemplary embodiments of the present invention, and it is apparent that the described exemplary embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Because the meter reading of the electric energy meter accessed to the power grid is very complex work, manual meter reading requires that meter reading personnel check one by one and complete meter reading work one by one during meter reading, the meter reading mode not only increases the labor intensity of the operating personnel, but also easily causes wrong data reading due to errors in the actual operation process. The existing intelligent electric energy meter needs to construct a special meter reading system and needs to independently erect a communication network, so that the meter reading cost is greatly improved.
In order to solve the above problems, embodiments of the present invention provide a method and a system for multithread communication of a power system based on a CAN bus, which are applied to multithread communication between an intelligent electric meter and a power server in a CAN bus communication manner, and CAN implement multithread communication during meter reading, and CAN perform a search or wake-up operation on the intelligent electric meter in a meter reading background.
The invention provides a power system multithreading communication method and system based on a CAN bus, which are applied to the multithreading communication between an intelligent ammeter and a power server in a CAN bus communication mode. The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Fig. 1 is a flowchart of a multithread communication method for a power system based on a CAN bus according to the present invention. Referring to fig. 1, an embodiment of the present invention provides a power system multithread communication method based on a CAN bus, which includes steps S10 to S40.
Step S10, the power server responds to a background meter reading operation instruction and sends a meter reading communication request to the intelligent ammeter in the dormant monitoring mode based on multi-path communication, wherein the meter reading communication request comprises a wake-up instruction of the dormant monitoring mode and an ammeter data acquisition instruction;
step S20, the power server performs data interaction with a data collector of the intelligent electric meter cluster based on a wireless or wired network and establishes a master control thread, wherein the data collector establishes a communication sub-thread connected with each lower intelligent electric meter based on a CAN bus and establishes a process table forming a link with each intelligent electric meter;
step S30, the data acquisition unit starts the intelligent ammeter connected with the corresponding communication sub-thread based on the meter reading communication request, the intelligent ammeter after responding to the awakening instruction enters a data detection mode, ammeter data in the current time period are acquired and transmitted, and the intelligent ammeter enters a multi-thread controlled communication mode;
and S40, the power server performs data interaction with the data acquisition unit based on the main control thread to complete multi-thread communication, and the intelligent electric meter is switched to enter a default sleep interception mode under overtime control.
In this embodiment, a communication protocol is established between the power server and the at least one data collector through a 485 communication line, an RPC or an electronic carrier mode, so as to transmit or communicate uplink data, a service module at the power server end is independent from the RPC, and the service module executes a remote procedure call function through an interface provided by the RPC.
In this embodiment, the power server performs data interaction with the data collector bundled by the smart meter based on a wireless or wired network and establishes a main control thread, and further includes:
establishing a main control thread between the power server and the data collector based on a 485 communication line, RPC or an electronic carrier mode, wherein the main control thread is used for initiating a link request by the power server or responding to a processing link request by the data collector;
and establishing communication sub-threads between the data collector and each downlink intelligent electric meter based on the master control thread, wherein each communication sub-thread is connected corresponding to one CAN, and the CAN of the intelligent electric meter connected with the data collector forms a CAN bus for receiving and sending messages through the communication sub-threads.
In this embodiment, the method further includes recording link information of the communication sub-thread of each smart meter in a process table forming a link, where the link information includes a command transceiving process and a data transmission process of the smart meter.
In this embodiment, before the data collector starts the smart meter connected to the corresponding communication sub-thread based on the meter reading communication request, the method further includes binding the smart meter, and the method for binding the smart meter includes:
traversing the intelligent electric meter descending by the data acquisition unit based on the awakening instruction of the meter reading communication request;
if the awakening instruction is matched with the corresponding intelligent electric meter, executing awakening instruction operation, switching the intelligent electric meter from a dormancy monitoring mode to a data detection mode, and entering a multi-thread controlled communication mode;
if the awakening instruction is not matched with the corresponding intelligent electric meter, acquiring the identifier of the downlink intelligent electric meter of the data acquisition device, starting the unbound intelligent electric meter to enter a to-be-bound mode and feeding back the to-be-bound instruction;
the electric power server binds based on the received to-be-bound instruction and sends an effective binding instruction to the intelligent electric meter, and the intelligent electric meter enters a data detection mode and a multi-thread controlled communication mode after receiving the effective binding instruction.
In this embodiment, the smart meter is switched to enter a default sleep listening mode under timeout control, wherein the smart meter in the multithreading controlled communication mode starts a timing mechanism, and determines that the smart meter is timed out and actively enters the sleep listening mode when the controlled communication operation is not executed beyond a preset time threshold.
In this embodiment, when the smart electric meter after responding to the wake-up instruction enters a data detection mode and collects and transmits electric meter data of a current time period, the method further includes:
the intelligent ammeter sends a data transmission process instruction based on the collected ammeter data in the current time period;
the data acquisition unit receives the data transmission progress instruction based on the communication sub-thread and determines the working progress of data transmission of the intelligent electric meter based on a progress table;
and when the intelligent electric meter receives the multithreading event, the multithreading event is added to the asynchronous task allocation thread corresponding to each intelligent electric meter controlled by the data acquisition unit, the asynchronous task queue is executed based on the added asynchronous task allocation thread, and the next task is automatically and asynchronously executed after the work process is completed within the process pool permission range.
In this embodiment, when the asynchronous task queue is executed based on the added asynchronous task allocation thread, the data collector is further configured to periodically poll the process pool based on the asynchronous task allocation thread, and when it is detected that the process in the process pool is completed, automatically generate an exit flag for the completed process, and select and execute process information in the remaining asynchronous tasks.
Referring to fig. 2, an embodiment of the present application further provides a power system multithreading communication system based on a CAN bus, which is applied to a multithreading communication between an intelligent ammeter and a power server in a CAN bus communication manner, and is used to implement the power system multithreading communication method based on the CAN bus described in the foregoing embodiment, where a specific implementation manner of the power system multithreading communication method is consistent with the implementation manner and achieved technical effects described in the foregoing embodiment of the power system multithreading communication method based on the CAN bus, and details of the implementation manner are not repeated.
The electric power system multithreading communication system based on the CAN bus comprises: the multithreading communication system of the electric power system comprises: the intelligent ammeter data acquisition system comprises a request sending module 100, a data acquisition module and a data acquisition module, wherein the request sending module is used for receiving a meter reading communication request sent by a power server to an intelligent ammeter in a sleep interception mode, and the meter reading communication request comprises a wake-up instruction in the sleep interception mode and an ammeter data acquisition instruction; the thread establishing module 200 is used for the power server to perform data interaction with the data collector bundled by the intelligent electric meters based on a wireless or wired network and establish a main control thread, wherein the data collector establishes a communication sub-thread connected with each lower intelligent electric meter based on a CAN bus and establishes a process table forming a link with each intelligent electric meter; the data acquisition module 300 is used for starting the intelligent ammeter connected with the corresponding communication sub-thread according to the meter reading communication request by the data acquisition unit, enabling the intelligent ammeter after responding to the awakening instruction to enter a data detection mode, acquiring and transmitting ammeter data in the current time period and entering a multi-thread controlled communication mode; the mode switching module 400 is used for the force server to perform data interaction with the data collector based on the main control thread to complete multi-thread communication, and the intelligent electric meter is switched to enter a default dormancy interception mode under overtime control; the electric meter binding module 500 is used for collecting the identification of the downlink intelligent electric meter of the data collector when the awakening instruction is not matched with the corresponding intelligent electric meter, starting the unbound intelligent electric meter to enter a to-be-bound mode and feeding back the to-be-bound instruction, binding the electric power server based on the received to-be-bound instruction and sending an effective binding instruction to the intelligent electric meter, and enabling the intelligent electric meter to enter a data detection mode and a multi-thread controlled communication mode after receiving the effective binding instruction.
The steps of the electrical power system multithreading communication method based on the CAN bus are adopted in the electrical power system multithreading communication system based on the CAN bus during execution, so the operation process of the electrical power system multithreading communication system based on the CAN bus in the embodiment is not described in detail.
FIG. 3 shows a block diagram of a computer device according to an embodiment of the invention. The foregoing embodiment describes a function and structure of the implantable neurostimulator communicating with the power server in the CAN bus communication manner in the CAN bus based power system multithreading communication method, and in one possible design, the communication function and structure of the foregoing CAN bus based power system multithreading communication method CAN be implemented as a computer device. As shown in fig. 3, in an embodiment of the present invention, a computer device 300 is provided, the computer device 300 comprising a memory 301 and a processor 302, the memory 301 having stored therein a computer program, the processor 302 being configured for executing the computer program stored in said memory 301. The memory 301 is configured to store one or more computer instructions, where the one or more computer instructions are executed by the processor 302 to implement the steps in the above-described method embodiment, and is applied to the multi-thread communication between the smart meter and the power server using the CAN bus communication method, where the power system multi-thread communication method includes the following steps:
the electric power server responds to a background meter reading operation instruction and sends a meter reading communication request to the intelligent electric meter in the dormant monitoring mode based on multi-path communication, wherein the meter reading communication request comprises a wake-up instruction in the dormant monitoring mode and an electric meter data acquisition instruction;
the power server performs data interaction with the data collector bundled by the intelligent electric meters on the basis of a wireless or wired network and establishes a master control thread, wherein the data collector establishes a communication sub-thread connected with each lower intelligent electric meter on the basis of a CAN (controller area network) bus and establishes a process table forming a link with each intelligent electric meter;
the data acquisition unit starts the intelligent ammeter connected with the corresponding communication sub-thread based on the meter reading communication request, the intelligent ammeter after responding to the awakening instruction enters a data detection mode, ammeter data in the current time period are acquired and transmitted, and a multi-thread controlled communication mode is entered;
the electric power server performs data interaction with the data acquisition unit based on the main control thread to complete multithreading communication, and the intelligent electric meter is switched to enter a default sleep interception mode under overtime control.
The embodiment of the present application further provides a storage medium, where the storage medium is used to store a computer program, and when the computer program is executed, the method for multithread communication of the power system based on the CAN bus in the embodiment of the present application is implemented, where the method includes the following steps:
the electric power server responds to a background meter reading operation instruction and sends a meter reading communication request to the intelligent electric meter in the dormant monitoring mode based on multi-path communication, wherein the meter reading communication request comprises a wake-up instruction in the dormant monitoring mode and an electric meter data acquisition instruction;
the power server performs data interaction with the data collector bundled by the intelligent electric meters on the basis of a wireless or wired network and establishes a master control thread, wherein the data collector establishes a communication sub-thread connected with each lower intelligent electric meter on the basis of a CAN (controller area network) bus and establishes a process table forming a link with each intelligent electric meter;
the data acquisition unit starts the intelligent ammeter connected with the corresponding communication sub-thread based on the meter reading communication request, the intelligent ammeter after responding to the awakening instruction enters a data detection mode, ammeter data in the current time period are acquired and transmitted, and a multi-thread controlled communication mode is entered;
the electric power server performs data interaction with the data acquisition unit based on the main control thread to complete multithreading communication, and the intelligent electric meter is switched to enter a default sleep interception mode under overtime control.
The specific implementation manner of the storage medium is consistent with the implementation manner and achieved technical effect of the embodiment of the multithreading communication method of the power system based on the CAN bus, and details are not repeated.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory.
While the present application is described in terms of various aspects, including exemplary embodiments, the principles of the invention should not be limited to the disclosed embodiments, but are also intended to cover various modifications, equivalents, and alternatives falling within the spirit and scope of the invention as defined by the appended claims.

Claims (9)

1. A power system multithreading communication method based on a CAN bus is characterized by being applied to multithreading communication between an intelligent ammeter and a power server in a CAN bus communication mode, and comprising the following steps of:
the electric power server responds to a background meter reading operation instruction and sends a meter reading communication request to the intelligent electric meter in the dormant monitoring mode based on multi-path communication, wherein the meter reading communication request comprises a wake-up instruction in the dormant monitoring mode and an electric meter data acquisition instruction;
the power server performs data interaction with a data collector bundled by the intelligent electric meters on the basis of a wireless or wired network and establishes a master thread, wherein the data collector establishes a communication sub-thread connected with each lower intelligent electric meter on the basis of a CAN (controller area network) bus, creates a process table forming a link with each intelligent electric meter, and records link information of the communication sub-threads of each intelligent electric meter in the process table forming the link, wherein the link information comprises an instruction receiving and sending process and a data transmission process of the intelligent electric meters;
the data acquisition unit starts the intelligent ammeter connected with the corresponding communication sub-thread based on the meter reading communication request, the intelligent ammeter after responding to the awakening instruction enters a data detection mode, ammeter data in the current time period are acquired and transmitted, and the intelligent ammeter enters a multi-thread controlled communication mode;
the electric power server performs data interaction with the data acquisition unit based on the main control thread to complete multithreading communication, and the intelligent electric meter is switched to enter a default sleep interception mode under overtime control.
2. The CAN-bus-based multithread communication method for the power system according to claim 1, wherein a communication protocol is established between the power server and the at least one data collector in a 485 communication line, RPC or electronic carrier mode for transmission or communication of uplink data, a service module at the power server side is independent from the RPC, and the service module executes a remote procedure call function through an interface provided by the RPC.
3. The CAN-bus-based multithread communication method for the electric power system according to claim 2, wherein the electric power server performs data interaction with the data collector bundled by the smart meters and establishes a main control thread based on a wireless or wired network, further comprising:
establishing a main control thread between the power server and the data collector based on a 485 communication line, RPC or electronic carrier mode, wherein the main control thread is used for the power server to initiate a link request or the data collector to respond and process the link request;
and establishing communication sub-threads between the data collector and each downlink intelligent electric meter based on the master control thread, wherein each communication sub-thread is connected corresponding to one CAN, and the CAN of the intelligent electric meter connected with the data collector forms a CAN bus for receiving and sending messages through the communication sub-threads.
4. The CAN-bus-based multithreading communication method for the electric power system according to claim 3, wherein before the data collector starts the smart meter connected to the corresponding communication sub-thread based on the meter reading communication request, the method further comprises binding the smart meter, and the method for binding the smart meter comprises the following steps:
traversing the descending intelligent electric meter of the data acquisition unit based on the awakening instruction of the meter reading communication request;
if the awakening instruction is matched with the corresponding intelligent electric meter, executing awakening instruction operation, switching the intelligent electric meter from a dormancy monitoring mode to a data detection mode, and entering a multi-thread controlled communication mode;
if the awakening instruction is not matched with the corresponding intelligent electric meter, acquiring the identification of the downlink intelligent electric meter of the data acquisition device, starting the unbound intelligent electric meter to enter a to-be-bound mode and feeding back the to-be-bound instruction;
the electric power server binds based on the received to-be-bound instruction and sends an effective binding instruction to the intelligent electric meter, and the intelligent electric meter enters a data detection mode and a multithreading controlled communication mode after receiving the effective binding instruction.
5. The CAN-bus-based multithread communication method for the power system according to claim 1, wherein the smart meter is switched to enter a default sleep and intercept mode under timeout control, wherein the smart meter in the multithread controlled communication mode starts a timing mechanism, and determines timeout and actively enters the sleep and intercept mode when a preset time threshold is exceeded and no controlled communication operation is performed.
6. The CAN-bus-based multithread communication method for the power system according to claim 5, wherein when the smart meter enters a data detection mode after responding to the wake-up command and collects and transmits meter data in a current time period, the method further comprises:
the intelligent ammeter sends a data transmission process instruction based on the collected ammeter data in the current time period;
the data acquisition unit receives the data transmission progress instruction based on the communication sub-thread and determines the working progress of data transmission of the intelligent electric meter based on a progress table;
and when the intelligent electric meter receives the multi-thread event, the multi-thread event is added to the asynchronous task allocation thread corresponding to each intelligent electric meter controlled by the data acquisition unit, the asynchronous task queue is executed based on the added asynchronous task allocation thread, and the next task is automatically and asynchronously executed after the work process is completed within the process pool permission range.
7. The CAN-bus-based multithreading communication method for the power system as recited in claim 6, wherein the data collector is further configured to periodically poll the process pool based on the asynchronous task allocation thread when the asynchronous task queue is executed based on the added asynchronous task allocation thread, automatically generate an exit flag for a completed process when completion of the process in the process pool is detected, and select and execute process information from remaining asynchronous tasks.
8. A multi-thread communication system of an electric power system based on a CAN bus is applied to multi-thread communication between an intelligent ammeter and an electric power server in a CAN bus communication mode, and comprises:
the intelligent ammeter monitoring system comprises a request sending module, a data acquisition module and a data acquisition module, wherein the request sending module is used for receiving a meter reading communication request sent by a power server to an intelligent ammeter in a sleep monitoring mode, and the meter reading communication request comprises a wake-up instruction in the sleep monitoring mode and an ammeter data acquisition instruction;
the thread establishing module is used for the power server to perform data interaction with the data collector bundled by the intelligent electric meters and establish a master control thread on the basis of a wireless or wired network, wherein the data collector establishes a communication sub-thread connected with each lower intelligent electric meter on the basis of a CAN (controller area network) bus, establishes a process table forming a link with each intelligent electric meter, and records link information of the communication sub-thread of each intelligent electric meter in the process table forming the link, wherein the link information comprises an instruction receiving and sending process and a data transmission process of the intelligent electric meter;
the data acquisition module is used for starting the intelligent ammeter connected with the corresponding communication sub-thread based on the meter reading communication request by the data acquisition unit, responding to the awakening instruction, entering a data detection mode, acquiring and transmitting ammeter data in the current time period and entering a multi-thread controlled communication mode;
and the mode switching module is used for the force server to perform data interaction with the data acquisition unit based on the main control thread to complete multithread communication, and the intelligent electric meter is switched to enter a default dormancy interception mode under overtime control.
9. The CAN-bus-based multithreading communication system for the electric power system according to claim 8, further comprising an electric meter binding module, configured to collect an identifier of a downlink smart electric meter of the data collector when the wake-up command is not matched to the corresponding smart electric meter, start the unbound smart electric meter to enter a to-be-bound mode and feed back the to-be-bound command, the electric power server binds based on the received to-be-bound command and sends an effective binding command to the smart electric meter, and the smart electric meter enters the data detection mode and the multithreading controlled communication mode after receiving the effective binding command.
CN202211355771.3A 2022-11-01 2022-11-01 Electric power system multithreading communication method and system based on CAN bus Active CN115474109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211355771.3A CN115474109B (en) 2022-11-01 2022-11-01 Electric power system multithreading communication method and system based on CAN bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211355771.3A CN115474109B (en) 2022-11-01 2022-11-01 Electric power system multithreading communication method and system based on CAN bus

Publications (2)

Publication Number Publication Date
CN115474109A CN115474109A (en) 2022-12-13
CN115474109B true CN115474109B (en) 2023-02-03

Family

ID=84336140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211355771.3A Active CN115474109B (en) 2022-11-01 2022-11-01 Electric power system multithreading communication method and system based on CAN bus

Country Status (1)

Country Link
CN (1) CN115474109B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2533398A2 (en) * 2011-06-08 2012-12-12 Alstom Grid Enhanced communication infrastructure for hierarchical intelligent power distribution grid
CN102932447A (en) * 2012-10-30 2013-02-13 无锡威泰迅电力科技有限公司 Distribution room remote data acquisition and analysis system
CN106790586A (en) * 2016-12-28 2017-05-31 国电南瑞科技股份有限公司 A kind of city multiple-energy-source Collect jointly method
CN109788024A (en) * 2018-12-05 2019-05-21 成都长城开发科技有限公司 The high-performance distributed remote meter reading acquisition server solution of High Availabitity high concurrent
CN110225048A (en) * 2019-06-19 2019-09-10 腾讯科技(成都)有限公司 Data transmission method, device, first terminal and storage medium
CN112735115A (en) * 2020-12-28 2021-04-30 新天科技股份有限公司 Multithreading business processing method and device, server and storage medium
CN114167794A (en) * 2021-12-20 2022-03-11 苏州易助能源管理有限公司 Remote data acquisition system and data acquisition method for intelligent electric meter

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9311762B2 (en) * 2014-01-15 2016-04-12 Matthew Howard Godley Vehicle control system
WO2019028269A2 (en) * 2017-08-02 2019-02-07 Strong Force Iot Portfolio 2016, Llc Methods and systems for detection in an industrial internet of things data collection environment with large data sets

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2533398A2 (en) * 2011-06-08 2012-12-12 Alstom Grid Enhanced communication infrastructure for hierarchical intelligent power distribution grid
CN102932447A (en) * 2012-10-30 2013-02-13 无锡威泰迅电力科技有限公司 Distribution room remote data acquisition and analysis system
CN106790586A (en) * 2016-12-28 2017-05-31 国电南瑞科技股份有限公司 A kind of city multiple-energy-source Collect jointly method
CN109788024A (en) * 2018-12-05 2019-05-21 成都长城开发科技有限公司 The high-performance distributed remote meter reading acquisition server solution of High Availabitity high concurrent
CN110225048A (en) * 2019-06-19 2019-09-10 腾讯科技(成都)有限公司 Data transmission method, device, first terminal and storage medium
CN112735115A (en) * 2020-12-28 2021-04-30 新天科技股份有限公司 Multithreading business processing method and device, server and storage medium
CN114167794A (en) * 2021-12-20 2022-03-11 苏州易助能源管理有限公司 Remote data acquisition system and data acquisition method for intelligent electric meter

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于CAN 总线的采棉机作业状态;韩科立;《农业机械》;20190908;全文 *
基于CAN总线的混合动力客车数据采集系统;宋超;《第八届中国智能交通年会优秀论文集——轨道交通》;20130926;全文 *

Also Published As

Publication number Publication date
CN115474109A (en) 2022-12-13

Similar Documents

Publication Publication Date Title
CN103026763B (en) Communicator and communication means, and communication system
CN111726769B (en) Communication system, method and device for miniature intelligent sensor
CN106384495B (en) The transparent multiplexed transport method and device of power information capturing service
CN111954194A (en) Wireless intelligent tag refreshing control method and device based on Internet of things
EP2521030A1 (en) Intelligent data terminal and application method thereof
CN102064605B (en) Method for realizing mutual hot backup of electric energy acquisition systems
CN104597789B (en) A kind of self-checking unit of charging pile, system and method
CN103198636A (en) High speed wireless data acquisition method and apparatus for pulsation pressure of high speed train
CN113709689A (en) Interaction method of wireless communication module and sensor of power internet of things
CN112738755A (en) Method for interaction between wireless communication module and sensor in field of power internet of things
CN110913443B (en) Intelligent multi-sensor cooperative detection method and device, sensor and storage medium
CN115474109B (en) Electric power system multithreading communication method and system based on CAN bus
CN111866752A (en) Intelligent cooperative operation method and system among multiple robots
CN103024023B (en) Digital Reading Room network audit method
WO2017121359A1 (en) Method for keeping working state of smart card entering field again, and smart card
CN107179948A (en) A kind of card writing method and system
CN109672731A (en) A kind of distributed node information monitoring method, system and application
CN111757335B (en) Access and access control method, device, system, node and storage medium
CN116634100B (en) Information interaction method and system based on IPC
CN113285989A (en) Intelligent management method and system for electric vehicle charging station based on Internet of things
CN112543477B (en) Method, device, terminal and storage medium for sending measurement report
CN106131331B (en) A kind of method, apparatus and system that multiple smart machines are uniformly controlled
CN111935728B (en) Handshaking method, device, related equipment, storage medium and system
CN109121145A (en) A kind of system message acquisition method and device, computer readable storage medium
CN114124324B (en) Method and device for cooperative communication of multiple access points

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