Linux deployment system and GOOSE data processing method
By deploying the GOOSE protocol stack module in the user space in the Linux environment and deploying modules with higher real-time requirements in the kernel space for processing, the problem of poor real-time performance of GOOSE data in the Linux environment is solved, and more efficient data transmission and reception and stability are achieved.
Patent Information
- Application Number
- CN202211477473.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-11-23
AI Technical Summary
When deploying GOOSE data in a Linux environment, there is a problem of poor real-time data transmission and reception processing, which makes it difficult to meet complex business needs.
The GOOSE protocol stack module is deployed in the Linux user space, and modules with higher real-time requirements such as the timer module, state machine module, data sending module and GOOSE filtering module are deployed in the Linux kernel space, and corresponding data processing is performed through the kernel space.
It improves the real-time performance and stability of GOOSE data transmission and reception, reduces the impact of system failures on data processing, and solves the problem of poor real-time performance of GOOSE data in the Linux environment.
Smart Images

Figure CN115883684B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a Linux deployment system and a GOOSE data processing method. Background Art
[0002] GOOSE (Generic Object Oriented Substation Event) refers to a generic object-oriented substation event, used to transmit critical real-time signals. Related technologies primarily use an FPGA (Field Programmable Gate Array) and controller to control the transmission and reception of GOOSE data. The FPGA ensures the real-time transmission and reception of GOOSE data and interacts with the controller via bus communication. However, with the increasing complexity of business needs, traditional controllers are increasingly unable to meet the computing performance and resource requirements.
[0003] Linux is an operating system that supports multiple users, multiple tasks, multiple threads, and multiple CPUs, and has a powerful file system. It is an excellent choice for handling complex business operations. Therefore, deploying GOOSE in a Linux environment is a trend. However, the current deployment of GOOSE in a Linux environment has the problem of poor real-time data transmission and processing, making it difficult to deploy GOOSE in a Linux environment. Summary of the Invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a Linux deployment system and a GOOSE data processing method, which can effectively ensure the real-time requirements of GOOSE data transmission and reception in a Linux environment.
[0005] In a first aspect, the present application provides a Linux deployment system, the system comprising:
[0006] GOOSE protocol stack module, wherein the GOOSE protocol stack module is deployed in the user space of Linux;
[0007] A first module, wherein the first module is deployed in the kernel space of the Linux, the first module is communicatively connected to the GOOSE protocol stack module, and the first module includes at least one of a timer module, a state machine module, a data sending module, and a GOOSE filtering module;
[0008] A network driver module, which is deployed in the kernel space and is communicatively connected with the first module;
[0009] The GOOSE protocol stack module and the first module are determined based on the functional division of GOOSE.
[0010] According to the Linux deployment system of the present application, by deploying at least part of the processing modules with higher real-time requirements in the Linux kernel space to process the GOOSE data accordingly in the kernel space, it has a higher processing rate and can effectively ensure the real-time requirements of GOOSE data transmission and reception, thereby solving the technical problem of poor real-time performance caused by deploying GOOSE in a Linux environment.
[0011] According to one embodiment of the present application, when the first module includes the timer module, the state machine module, the data sending module and the GOOSE filtering module, the timer module is communicatively connected to the data sending module via the state machine module;
[0012] The input end of the data sending module is communicatively connected with the GOOSE protocol stack module;
[0013] The output end of the GOOSE filtering module is communicatively connected to the GOOSE protocol stack module.
[0014] According to one embodiment of the present application, it further includes:
[0015] A sending channel, wherein the input end of the data sending module is communicatively connected with the GOOSE protocol stack module via the sending channel;
[0016] A receiving channel, wherein the output end of the GOOSE filtering module is communicatively connected to the GOOSE protocol stack module via the receiving channel.
[0017] In a second aspect, the present application provides a GOOSE data processing method, which is applied to the Linux deployment system as described in the first aspect, and the method includes:
[0018] The first module obtains first target data sent by the first target module;
[0019] The first module processes the first target data in the kernel space and sends second target data to the second target module, where the second target data is determined based on the first target data;
[0020] The first target module is the GOOSE protocol stack module or the network driver module, the second target module is the GOOSE protocol stack module or the network driver module, and the first target module is different from the second target module.
[0021] According to the GOOSE data processing method of the present application, the first data is judged and packaged in the user space of Linux by the GOOSE protocol stack module to generate first target data, and then the first target data is sent to the first module, which performs status detection and sending on the first target data in the kernel space of Linux. This can significantly improve the GOOSE data monitoring efficiency and processing rate, thereby improving the real-time performance of the GOOSE data sending process.
[0022] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the GOOSE data processing method as described in the second aspect above is implemented.
[0023] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the GOOSE data processing method as described in the second aspect above.
[0024] In a fifth aspect, the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the GOOSE data processing method as described in the second aspect.
[0025] In a sixth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the GOOSE data processing method as described in the second aspect above.
[0026] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0027] By deploying at least part of the processing modules with higher real-time requirements in the Linux kernel space to process GOOSE data accordingly in the kernel space, it has a higher processing rate and can effectively ensure the real-time requirements of GOOSE data transmission and reception, solving the technical problem of poor real-time performance caused by deploying GOOSE in a Linux environment.
[0028] Furthermore, by deploying the timer module, state machine module, data sending module and GOOSE filtering module in the Linux kernel space to perform corresponding data processing in the kernel space, the real-time requirements of status monitoring and data filtering can be effectively guaranteed, thereby further improving the real-time performance of GOOSE data transmission and reception, and solving the technical problem of poor real-time performance caused by deploying GOOSE in a Linux environment.
[0029] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become obvious from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0031] Figure 1 This is one of the structural diagrams of the Linux deployment system provided in the embodiment of the present application;
[0032] Figure 2 This is the second structural diagram of the Linux deployment system provided in the embodiment of the present application;
[0033] Figure 3 Schematic diagram of the process of processing GOOSE data according to the embodiment of the present application;
[0034] Figure 4 Schematic diagram of the principle of the GOOSE data processing method provided in the embodiment of the present application;
[0035] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0037] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0038] In the related technology, the deployment of GOOSE in the Linux environment is mainly achieved by deploying all GOOSE functions in the Linux user space. In actual application, when sending and receiving GOOSE data, the user space must access the underlying driver through system calls, which not only takes up a large amount of CPU resources, but also affects the real-time performance of data sending and receiving, thereby affecting the effect of GOOSE.
[0039] The following, in conjunction with the accompanying drawings, describes in detail the Linux deployment system, GOOSE data processing method, electronic device and readable storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0040] The GOOSE data processing method can be applied to a terminal, and can be specifically executed by hardware or software in the terminal (such as a Linux deployment system).
[0041] The terminal includes but is not limited to a portable communication device such as a mobile phone or a tablet computer. It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer.
[0042] It should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.
[0043] like Figure 1 As shown, the Linux deployment system includes: a GOOSE protocol stack module 110 , a first module and a network driver module 130 .
[0044] It should be noted that the Linux deployment system is applied to the field of substation events oriented to general objects.
[0045] In this embodiment, the GOOSE protocol stack module 110 is deployed in the user space of Linux, and the first module and the network driver module 130 are both deployed in the kernel space of Linux.
[0046] Among them, the kernel space is the running space of the Linux kernel, which can execute arbitrary commands and call all resources of the Linux system.
[0047] User space is the running space of user programs, used to perform simple operations. It cannot directly call system resources and must issue instructions to kernel space through the system interface (system call).
[0048] It is understandable that in actual application, the user space and kernel space in the Linux system are isolated, so that when the user space program crashes, the kernel space can maintain normal operation, thereby maintaining the security and stability of the system operation.
[0049] It should be noted that, in the present application, the GOOSE protocol stack module 110 and the first module are determined based on the functional division of GOOSE.
[0050] Among them, the first module is a functional module for executing data execution instructions with high real-time requirements, such as a module for executing status monitoring and data frame filtering functions.
[0051] The first module may include at least one of a timer module 121 , a state machine module 122 , a data sending module 123 and a GOOSE filtering module 124 .
[0052] For example, the first module may include a state machine module 122; or may include a GOOSE filtering module 124; or may include a timer module 121, a state machine module 122 and a GOOSE filtering module 124; or may also include a timer module 121, a state machine module 122, a data sending module 123 and a GOOSE filtering module 124, etc. Users can make choices based on actual needs, and this application does not limit it.
[0053] The timer module 121 is used to generate and send an interrupt signal, and may be a hardware timer, for example.
[0054] The state machine module 122 is used for state monitoring.
[0055] The data sending module 123 is used to send GOOSE data, such as a data area to be sent.
[0056] The GOOSE filtering module 124 is used to judge the received data and filter it to obtain GOOSE data.
[0057] The first module is in communication connection with the GOOSE protocol stack module 110 , and the network driver module 130 is in communication connection with the first module.
[0058] The network driver module 130 may be an Ethernet device driver or other network driver, etc., which is not limited in this application.
[0059] During the actual execution process, for example, in the GOOSE data sending scenario, the GOOSE protocol stack module 110 can send data to the first module, such as performing data monitoring and other operations in the kernel space, and the first module performs relevant processing in the kernel space, and the first module sends the processed data to the network driver module 130.
[0060] In the GOOSE data reception scenario, the network driver module 130 sends the data to the first module, which performs relevant processing in the kernel space, such as data filtering in the kernel space, and sends the processed data to the GOOSE protocol stack module 110 or other modules.
[0061] In this application, by deploying the first module with higher real-time requirements in the Linux kernel space, the data is processed accordingly in the kernel space through the first module, with a higher processing rate, thereby improving the real-time performance of GOOSE data transmission and reception, thereby improving the GOOSE data processing effect.
[0062] In addition, by deploying most data processing modules in the Linux kernel space, the data can still be processed normally through the kernel space in the event of a user space failure. On the basis of avoiding the impact of data processing interruptions caused by user space failures on the real-time performance of GOOSE data, the stability and fault tolerance of GOOSE data processing are improved, thereby improving data processing efficiency and solving the technical problem of poor real-time performance caused by deploying GOOSE in a Linux environment.
[0063] According to the Linux deployment system provided in the embodiment of the present application, by deploying at least part of the processing modules with high real-time requirements in the Linux kernel space to process the GOOSE data accordingly in the kernel space, the deployment difficulty is low and the processing rate is high. It can effectively ensure the real-time requirements of GOOSE data transmission and reception, and solve the technical problem of poor real-time performance caused by deploying GOOSE in a Linux environment.
[0064] like Figure 2 As shown, in some embodiments, when the first module includes a timer module 121, a state machine module 122, a data sending module 123 and a GOOSE filtering module 124, the timer module 121 can be communicatively connected to the data sending module 123 via the state machine module 122, and the input end of the data sending module 123 can be communicatively connected to the GOOSE protocol stack module 110; the output end of the GOOSE filtering module 124 can be communicatively connected to the GOOSE protocol stack module 110.
[0065] In this embodiment, the timer module 121 , the state machine module 122 , the data sending module 123 and the GOOSE filtering module 124 are all deployed in the kernel space of Linux to respectively perform corresponding operations in the kernel space.
[0066] During the actual execution process, such as in the GOOSE data sending scenario, in the kernel space, the timer module 121 can send the generated interrupt signal to the state machine module 122, and the state machine module 122 periodically reads the data in the data sending module 123 according to the interrupt signal sent by the timer module 121. When the sending cycle is met, the network driver module 130 is called to send data.
[0067] The data in the data sending module 123 is data sent to the data sending module 123 after the GOOSE protocol stack module 110 processes the received data in the user space.
[0068] For example, in the GOOSE data reception scenario, the network driver module 130 sends the received data to the GOOSE filter module 124, which determines in the kernel space whether the data is GOOSE data. If it is determined that the data is GOOSE data, the GOOSE protocol stack module 110 sends the data to the GOOSE protocol stack module 110, which notifies the application in the user space for processing.
[0069] According to the Linux deployment system provided in the embodiment of the present application, by deploying the timer module 121, the state machine module 122, the data sending module 123 and the GOOSE filtering module 124 in the Linux kernel space to perform corresponding data processing in the kernel space, the real-time requirements of status monitoring and data filtering can be effectively guaranteed, thereby further improving the real-time performance of GOOSE data transmission and reception, and solving the technical problem of poor real-time performance caused by deploying GOOSE in a Linux environment.
[0070] In some embodiments, the system may further include: a sending channel 141 and a receiving channel 142 .
[0071] In this embodiment, continue to refer to Figure 2 The input end of the data sending module 123 is connected to the GOOSE protocol stack module 110 via the sending channel 141 for receiving the GOOSE data sent by the GOOSE protocol stack module 110.
[0072] The output end of the GOOSE filter module 124 is communicatively connected to the GOOSE protocol stack module 110 via the receiving channel 142 , and is used to send GOOSE data to the GOOSE protocol stack module 110 .
[0073] It can be understood that the sending channel 141 is partially deployed in the user space and partially deployed in the kernel space, and the receiving channel 142 is partially deployed in the user space and partially deployed in the kernel space.
[0074] According to the Linux deployment system provided in the embodiment of the present application, by setting the sending channel 141 and the receiving channel 142 for data sending and receiving operations, dual-path parallel operation can be achieved without affecting each other, further improving the real-time performance of GOOSE data sending and receiving.
[0075] The following combination Figures 1 to 4 , describes the GOOSE data processing method provided in this application.
[0076] It should be noted that the GOOSE data processing method is applied to the Linux deployment system as described in any of the above embodiments.
[0077] The GOOSE data processing method is applied to the GOOSE data transmission and reception scenario.
[0078] like Figure 3 As shown, the GOOSE data processing method includes: step 310 and step 320.
[0079] Step 310: The first module obtains the first target data sent by the first target module;
[0080] In this step, the first module is a functional module for executing data execution instructions with high real-time requirements, and the first module is deployed in the Linux kernel space, such as the first module is a module for executing status monitoring and / or data frame filtering and other functions.
[0081] The first module is determined based on the division of GOOSE's functions.
[0082] The first module may include at least one of a timer module 121 , a state machine module 122 , a data sending module 123 and a GOOSE filtering module 124 .
[0083] The first target module may be the GOOSE protocol stack module 110 or the network driver module 130 .
[0084] The first target data is data sent by the first target module, and the first target data corresponds to the first target module.
[0085] It can be understood that when the first target module is the GOOSE protocol stack module 110, the first target data is the GOOSE data sent by the GOOSE protocol stack module 110; when the first target module is the network driver module 130, the first target data is the relevant data sent by the network driver module 130, which may be GOOSE data or other types of data.
[0086] Step 320: The first module processes the first target data in the kernel space and sends second target data to the second target module, where the second target data is determined based on the first target data.
[0087] In this step, the first module processes the first target data in the kernel space, including but not limited to at least one of determining the data type of the first target data and monitoring the sending cycle of the first target data.
[0088] The second target module is the GOOSE protocol stack module 110 or the network driver module 130 , and the first target module is different from the second target module.
[0089] It can be understood that when the first target module is the GOOSE protocol stack module 110 , the second target module is the network driver module 130 ; when the first target module is the network driver module 130 , the second target module is the GOOSE protocol stack module 110 .
[0090] The second target data is data for sending to a second target module, and the second target data is determined based on the first target data.
[0091] For example, continue to refer to Figure 2 During the actual execution process, when the first target module is the GOOSE protocol stack module 110 and the second target module is the network driver module 130, the GOOSE protocol stack module 110 sends the first target data to the first module, and the first module performs status monitoring and other processing on the first target data in the kernel space to determine the second target data, and sends the second target data to the network driver module 130.
[0092] For example, when the second target module is the GOOSE protocol stack module 110 and the first target module is the network driver module 130, the network driver module 130 sends the first target data to the first module, the first module filters the first target data in the kernel space to determine the second target data, and sends the second target data to the GOOSE protocol stack module 110.
[0093] According to the GOOSE data processing method provided in the embodiment of the present application, by executing at least some steps with high real-time requirements in the GOOSE data transmission and reception process in the Linux kernel space, it has a high processing rate, can effectively ensure the real-time requirements of GOOSE data transmission and reception, and solves the technical problem of poor real-time performance caused by deploying GOOSE in a Linux environment.
[0094] The following describes the embodiments of the present application from two scenarios: GOOSE data reception and GOOSE data transmission.
[0095] 1. GOOSE data transmission scenario
[0096] In some embodiments, when the first target module is the GOOSE protocol stack module 110 and the second target module is the network driver module 130, before the first module obtains the first target data sent by the first target module, the method may further include:
[0097] The GOOSE protocol stack module 110 receives first data;
[0098] When the first data is new data, performing frame grouping processing on the first data to generate first target data;
[0099] The GOOSE protocol stack module 110 sends the first target data to the first module;
[0100] Sending the second target data to the second target module may include:
[0101] determining the first target data as the second target data;
[0102] Based on the target duration, the second target data is sent to the network driving module 130 .
[0103] In this embodiment, the first data is data sent by the GOOSE application calling the GOOSE protocol stack module 110, such as user space data.
[0104] The target duration is the time interval between two adjacent transmissions of data by the first module to the network driver module 130 when new data is received.
[0105] It is understandable that the GOOSE message is sent by combining the heartbeat message and the fast retransmission mechanism of the bit-shifted message, such as Figure 4 shown.
[0106] Among them, T0 is also called the heartbeat time. When the data in the GOOSE data set does not change, the device sends the current state, that is, the heartbeat message, once every T0 time on average. The state sequence number stNum in the message (StateNumber is used to record the total number of times the GOOSE data changes) remains unchanged, and the sequence sqNum (SequenceNumber is used to record the number of frames sent by the message in the steady state) increases.
[0107] When an event occurs in the device (such as a switch state change), the data in the GOOSE data set changes, and the device immediately sends all the data in the data set. Then, at intervals of T1, it sends the second and third frames, and at intervals of T2 and T3, it sends the fourth and fifth frames. T2 is 2T1, T3 is 4T1, and so on for subsequent messages. The sending interval gradually increases by a factor of 2 until it reaches T0, at which point the message becomes a heartbeat message again. When the data changes, the stNum in the first frame message increases by 1, and the sqNum starts from zero. In subsequent messages, the stNum remains unchanged, and the sqNum increases.
[0108] In this application, the target duration is the time other than the heartbeat time, such as T1, T2, and T3.
[0109] The target duration changes based on the number of transmissions.
[0110] Continue to refer Figure 2 During the actual execution process, the GOOSE application calls the GOOSE protocol stack module 110 to send the first data. After receiving the first data, the GOOSE protocol stack module 110 performs data judgment (such as determining whether the first data is new data) and other operations. If it is determined to be new data, the GOOSE protocol stack module 110 performs frame packaging to generate the first target data.
[0111] After the frame packaging is completed, the GOOSE protocol stack module 110 transmits the user space data to the first module in the kernel space through the sending channel 141.
[0112] The first module determines the first target data as the second target data, and sends the second target data to the network driving module 130 based on the target duration.
[0113] According to the GOOSE data processing method provided in the embodiment of the present application, the GOOSE protocol stack module 110 judges and packages the first data in the user space of Linux to generate first target data, and then sends the first target data to the first module, which performs status detection and sending on the first target data in the kernel space of Linux. This can significantly improve the GOOSE data monitoring efficiency and processing rate, thereby improving the real-time performance of the GOOSE data sending process.
[0114] In some embodiments, when the first module includes the timer module 121, the state machine module 122, and the data sending module 123, sending the second target data to the network driver module 130 based on the target duration may include:
[0115] The timer module 121 sends an interrupt signal to the state machine module 122;
[0116] The state machine module 122 determines a first duration based on the interrupt signal and sends the first duration to the data sending module 123. The first duration is the duration from the last time the data sending module 123 sent data to the current moment.
[0117] When the first duration reaches the target duration, the second target data is sent to the network driving module 130 .
[0118] In this embodiment, continue to refer to Figure 2 In the actual execution process, after the frame grouping is completed, the GOOSE protocol stack module 110 transmits the user space data to the data sending module 123 in the kernel space through the sending channel 141.
[0119] The state machine module 122 in the kernel space periodically reads the data in the data sending module 123 based on the interrupt signal sent by the timer module 121. If the sending cycle is reached, the network driver module 130 is called to send the data.
[0120] According to the GOOSE data processing method provided in the embodiment of the present application, by deploying the timer module 121, the state machine module 122 and the data sending module 123 in the Linux kernel space, during the GOOSE data sending process, the first target data can be periodically monitored in the kernel space, and the network driver module 130 can be called to send the second target data when the sending cycle is met, thereby reducing the computing rate of the user space and the impact of the running status on the GOOSE data processing rate, thereby significantly improving the real-time performance of the GOOSE data sending process.
[0121] 2. GOOSE Data Reception Scenario
[0122] In some embodiments, when the first target module is the network driver module 130 and the second target module is the GOOSE protocol stack module 110, step 320 may include:
[0123] In a case where the first target data is GOOSE type data, determining the first target data as the second target data;
[0124] Sending the second target data to the GOOSE protocol stack module 110;
[0125] In a case where the first target data is not GOOSE type data, the first target data is sent to the TCP / IP protocol module.
[0126] In this embodiment, continue to refer to Figure 2 , after the first module receives the first target data sent by the Ethernet (i.e., the network driver module 130), it first determines the message type;
[0127] If it is determined that the first target data is not of the GOOSE type, the first target data is sent to a protocol stack interface such as TCP / IP.
[0128] If it is determined that the first target data is of GOOSE type, the first module determines the first target data as the second target data, and sends the second target data to the GOOSE protocol stack module 110 in the user space through the receiving channel 142, and the GOOSE protocol stack module 110 performs data analysis on the second target data.
[0129] According to the GOOSE data processing method provided in the embodiment of the present application, the first module performs filtering and other operations on the received first target data in the Linux kernel space, and determines the first target data that meets the GOOSE type as the second target data to be sent to the GOOSE protocol stack module 110. The GOOSE protocol stack module 110 performs data analysis on the second target data, thereby improving the rate of filtering and other processing on the first target data, thereby improving the efficiency and real-time performance of the GOOSE data receiving process.
[0130] In some embodiments, when the first module includes the GOOSE filtering module 124, step 320 may further include:
[0131] The GOOSE filtering module 124 receives the first target data sent by the network driving module 130;
[0132] In the case where the first target data is GOOSE type data, the GOOSE filtering module 124 determines the first target data as the second target data;
[0133] The GOOSE filter module 124 sends the second target data to the GOOSE protocol stack module 110 .
[0134] In this embodiment, continue to refer to Figure 2 In the actual execution process, after the GOOSE filtering module 124 in the first module receives the first target data sent by the Ethernet (ie, the network driver module 130), it first determines the message type.
[0135] If it is determined that the first target data is of GOOSE type, the GOOSE filtering module 124 determines the first target data as the second target data, and sends the second target data to the GOOSE protocol stack module 110 in the user space through the receiving channel 142, and the GOOSE protocol stack module 110 performs data analysis on the second target data.
[0136] According to the GOOSE data processing method provided in the embodiment of the present application, by deploying the GOOSE filtering module 124 in the Linux kernel space to perform operations such as filtering on the received first target data, while reducing the impact of the user space computing rate on the GOOSE data filtering rate, the rate of filtering and other processing on the first target data is also increased, thereby improving the efficiency and real-time performance of the GOOSE data receiving process.
[0137] In some embodiments, after sending the second target data to the GOOSE protocol stack module 110 , the method may further include: if the second target data is new data, the GOOSE protocol stack module 110 sending notification information to the application.
[0138] In this embodiment, the notification information is used to notify the application program to process the second target data.
[0139] After receiving the first target data sent by the Ethernet, the first module first determines the message type.
[0140] If it is determined that the first target data is of GOOSE type, the first module determines the first target data as the second target data, and sends the second target data to the GOOSE protocol stack module 110 in the user space through the receiving channel 142, and the GOOSE protocol stack module 110 performs data analysis on the second target data.
[0141] The GOOSE protocol stack module 110 determines whether the second target data is updated data. If it is updated data, the application is notified to process the data.
[0142] According to the GOOSE data processing method provided in the embodiment of the present application, by deploying the GOOSE protocol stack module 110 in the user space, the GOOSE protocol stack module 110 can directly notify the application to perform relevant processing after completing related processing such as judging the second target data, and has a higher response rate.
[0143] The Linux deployment system provided by the embodiment of the present application can achieve Figures 3 and 4 To avoid repetition, the various processes implemented in the method embodiment are not described here.
[0144] The GOOSE data processing method provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the GOOSE data processing method. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The GOOSE data processing method provided in the embodiment of the present application is described below using an electronic device as an example of the execution subject.
[0145] In some embodiments, as Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the program is executed by the processor 501, each process of the above-mentioned GOOSE data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0146] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0147] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, the various processes of the above-mentioned GOOSE data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0148] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0149] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned GOOSE data processing method when executed by a processor.
[0150] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0151] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned GOOSE data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0152] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0153] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0154] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0155] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
[0156] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0157] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and intent of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A Linux deployment system, characterized in that: include: GOOSE protocol stack module, wherein the GOOSE protocol stack module is deployed in the user space of Linux; A first module, wherein the first module is deployed in the kernel space of the Linux, the first module is communicatively connected to the GOOSE protocol stack module, and the first module includes at least one of a timer module, a state machine module, a data sending module, and a GOOSE filtering module; A network driver module, which is deployed in the kernel space and is communicatively connected with the first module; Among them, the GOOSE protocol stack module and the first module are determined based on the functional division of the GOOSE; the first module is a functional module corresponding to the data execution instructions for executing data with high real-time requirements.
2. The Linux deployment system according to claim 1, wherein: In the case where the first module includes the timer module, the state machine module, the data sending module and the GOOSE filtering module, the timer module is communicatively connected with the data sending module via the state machine module; The input end of the data sending module is communicatively connected with the GOOSE protocol stack module; The output end of the GOOSE filtering module is communicatively connected to the GOOSE protocol stack module.
3. The Linux deployment system according to claim 2, wherein: Also includes: A sending channel, wherein the input end of the data sending module is communicatively connected with the GOOSE protocol stack module via the sending channel; A receiving channel, wherein the output end of the GOOSE filtering module is communicatively connected to the GOOSE protocol stack module via the receiving channel.
4. A GOOSE data processing method, characterized in that: Applied to the Linux deployment system according to any one of claims 1 to 3, the method comprises: The first module obtains first target data sent by the first target module; The first module processes the first target data in the kernel space and sends second target data to the second target module, where the second target data is determined based on the first target data; The first target module is the GOOSE protocol stack module or the network driver module, the second target module is the GOOSE protocol stack module or the network driver module, and the first target module is different from the second target module.
5. The GOOSE data processing method according to claim 4, characterized in that: In a case where the first target module is the GOOSE protocol stack module and the second target module is the network driver module, before the first module obtains the first target data sent by the first target module, the method further includes: The GOOSE protocol stack module receives first data; In a case where the first data is new data, performing frame grouping processing on the first data to generate the first target data; The GOOSE protocol stack module sends the first target data to the first module; The sending the second target data to the second target module includes: determining the first target data as the second target data; Based on the target duration, the second target data is sent to the network driver module.
6. The GOOSE data processing method according to claim 5, characterized in that: In a case where the first module includes the timer module, the state machine module, and the data sending module, sending the second target data to the network driver module based on the target duration includes: The timer module sends an interrupt signal to the state machine module; The state machine module determines a first duration based on the interrupt signal, and sends the first duration to the data sending module, where the first duration is the duration from the last time the data sending module sent data to the current moment; When the first duration reaches the target duration, the second target data is sent to the network driving module.
7. The GOOSE data processing method according to any one of claims 4 to 6, characterized in that: In a case where the first target module is the network driver module and the second target module is the GOOSE protocol stack module, the first module processes the first target data in the kernel space and sends the second target data to the second target module, including: In a case where the first target data is GOOSE type data, determining the first target data as the second target data; Sending the second target data to the GOOSE protocol stack module; In a case where the first target data is not GOOSE type data, the first target data is sent to a TCP / IP protocol module.
8. The GOOSE data processing method according to claim 7, characterized in that: In the case where the first module includes the GOOSE filtering module, the first module processes the first target data in the kernel space and sends the second target data to the second target module, further comprising: The GOOSE filtering module receives the first target data sent by the network driver module; In a case where the first target data is GOOSE type data, the GOOSE filtering module determines the first target data as the second target data; The GOOSE filtering module sends the second target data to the GOOSE protocol stack module.
9. The GOOSE data processing method according to claim 7, characterized in that: After sending the second target data to the GOOSE protocol stack module, the method further includes: In the case that the second target data is new data, the GOOSE protocol stack module sends notification information to the application.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the GOOSE data processing method according to any one of claims 4 to 9 is implemented.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the GOOSE data processing method according to any one of claims 4 to 9 is implemented.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the GOOSE data processing method according to any one of claims 4 to 9 is implemented.
Citation Information
Patent Citations
Inter-station communication method and system for stability device
CN112565050A
Message forwarding method and device, nonvolatile storage medium and processor
CN114640627A