A communication control method, communication equipment and power information distributed management system
By obtaining and granting the target system permissions in the application process of the master station, it can directly communicate with the slave station at the data link layer, solving the cost and reliability shortcomings of traditional power communication systems, and achieving efficient and reliable communication between the master station and the slave station.
Patent Information
- Application Number
- CN202410733054.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-06-07
AI Technical Summary
Traditional power communication systems have shortcomings in taking into account communication costs and reliability. Low-reliability Ethernet and complex and costly PLC devices cannot meet the high requirements of smart grids for communication control technology.
By obtaining and granting the target system permissions in the application process of the master station, the application process can directly communicate with the slave station at the data link layer, realizing high-availability network communication between the master station and the slave station.
It improves the communication efficiency and reliability between the master station and the slave station, reduces communication delay and failure rate, and enhances the real-time control and status monitoring capabilities of power equipment.
Smart Images

Figure CN118394546B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information communication, and in particular relates to a communication control method, communication equipment and a distributed power information management system. Background Art
[0002] In modern power systems, information technology is increasingly used, especially in power monitoring, equipment management and data communication. With the development of smart grids, higher requirements are placed on communication control technology in power systems. Traditional power communication systems rely on low-reliability Ethernet for information transmission, or use PLC devices with complex network structures and high costs. However, these solutions cannot take into account both the cost and reliability of communication. Summary of the invention
[0003] The object of the present invention is to provide a communication control method, communication equipment and electric power information distributed management system, which realizes direct and high-availability network communication between the master station and the slave stations by performing authority management on the application process of the master station.
[0004] To solve the above technical problems, the present invention is achieved through the following technical solutions:
[0005] The present invention discloses a communication control method, comprising:
[0006] Acquire a target communication protocol layer of a slave station, wherein the slave station communicates with the master station through the target communication protocol layer;
[0007] Create several application processes on the master site;
[0008] Obtain the target system permissions required by the application process to communicate at the target communication protocol layer;
[0009] Granting the target system permissions to the application process;
[0010] The application process running in the master station communicates directly or indirectly with the slave station.
[0011] Furthermore, the communication interaction between the application process and the slave station occurs between the operating system layer and the hardware abstraction layer.
[0012] Furthermore, the step of the application process running in the master station communicating directly or indirectly with the slave station includes:
[0013] The application process generates a sub-message for each of the slave stations respectively;
[0014] Encapsulating all the sub-messages to obtain a data frame;
[0015] sending the data frame to the slave station;
[0016] The master station receives the data frame which is received, read, written and forwarded by the slave station and then transmitted back to the master station.
[0017] Furthermore, the step of the application process running in the master station communicating directly or indirectly with the slave station includes:
[0018] The application process includes a configuration process;
[0019] The configuration process continuously generates sub-messages including status register query instructions, and encapsulates the sub-messages into the data frame and sends them to all the slave stations;
[0020] Obtaining the state of each slave station according to the data frame received by the return transmission, wherein the state of each slave station includes an initialization state, a pre-operation state, a safe operation state, and an operation state;
[0021] If the network path for the slave station to transmit the data frame back to the master station changes, the configuration process generates a state change instruction to change the state of the slave station to the initialization state.
[0022] Further, if the slave station is in an initialization state, then,
[0023] The configuration process generates a sub-message containing an initialization instruction and targeting the slave station in the initialization state, and encapsulates the sub-message into the data frame and sends the sub-message to all the slave stations;
[0024] Wherein, the initialization instruction clears the bus memory management unit and data synchronization manager configuration of the slave station in the initialization state, sets the network address and non-real-time data configuration information, and sets clock synchronization;
[0025] After completion, the configuration process generates a state change instruction to change the state of the slave station in the initialization state after completion to the pre-operation state.
[0026] Further, if the slave station is in the pre-operation state, then,
[0027] The configuration process generates a sub-message including a configuration write instruction and targeting the slave station in the pre-operation state, and encapsulates the sub-message into the data frame and sends the sub-message to all the slave stations;
[0028] Wherein, the configuration write instruction writes the real-time exchange data to be mapped and the mapping of the bus memory management unit to the slave station in the pre-operation state, and configures the time synchronization parameters;
[0029] After completion, the configuration process generates a state change instruction to change the state of the slave station in the pre-operation state after completion to the safe operation state;
[0030] The master station performs real-time data exchange communication and clock synchronization with the slave station in the safe operation state, and determines whether real-time data exchange communication and stable clock synchronization can be achieved;
[0031] If so, the configuration process generates a state change instruction to change the state of the slave station to the running state;
[0032] If not, report an error.
[0033] The present invention also discloses a communication control method, comprising:
[0034] Communicate with the master station.
[0035] The invention also discloses a communication device, comprising a main station.
[0036] The invention also discloses a communication device, comprising a slave station.
[0037] The present invention also discloses a distributed power information management system, including a master station and a plurality of slave stations;
[0038] Wherein, the slave station acquires power information;
[0039] The slave station transmits the power information back to the master station.
[0040] The present invention grants the application process in the master station a lower-level system authority, so that the application process can directly communicate with the slave station at the data link layer, thereby improving the communication efficiency and reliability between the master station and the slave station.
[0041] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0043] Figure 1 A schematic flow chart of the steps of a communication control method according to the present invention;
[0044] Figure 2 It is a schematic diagram of information flow during the communication between the master station and the slave station of the present invention;
[0045] Figure 3 It is a hierarchical diagram of the communication network between the master station and the slave station of the present invention;
[0046] Figure 4 This is the system architecture diagram of the master station in the traditional solution;
[0047] Figure 5 is a system architecture diagram of the master station of the present invention;
[0048] Figure 6 is a schematic diagram of step S5 of the present invention in an embodiment;
[0049] Figure 7 It is a schematic diagram of the process of querying and managing the status of slave stations by the master station according to the present invention;
[0050] Figure 8 It is a schematic diagram of the communication connection state between some slave stations and the master station after being disconnected according to the present invention;
[0051] Fig. 9 This is a schematic diagram of the process flow of the master station processing a slave station in an initialization state according to the present invention;
[0052] Fig.10 It is a schematic diagram of the processing flow of the master station on the slave station in the pre-operation state according to the present invention;
[0053] In the accompanying drawings, the components represented by the reference numerals are listed as follows:
[0054] 1-Master, 2-Slave. DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0056] It should be noted that the terms "first", "second", etc. in this application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0057] In order to obtain the real-time status of numerous power equipment widely distributed in the power system and to control them in real time, the slave station can be connected to the control interface of the power equipment, and the master station and the slave station can communicate with each other. Various applications need to be installed in the master station according to customer needs. In traditional solutions, the application process runs at the application layer, but the communication between the master station and the slave station occurs at the data link layer, which leads to a large delay in the communication between the application process in the master station and the slave station, which can easily cause the power equipment to lose control and disconnect without response.
[0058] See also Figures 1 to 3 As shown, the present invention provides a distributed power information management system, including a master station and a slave station. The slave station is connected to the information control interface of various power equipment, and the master station communicates through the slave station, so as to obtain the real-time information of the power equipment at each location in a timely and accurate manner, and can also realize the real-time control of the power equipment at each location. Of course, this solution is not limited to the management and control of power equipment, but can also be used in other fields.
[0059] In order to achieve low-latency and reliable communication between the master station and the slave station, the master station 1 can first execute step S1 to obtain the target communication protocol layer of the slave station 2 during operation. In this solution, the master station 1 and the slave station communicate at the data link layer, and the slave stations 2 also relay data at the data link layer.
[0060] See also Figures 1 to 5 As shown, step S2 can be executed next to create several application processes in the master station, some of which are necessary for the operation and communication of the master station 1 and the slave station 2, and some are application processes that are installed according to user needs. Step S3 can be executed next to obtain the target system permissions required for the application process to communicate at the target communication protocol layer, and step S4 can be executed next to grant the target system permissions to the application process.
[0061] Taking the Android system as an example, the kernel layer system startup in the main station 1 will create the init process and have root permissions. The kernel layer refers to the kernel layer, which is the lowest-level software component responsible for managing computer hardware resources such as CPU, memory, and peripherals. The kernel layer provides various system calls for use by applications in the user space. The init process is the first process in Unix and Unix-like operating systems (such as Android) and is the parent process of all other processes. It is the first user-mode program loaded and run by the kernel when the system starts. The main task of the init process is to initialize the system and start various services and applications in the system.
[0062] Then init creates a new process a and grants it SOCK RAW permissions. SOCK_RAW is a socket type in Linux socket programming, which allows applications to directly access network layer protocols, such as IP protocols. This access permission is relatively low-level, and SOCK_RAW sockets can be used to send and receive raw IP packets.
[0063] After that, Android applications access the native layer interface through the framework. Framework is an abstract concept, which refers to a reusable software environment or architecture. The native layer refers to the bottom layer of the Android operating system.
[0064] Finally, the native layer interface calls the hal layer interface, and the hal layer calls process a to complete the creation of the communication module unit. The hal layer, or hardware abstraction layer, is a routine package of the software layer that simulates the details of a specific system platform so that the program can directly access the hardware resources. By extracting the differences in hardware from the core of the operating system, the core mode code does not need to be modified due to hardware differences. Compared with traditional solutions, the hardware abstraction layer can increase the portability of the software.
[0065] See also Figures 4 to 5 As shown in the figure, the communication interaction between the application process running in the master station 1 and the slave station 2 occurs between the operating system layer (OS) and the hardware abstraction layer (OSHW), while in the traditional solution it is between the application layer (APP) and the operating system layer (OS). The functions of the BASE module, MAIN module, CONFIG module, CONFIGDC module, etc. in the figure are as follows:
[0066] layer Function BASE Assemble industrial application data into EtherCAT frames, read and write slaves using sequential addressing, broadcasting, configuration address, and logical addressing MAIN Read and write slave EEPROM, provide mailbox mode non-process data reading and writing and triple buffer mode process data PDO reading and writing CONFIG Initialize the slave controller's registers and configure the slave FMMU DC Provide distributed clocks to achieve clock synchronization between master and slave stations SOE CANOpen Over EtherCAT FOE File Over EtherCAT OSAL Operating system abstraction layer, mainly used to comply with OSADL and real-time process creation OSHW Hardware abstraction layer, network card interface encapsulation
[0067] See also Figure 5 As shown, in the process of executing step S5 in which the application process running in the master station communicates directly or indirectly with the slave station, first, step S51 can be executed to generate a sub-message for each slave station. Then, step S52 can be executed to encapsulate all sub-messages to obtain data frames. The specific encapsulation process is shown in FIG. Figure 5 Next, step S53 may be executed to send a data frame to the slave station. Next, step S54 may be executed for the master station to receive the data frame that is received, read, written and forwarded by the slave station and then transmitted back to the master station.
[0068] See also Figure 7As shown, in order to achieve accurate and effective control of slave station 2, it is necessary to obtain the status of slave station 2 in real time and update various data in real time. Therefore, the application process running in master station 1 needs to include a configuration process. During the operation of the configuration process, step S011 can be first executed to configure the process to continuously generate sub-messages containing status register query instructions, and encapsulate them into data frames and send them to all slave stations. Next, step S012 can be executed to obtain the status of each slave station according to the data frame received by the return transmission. The status of the slave station includes initialization status, pre-operation status, safe operation status and operation status. The following introduces these four states in sequence.
[0069] Initialization state: The master station can read the device information of the slave station and make some preparations to enter the initialization configuration. Clear the fieldbus memory management unit and data synchronization manager configuration of slave station 2. Set the address and real-time data configuration information of the slave station. If the clock is used, set the clock transmission delay and the start offset time, and perform several clock synchronizations. After setting the above information, the master station can request to enter the pre-operation state after the slave station checks that it is correct. If it cannot enter the pre-operation state, it can read the relevant registers to determine the cause of the error.
[0070] Pre-operation state: The master station sets the real-time exchange data that the slave station needs to map, and configures the mapping of the fieldbus memory management unit. If a clock is used, the clock cycle time, start time, trigger mode, and start synchronizing the clock need to be configured. The first step has configured the real-time exchange data and mapping relationship, and can start sending real-time exchange data. After setting the above information, the master station can request to enter the safe operation state after the slave station checks that it is correct. If it cannot enter the safe operation state, it can read the relevant registers to determine the cause of the error.
[0071] Safe operation state: The data has been configured in the pre-operation state, and basically no further configuration is required in the safe operation state. The safe operation state mainly sets the data in the real-time exchange data in the slave station to confirm whether the slave station will report an error, thereby judging whether the slave station clock synchronization has reached a stable value. If the clock synchronization is stable and the slave station does not report an error, you can apply to enter the operation state.
[0072] Running state: After entering the running state, the servo motion can be controlled.
[0073] See also Figures 7 to 8As shown, if some slave stations 2 have communication failures or disconnections, the remaining slave stations 2 that can still work normally can continue to communicate with the master station 1 through redundant lines. However, after the communication is restored, the communication delay between the master station 1 and the slave station will change due to changes in the communication path, and some other important influencing parameters may also change, thereby affecting the control of the master station 1 over the slave station 2. Therefore, it is necessary to execute step S013 to determine whether the network path for the slave station to return the data frame to the master station has changed. If so, then step S014 can be executed to configure the process to generate a state change instruction to change the state of the slave station to the initialization state. Otherwise, no action response is performed. This can avoid occasional network failures causing communication paralysis of slave station 2.
[0074] See also Fig. 9 As shown, in order to ensure that the slave station 2 can be correctly configured from the initialization state, it is necessary to perform configuration verification step by step. First, step S021 can be executed to configure the process to generate a sub-message containing the initialization instruction and for the slave station in the initialization state, and encapsulate it into a data frame and send it to all slave stations. The initialization instruction clears the bus memory management unit and data synchronization manager configuration of the slave station in the initialization state, and sets the network address and non-real-time data configuration information, and sets clock synchronization. After step S022 is completed, the configuration process generates a state change instruction to change the state of the slave station in the initialization state after completion to the pre-operation state.
[0075] See also Fig.10 As shown, before the slave station 2 is officially put into use, it is also necessary to verify whether the configuration is correct, which requires executing step S031 to configure the process to generate a sub-message containing a configuration write instruction and for the slave station in the pre-operation state, and encapsulate it into a data frame and send it to all slave stations. The configuration write instruction writes the real-time exchange data and the mapping of the bus memory management unit that need to be mapped to the slave station in the pre-operation state, and configures the time synchronization parameters. Next, after the step S032 is completed, the configuration process generates a state change instruction, and the state of the slave station in the pre-operation state after completion is changed to a safe operation state. The master station communicates with the slave station in the safe operation state and synchronizes the clock in real time. Next, step S033 can be executed to determine whether real-time exchange data communication and stable clock synchronization can be achieved. If so, then step S034 can be executed next to configure the process to generate a state change instruction, and the state of the slave station can be changed to an operating state. If otherwise, step S035 can be executed next to report an error.
[0076] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, system, method and computer program product according to multiple embodiments of the present application. In this regard, each square frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the square frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square frames can actually be executed substantially in parallel, and they can also be executed in reverse order sometimes, depending on the functions involved.
[0077] It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by hardware that performs the corresponding function or action, such as a circuit or ASIC (Application Specific Integrated Circuit), or can be implemented by a combination of hardware and software, such as firmware.
[0078] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0079] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those of ordinary skill in the art without departing from the scope of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A communication control method, characterized in that: include, Acquire a target communication protocol layer of a slave station, wherein the slave station communicates with the master station through the target communication protocol layer; Create several application processes on the master site; Obtain the target system permissions required by the application process to communicate at the target communication protocol layer; Granting the target system permissions to the application process; The application process running in the master station communicates directly or indirectly with the slave station; The step of the application process running in the master station communicating directly or indirectly with the slave station includes: The application process generates a sub-message for each of the slave stations respectively; Encapsulating all the sub-messages to obtain a data frame; sending the data frame to the slave station; The master station receives the data frame which is received, read, written and forwarded by the slave station and then transmitted back to the master station; The step of the application process running in the master station communicating directly or indirectly with the slave station further includes: The application process includes a configuration process; The configuration process continuously generates sub-messages including status register query instructions, and encapsulates the sub-messages into the data frame and sends them to all the slave stations; Obtaining the state of each slave station according to the data frame received by the return transmission, wherein the state of each slave station includes an initialization state, a pre-operation state, a safe operation state, and an operation state; If the network path for the slave station to transmit the data frame back to the master station changes, the configuration process generates a state change instruction to change the state of the slave station to the initialization state.
2. The method according to claim 1, characterized in that The communication interaction between the application process and the slave station occurs between the operating system layer and the hardware abstraction layer.
3. The method according to claim 1, characterized in that If the slave station is in the initialization state, then, The configuration process generates a sub-message containing an initialization instruction and targeting the slave station in the initialization state, and encapsulates the sub-message into the data frame and sends the sub-message to all the slave stations; Wherein, the initialization instruction clears the bus memory management unit and data synchronization manager configuration of the slave station in the initialization state, sets the network address and non-real-time data configuration information, and sets clock synchronization; After completion, the configuration process generates a state change instruction to change the state of the slave station in the initialization state after completion to the pre-operation state.
4. The method according to claim 1, characterized in that: If the slave station is in the pre-operational state, then, The configuration process generates a sub-message including a configuration write instruction and targeting the slave station in the pre-operation state, and encapsulates the sub-message into the data frame and sends the sub-message to all the slave stations; Wherein, the configuration write instruction writes the real-time exchange data to be mapped and the mapping of the bus memory management unit to the slave station in the pre-operation state, and configures the time synchronization parameters; After completion, the configuration process generates a state change instruction to change the state of the slave station in the pre-operation state after completion to the safe operation state; The master station performs real-time data exchange communication and clock synchronization with the slave station in the safe operation state, and determines whether real-time data exchange communication and stable clock synchronization can be achieved; If so, the configuration process generates a state change instruction to change the state of the slave station to the running state; If not, report an error.
5. A communication device, characterized in that: include, A master station in a communication control method as claimed in any one of claims 1 to 4.
6. A distributed power information management system, characterized in that: include, A master station in a communication control method according to any one of claims 1 to 4; as well as, A slave station in a communication control method according to any one of claims 1 to 4; Wherein, the slave station acquires power information; The slave station transmits the power information back to the master station.
Citation Information
Patent Citations
Method and apparatus for carrying out root authority management at terminal equipment
CN103826215A
FPGA (Field Programmable Gate Array)-based EtherCAT (Ethernet Control Automation Technology) main station device
CN104702474A
EtherCAT (Ethernet Control Automation Technology) master station based on aneuhua operating system and implementation method of EtherCAT master station
CN116232796A