Electric power communication method and system

By sharing and automatic switching of storage resources between cache servers and communication servers in the power communication network, data loss caused by network congestion and hardware failures is solved, and data transmission reliability and network stability are improved.

CN120263226APending Publication Date: 2025-07-04GUANGDONG POWER TELECOMMUNICATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510393122.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The power communication network lacks data transmission reliability in the case of network congestion, complex electromagnetic environments and hardware failures, which may lead to data loss and malfunction of the distribution automation system.

Method used

By sharing storage resources between the cache server and the communication server, automatically switch the communication server, and handling fault conditions within the preset time limit, data packet storage and transmission, including data retransmission and fault self-detection mechanisms.

Benefits of technology

It reduces the transmission pressure of the target server, reduces network congestion, ensures the normal delivery of data packets, and improves the reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263226A_ABST
    Figure CN120263226A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power communication method and system, and relates to the technical field of communication, data messages are cached through a cache server, unified message sending is performed through a communication server, the number of electric terminals directly interacting with a target server is reduced, the transmission pressure of the target server can be greatly reduced, and the transmission efficiency of the target server is improved. And the occurrence of network congestion is reduced. More importantly, by automatically selecting the cache server and the communication server, sharing of storage resources between the subnetworks is realized, and data messages in the network can be ensured to be normally sent to the target server, so that the reliability of data transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to a power communication method and system. Background Art

[0002] In a power communication system, the reliability of data transmission is a key factor to ensure the safe and stable operation of the power system. Existing technologies generally adopt solutions such as data encryption, error detection and correction, and a retransmission mechanism based on a time window to improve the reliability of data transmission.

[0003] However, during actual operation, the power communication network still faces many challenges: in the case of network congestion, data packets may be discarded due to buffer overflow; in a complex electromagnetic environment, signals are easily affected by power frequency interference, pulse interference, etc.; at the same time, hardware failures of communication devices may also cause data loss. These factors will not only affect the real-time performance and integrity of data transmission, but may also cause misoperation of the distribution automation system, seriously affecting the overall reliability of the distribution communication network. Summary of the Invention

[0004] The technical problem to be solved by the present invention is how to improve the reliability of the distribution communication network, and provide a power communication method and system, which realizes the sharing of storage resources between subnets by automatically selecting cache servers and communication servers, and can also ensure that data packets in the network are normally delivered to the target server, improving the reliability of data transmission.

[0005] To solve the above technical problems, an embodiment of the present invention provides a power communication method, including:

[0006] When a data packet is received, if the local storage space is sufficient, the data packet is stored locally in the cache server; if the local storage space is insufficient, the data packet is transmitted to the cache server of another subnet.

[0007] If a delivery notice or response packet from the communication server is not received within a preset time limit, judge the fault situation of the communication server, switch the communication server for communicating with the target server based on the fault situation, and select the data packet from the local storage space and transmit it to the communication server.

[0008] If a delivery notice from the communication server of the same subnet is received within the preset time limit, notify the cache server actually storing the data packet to delete the data packet, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server.

[0009] If a response message from a communication server in a different subnet is received within a preset time limit, forward the response message to the power consumption terminal that requested the communication, and notify the cache server that actually stores the data message to delete the data message.

[0010] As an improvement to the above solution, the data message received by the cache server comes from a user terminal in the same subnet or a cache server in another subnet.

[0011] As an improvement to the above solution, if a delivery notice or response message from the communication server is not received within the preset time limit, determine the fault condition of the communication server, switch the communication server for communicating with the target server based on the fault condition, and select the data message from the local storage space and transmit it to the communication server, including:

[0012] If a delivery notice or response message from the first communication server currently in communication is not received within the preset time limit, send a detection request to the first communication server;

[0013] Based on the response result of the detection request, obtain the fault condition of the first communication server;

[0014] Switch the communication server for communicating with the target server based on the fault condition;

[0015] Select the undelivered data message from the local storage space and transmit the undelivered data message to the communication server.

[0016] As an improvement to the above solution, the obtaining the fault condition of the first communication server based on the response result of the detection request includes:

[0017] If the response result of the detection request is normal, it is considered that the communication between the first communication server and the target server is abnormal, which is the first fault condition;

[0018] If the response result of the detection request is abnormal, it is considered that the communication between the first communication server and the cache server is abnormal, which is the second fault condition;

[0019] Based on the first fault condition and the second fault condition, obtain the fault condition of the communication server in the same subnet.

[0020] As an improvement to the above solution, the switching the communication server for communicating with the target server based on the fault condition includes:

[0021] When the fault condition is the first fault condition, generate a data retransmission request according to the data packet, and send the data request to the second communication server in another subnet, so that the second communication server communicates with the target server;

[0022] When the fault condition is the second fault condition, send a re-election notice to all power consumption terminals in the subnet where the first communication server is located, and re-select the first communication server from all the power consumption terminals, so that the new first communication server communicates with the target server.

[0023] As an improvement of the above solution, if a delivery notice from a communication server in the same subnet is received within a preset time limit, notify the cache server actually storing the data packet to delete the data packet, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server, including:

[0024] If a delivery notice from a communication server in the same subnet is received within a preset time limit, send the delivery notice to the cache server actually storing the data packet;

[0025] In response to the delivery notice, mark the data packet as delivered, and delete the data packet in the local storage space according to the mark of the data packet;

[0026] If the delivery notice comes from the communication server, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server.

[0027] As an improvement of the above solution, the step of marking the data packet as delivered in response to the delivery notice and deleting the data packet in the local storage space according to the mark of the data packet includes:

[0028] In response to the delivery notice, mark the data packet as delivered;

[0029] When the local storage space is less than the preset storage space, delete the data packets in the local storage space according to the marked time.

[0030] As an improvement of the above solution, the power communication method further includes:

[0031] In response to a fault recovery notice from the communication server, according to the fault recovery notice, screen out the message data that has not been delivered to the communication server from the local of the cache server and send it to the communication server.

[0032] As an improvement of the above solution, the power communication method further includes:

[0033] In response to a probe request from a communication server in the same subnet, send the latest request identifier to the communication server; the latest request identifier includes the request identifier corresponding to the data packet with the latest reception time.

[0034] An embodiment of the present invention further provides a power communication system, including:

[0035] A data packet caching module, configured to, when receiving a data packet, if the local storage space is sufficient, store the data packet locally in the cache server, and if the local storage space is insufficient, transmit the data packet to a cache server in another subnet;

[0036] A communication server switching module, configured to, if a delivery notice or a response message from the communication server is not received within a preset time limit, judge the fault condition of the communication server, switch the communication server for communicating with the target server based on the fault condition, and select the data packet from the local storage space and transmit it to the communication server;

[0037] A delivery notice response module, configured to, if a delivery notice from a communication server in the same subnet is received within a preset time limit, notify the cache server actually storing the data packet to delete the data packet, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server;

[0038] A response message response module, configured to, if a response message from a communication server in a different subnet is received within a preset time limit, forward the response message to the power consumption terminal requesting communication, and notify the cache server actually storing the data packet to delete the data packet.

[0039] Compared with the prior art, a power communication method and system disclosed by the present invention, when receiving a data packet, if the local storage space is sufficient, stores the data packet locally in a cache server; if the local storage space is insufficient, transmits the data packet to a cache server in another subnet; if a delivery notice or response packet from a communication server is not received within a preset time limit, determines the fault condition of the communication server, switches the communication server for communicating with a target server based on the fault condition, and selects the data packet from the local storage space and transmits it to the communication server; if a delivery notice from a communication server in the same subnet is received within the preset time limit, notifies the cache server actually storing the data packet to delete the data packet, generates a communication completion notice, and sends the communication completion notice to the communication server actually communicating with the target server; if a response packet from a communication server in a non - same subnet is received within the preset time limit, forwards the response packet to the power consumption terminal requesting communication, and notifies the cache server actually storing the data packet to delete the data packet. By adopting the embodiment of the present invention, the number of power consumption terminals directly interacting with the target server can be reduced, the transmission pressure on the target server can be greatly reduced, and the occurrence of network congestion can be reduced. In addition, the sharing of storage resources between subnets can be realized, the normal delivery of data packets within the network to the target server can be ensured, and the reliability of data transmission is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a schematic flow chart of steps of a power communication method provided by an embodiment of the present invention;

[0041] Figure 2 is a schematic timing diagram of power communication under normal circumstances provided by an embodiment of the present invention;

[0042] Figure 3 is a schematic timing diagram of communication of a power distribution communication network in a case where a communication server needs to be switched provided by an embodiment of the present invention;

[0043] Figure 4 is a schematic timing diagram of communication of a power distribution communication network in a case where a cache server needs to be changed provided by an embodiment of the present invention;

[0044] Figure 5 is a schematic structural diagram of a power communication system provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts belong to the scope of protection of the present invention.

[0046] In the description of the specification and claims, it should be understood that the terms first, second, etc. in the specification and claims are only used for the purpose of distinguishing the description of the same technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features, nor necessarily describing the order or time sequence. The terms can be interchanged under appropriate circumstances. Thus, the features defined with "first", "second" may explicitly or implicitly include at least one of the features.

[0047] It should be noted in advance that the power distribution communication network can divide power consumption terminals into several subnets according to regions, and the subnet described in the embodiments of the present invention is one of the several subnets. The subnet is a local area network formed based on the power consumption terminals in the target area. The range of the target area is generally determined based on the geographical location, and can also be further determined in combination with the number of power consumption terminals. Exemplarily, 20 power consumption terminals within 100m are divided into a subnet, and the power consumption terminals within the subnet can communicate within the network based on power line carrier (PLC), microwave or wireless communication methods. The power consumption terminals include, but are not limited to, various power consumption terminals in the power system such as smart meters, various sensors, and vehicle chargers.

[0048] It can be understood that at least some of the power consumption terminals are installed with a first communication service program and / or a second communication service program. When the first communication service on the power consumption terminal is in the open state, the power consumption terminal becomes the first cache server in the communication control system. Correspondingly, when the second communication service on a certain power consumption terminal is in the open state, the power consumption terminal becomes the first communication server, where the opening and closing states of the first communication service program and the second communication service program on each power consumption terminal are determined according to the election result.

[0049] It is worth noting that each candidate power consumption terminal has at least two communication methods, that is, it can not only realize data communication within its own subnet, but also realize data communication with external network devices. It can be understood that the external network devices mentioned in the embodiments of the present application refer to devices that are not within its own subnet, including but not limited to central operation and maintenance servers, target servers, and power consumption terminals in other subnets.

[0050] The embodiments of the present invention provide a power communication method applied to a cache server. Please refer toFigure 1 , in this embodiment, the power communication method is specifically executed through steps S1 to S4:

[0051] S1. When a data packet is received, if the local storage space is sufficient, store the data packet locally in the cache server; if the local storage space is insufficient, transmit the data packet to the cache server of another subnet.

[0052] It can be understood that in practical applications, due to possible differences in the types of power consumption terminals within each subnet, the storage space of the cache servers in some subnets may not fully meet the data transmission requirements within the subnet. In the embodiments of the present invention, by leveraging the storage space of another subnet for storing data packets, sharing of storage resources between subnets can be achieved, thereby reducing the requirements for the storage space of the cache server and lowering the equipment cost.

[0053] S2. If a delivery notice or response packet from the communication server is not received within the preset time limit, determine the fault condition of the communication server, switch the communication server for communicating with the target server based on the fault condition, and select the data packet from the local storage space to transmit to the communication server.

[0054] It should be noted that when the communication server successfully communicates with the target server and delivers the data packet, it will send a delivery notice or response packet to the cache server. If the delivery notice is not received within the preset time limit, it indicates that there is a fault during the communication process, which needs to be investigated. Further, in order to avoid communication interruption, the embodiments of the present invention propose switching the communication server for communication.

[0055] It should also be noted that in the embodiments of the present invention, when the communication server fails, on the one hand, the cache server can store the data packet to avoid data loss due to reasons such as network congestion, signal interference, or hardware failure. On the other hand, it can transmit the data packet to the communication server after the communication is restored, without the user terminal having to initiate communication requests multiple times.

[0056] S3. If a delivery notice from the communication server of the same subnet is received within the preset time limit, notify the cache server that actually stores the data packet to delete the data packet, generate a communication completion notice, and send the communication completion notice to the communication server that actually communicates with the target server.

[0057] It should be noted that after the communication server successfully communicates with the target server, the relevant data packet can be deleted from the cache server to reduce the space occupation.

[0058] Considering that the communication server may be switched during the communication process, and the transmitted data packets on the communication server are not complete data packets, if a response is directly made through the communication server, it may not be possible to analyze the integrity of the data packets. In some preferred embodiments, after receiving the delivery notice, the cache server filters the data packets to be delivered to the target server, compares them with the data packets received from the user terminal, and generates a communication completion notice according to the comparison result, so that the communication server responds to the user terminal.

[0059] S4. If a response packet from a communication server in a non - same subnet is received within a preset time limit, forward the response packet to the power - consuming terminal that requests communication, and notify the cache server that actually stores the data packet to delete the data packet.

[0060] It should be noted that in the embodiments of the present invention, if the communication server that finally communicates with the target server is the communication server in the subnet where the user terminal is located, then communicate with the user terminal through this communication server to ensure the unified processing of the received and sent data; if the communication server that finally communicates with the target server is not the communication server in the subnet where the user terminal is located, then forward the response packet through the cache server in the subnet where the user terminal is located to achieve a unified interface within the network.

[0061] In the above solution, the cache server caches the data packets, and the communication server sends the unified packets, reducing the number of power - consuming terminals directly interacting with the target server, significantly reducing the transmission pressure on the target server, and reducing the occurrence of network congestion. More importantly, by automatically selecting the cache server and the communication server, sharing the storage resources between subnets can be achieved, and it can also ensure that the data packets within the network are normally delivered to the target server, improving the reliability of data transmission.

[0062] In some preferred embodiments, the cache server in another subnet described in step S1 is the cache server of the adjacent network.

[0063] In some preferred embodiments, the data packets received by the cache server come from the user terminal in the same subnet or the cache server in another subnet.

[0064] It should be noted that when the data packet comes from a user terminal in the same subnet, it indicates the communication requirement sent by the user terminal in the subnet where it is located; when the data packet comes from a cache server in another subnet, it means that the local storage space of the cache server in the other subnet is insufficient, so it requests to share the cache. In some preferred embodiments, if the local storage space of this cache server is also insufficient, this cache server continues to find cache servers in other subnets to request shared space, forming a shared space chain. In other preferred embodiments, if the local storage space of this cache server is also insufficient, it notifies the cache server in another subnet that sends the data packet to this cache server that the sharing fails, so that the cache server in the other subnet can find another cache server and rewrite the original shared space chain.

[0065] As a preferred implementation manner, in step S2, if a delivery notice or a response message from the communication server is not received within a preset time limit, determine the fault condition of the communication server, switch the communication server for communicating with the target server based on the fault condition, and select the data packet from the local storage space and transmit it to the communication server, which is specifically executed through steps S21 - S24:

[0066] S21: If a delivery notice or a response message from the first communication server currently in communication is not received within a preset time limit, send a probe request to the first communication server.

[0067] S22: Obtain the fault condition of the first communication server according to the response result of the probe request;

[0068] S23: Switch the communication server for communicating with the target server according to the fault condition.

[0069] S24: Select the undelivered data packet from the local storage space and transmit the undelivered data packet to the communication server.

[0070] By sending a probe request to the first communication server, it is possible to determine whether its internal network communication is normal, realize self - detection of abnormal internal network communication faults, so as to discover faults as soon as possible and process them.

[0071] Further, preferably, in step S22, obtaining the fault condition of the first communication server according to the response result of the probe request includes:

[0072] If the response result of the probe request is normal, it is considered that the communication between the first communication server and the target server is abnormal, which is the first fault condition;

[0073] If the response result of the detection request is abnormal, it is considered that there is an abnormal communication between the first communication server and the cache server, which is regarded as the second fault situation;

[0074] According to the first fault situation and the second fault situation, the fault situation of the communication server in the same subnet is obtained.

[0075] It can be understood that when the response result of the detection request is normal, it indicates that the communication server is running normally, but the response message feedback from the target server cannot be received. Therefore, it is considered that there is a fault in the communication between the communication server and the target server; while when the response result of the request is abnormal, it indicates that the communication server has a fault. In some preferred embodiments, fault self-detection within the distribution communication network can also be implemented based on the fault situation.

[0076] Furthermore, as a preferred implementation manner, step S23, switching the communication server that communicates with the target server according to the fault situation, includes:

[0077] When the fault situation is the first fault situation, a data retransmission request is generated according to the data message, and the data request is sent to the second communication server in another subnet, so that the second communication server communicates with the target server;

[0078] When the fault situation is the second fault situation, a re-election notice is sent to all power consumption terminals in the subnet where the first communication server is located, and a first communication server is re-selected from all the power consumption terminals, so that the new first communication server communicates with the target server.

[0079] In the embodiment of the present invention, if it is the first fault situation, then switch to the communication server in other subnets to ensure that communication with the target server can be achieved; if it is the second fault situation, at least it indicates that there is a fault in the network communication at this time, and it is difficult to determine whether communication with the target server can be achieved. Therefore, the communication server is re-elected within the subnet first to restore the communication state in a timely manner.

[0080] As a preferred implementation manner, step S3, if a delivery notice from the communication server in the same subnet is received within the preset time limit, notify the cache server actually storing the data message to delete the data message, and generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server, includes steps S31 - S33:

[0081] S31, if a delivery notice from the communication server in the same subnet is received within the preset time limit, send the delivery notice to the cache server actually storing the data message;

[0082] S32. In response to the delivery notice, mark the data packet as delivered, and delete the data packet in the local storage space according to the mark of the data packet;

[0083] S33. If the delivery notice comes from the communication server, generate a communication completion notice and send the communication completion notice to the communication server that actually communicates with the target server.

[0084] It should be noted that the delivery notice may directly come from the communication server or from the cache server of other subnets. However, in either case, when receiving the delivery notice, step S32 will be executed to respond to the delivery notice to mark the data packet in the local storage space. Only when the delivery notice comes from the communication server, will step S33 be executed.

[0085] Further preferably, step S32. In response to the delivery notice, mark the data packet as delivered, and delete the data packet in the local storage space according to the mark of the data packet, includes:

[0086] In response to the delivery notice, mark the data packet as delivered;

[0087] When the local storage space is smaller than the preset storage space, delete the data packets in the local storage space according to the marked time.

[0088] In the above solution, the cache server first marks the data packet as delivered, and when the storage space is insufficient, deletes the delivered data packets in chronological order, providing a fault tolerance space for misprocessing.

[0089] In some preferred embodiments, the power communication method further includes step S4: In response to a fault recovery notice from the communication server, according to the fault recovery notice, screen out the packet data that has not been delivered to the communication server locally from the cache server and send it to the communication server.

[0090] As an example, in some preferred embodiments, when the fault situation is the second fault situation, the communication server will be switched within the subnet. At this time, when the communication server switch is successful or the fault of the original communication server has been recovered before the switch is successful, a fault recovery notice will be sent to the cache server to enable the cache server to transmit the data packet.

[0091] It should be noted that the fault recovery notice may be sent by a new communication server or the original communication server. Specifically, in response to the re-election notice from the cache server, the communication server re-elects a communication server from all power consumption terminals in the current subnet and updates the communication server that communicates with the target server. If the fault of the original communication server has been recovered during the election process, the original communication server sends a fault recovery notice to the cache server. After the election is completed, the updated communication server sends a fault recovery notice to the cache server.

[0092] In some preferred embodiments, the power communication method further includes step S5: in response to a detection request from a communication server in the same subnet, sending the latest request identifier to the communication server; the latest request identifier includes the request identifier corresponding to the data packet with the latest reception time.

[0093] It should be noted that in the embodiments of the present invention, to achieve comprehensive self-detection of in-network communication, the communication server periodically or when locating a fault, sends a detection request to the cache server in the same subnet. The cache server responds to the detection request and sends the latest request identifier to the communication server. Among them, the latest request identifier is the request identifier corresponding to the data packet with the latest reception time. A data sending and receiving record table is maintained on the communication server, so the sending and receiving record table can be queried based on the request identifier to determine whether a new data packet has been received after the data packet corresponding to the request identifier. If not, it can be determined that the cache server is operating abnormally. Based on this, the service status monitoring of the cache server can be realized, further ensuring the normal operation of the communication control system and ensuring the normal transmission of in-network data packets.

[0094] To better understand the application of the embodiments of the present invention in the distribution communication network, the following will provide multiple specific embodiments to illustrate the power communication process of adopting the embodiments of the present invention in various situations. It should be noted that in the following embodiments, it is considered that the subnet where the user terminal that issues the communication requirement is located is the first subnet, the communication server in the first subnet is the first communication server, and the cache server in the first subnet is the first cache server. By analogy, other subnets can be the nth subnet, and the numbers of the communication servers and cache servers in each subnet are the same as the subnet numbers.

[0095] Please refer to Figure 2 , the embodiments of the present invention provide a scenario where the local storage space of the first cache server in the subnet where the power consumption terminal that issues the communication request is located is sufficient, and the first communication server in the subnet where it is located can communicate normally. In a request-response process of a data packet, the following steps are included:

[0096] S201. The power consumption terminal sends data packets to the first cache server and the first communication server respectively. S202. The first cache server stores the data packets. S203. The first communication server sends the data packets to the target server. Among them, after receiving the data packets, the first communication server can resolve the real access destination address encapsulated in the data packets, re-encapsulate the data packets based on its own access address and the real destination address, and send them to the target server pointed to by the real access destination address. S204. The target server responds to the data packets and sends a response packet to the first communication server. It can be understood that according to the different service types requested by the data packets, the forms of the response packets are also different. S205. After receiving the response packet, the first communication server determines that the data packets have been delivered and sends a delivery notice to the first cache server. S206. After receiving the delivery notice, the first cache server deletes the data packets in the cache. S207. After receiving the delivery notice, the first cache server sends a completion notice to the first communication server. S208. After receiving the response packet, the first communication server forwards the response packet to the power consumption terminal to complete the response to the data packets.

[0097] Based on the above steps S201 to S208, a normal data packet transmission process can be completed. However, in actual applications, data loss may occur due to reasons such as network congestion, signal interference, or hardware failures. Therefore, the first cache server can independently manage the cached data to achieve the retransmission of data packets.

[0098] Therefore, the present invention provides another embodiment. Please refer to Figure 3 , in the embodiment of the present invention, a scenario is provided. During a data packet transmission process, if the first cache server does not receive the delivery notice sent by the first communication server within the preset time limit, the request response process specifically includes:

[0099] S201. The power consumption terminal sends data packets to the first cache server and the first communication server respectively. S202. The first cache server stores the data packets. Then, since the first cache server does not receive the delivery notice within the preset time limit, step S211 is executed. The first cache server generates a data retransmission request based on the data packets and sends it to the second communication server in the second subnet. S212. The second communication server sends the data packets to the target server. S213. The target server responds to the data packets and sends a response packet to the second communication server. S214. The second communication server forwards the response packet to the first cache server. S215. The first cache server forwards the response packet to the power consumption terminal. S216. The first cache server deletes the data packets in the cache.

[0100] Exemplarily, when performing step S211, specifically, the first cache server encapsulates the data packet into a data retransmission request, including setting the destination address of the retransmission request to the second communication server and the source address to its own external network communication address. The construction method of the second subnet is the same as that of the first subnet. It can be a neighbor subnet of the first subnet or another subnet within a preset distance range that uses a different external network communication method. Here, using a different external network communication method means that the external network communication method used by the second communication server is different from that of the first communication server. For example, the first communication server uses a 4G network to communicate with external network devices, while the second communication server uses optical fiber to communicate with external network devices. Based on this, to a certain extent, it can be ensured that when the external network communication network of the first communication server fails, it will not affect the interaction between the second communication server and the target server, thereby improving the reliability of data transmission.

[0101] In some embodiments, generating a data retransmission request based on the data packet in step S211 above may further include detecting the first communication server, and generating a data retransmission request based on the detection result and the data packet. The detection result is used to indicate whether the first communication server responds normally. Based on this, it is possible to achieve timely feedback of the detection result of the first communication server, facilitating the target server to locate the fault after receiving the detection result and synchronize the fault location result to the central operation and maintenance server.

[0102] For example, when the detection result is normal, it indicates that the first communication server is running normally, but it cannot receive the response packet feedback from the target server, which means that there is a fault in the communication between the first communication server and the target server; when the detection result is abnormal, it indicates that the first communication server has a fault. In this way, self-checking of faults within the power distribution communication network can be realized.

[0103] In one embodiment, to ensure the normal transmission of data packets within the network, when the detection result indicates that the first communication server responds abnormally, the first cache server may send a re-election notice to all power consumption terminals in the first subnet, and determine whether to initiate a re-election based on the received response information. If so, it sends candidate information to all power consumption terminals in the first subnet and re-determines the power consumption terminal corresponding to the first communication server based on the received candidate information. The response information is determined by the power consumption terminals within the network based on their interaction status with the first communication server.

[0104] For example, when the power consumption terminal can currently interact with the first communication server normally, a response message indicating non-startup is fed back. In this way, the first cache server can learn that there is an abnormality in its interaction with the first communication server. When the power consumption terminal determines that it cannot currently interact with the first communication server normally, a startup signal is fed back. Based on this, when the first communication server is abnormal, an election can be initiated autonomously to promptly restore the communication state.

[0105] In practical applications, since the types of power consumption terminals within each subnet may vary, in some subnets, the storage space of the first cache server may not fully meet the data transmission requirements within the network. Based on this, in one embodiment, the storage of data packets is achieved by leveraging the storage space of the second subnet. Please refer to Figure 4 , and the request-response process specifically includes:

[0106] S201. The power consumption terminal sends the data packet S221 to the first cache server and the first communication server respectively. The first cache server sends the data packet to the second cache server within the second subnet, requesting the second cache server to store the data packet. S222. The second cache server stores the data packet. S203. The first communication server sends the data packet to the target server. S204. The target server responds to the data packet and sends a response message to the first communication server. S205. After receiving the response message, the first communication server determines that the data packet has been delivered and sends a delivery notice to the first cache server. S223. After receiving the delivery notice, the first cache server requests the second cache server to delete the data packet in the cache. S224. The second cache server deletes the data packet in the cache.

[0107] It should be noted that in step S222, after receiving the data packet, the second cache server can preferentially store it locally. If the local cache space is insufficient, in the same manner, the data packet is sent to the cache server in another subnet for storage.

[0108] Based on the above method, sharing of storage resources between subnets can be achieved, thereby reducing the storage space requirements for cache servers and lowering equipment costs.

[0109] By using a power communication method provided by an embodiment of the present invention, the data packets are cached by the cache server and the unified packet sending is performed by the communication server, reducing the number of power consumption terminals directly interacting with the target server, significantly reducing the transmission pressure on the target server, and reducing the occurrence of network congestion. More importantly, by automatically selecting the cache server and the communication server, sharing of storage resources between subnets can be achieved, and it can also ensure that the data packets within the network are normally delivered to the target server, improving the reliability of data transmission.

[0110] An embodiment of the present invention provides a power communication system applied to a cache server. Please refer to Figure 5 , the power communication system includes a data message cache module 11, a communication server switching module 12, a delivery notice response module 13, and a response message response module 14, where:

[0111] The data message cache module 11 is used to, when receiving a data message, if the local storage space is sufficient, store the data message locally in the cache server; if the local storage space is insufficient, transmit the data message to the cache server of another subnet;

[0112] The communication server switching module 12 is used to, if a delivery notice or a response message from the communication server is not received within a preset time limit, judge the fault condition of the communication server, switch the communication server for communicating with the target server based on the fault condition, and select the data message from the local storage space and transmit it to the communication server;

[0113] The delivery notice response module 13 is used to, if a delivery notice from the communication server in the same subnet is received within a preset time limit, notify the cache server actually storing the data message to delete the data message, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server;

[0114] The response message response module 14 is used to, if a response message from the communication server in a non - same subnet is received within a preset time limit, forward the response message to the power consumption terminal requesting communication, and notify the cache server actually storing the data message to delete the data message.

[0115] As a preferred embodiment, the data message received by the cache server comes from a user terminal in the same subnet or a cache server in another subnet.

[0116] As a preferred embodiment, the communication server switching module 12 includes:

[0117] A detection request sending unit, used to send a detection request to the first communication server if a delivery notice or a response message from the first communication server currently in communication is not received within a preset time limit;

[0118] A fault condition obtaining unit, used to obtain the fault condition of the first communication server according to the response result of the detection request;

[0119] A communication server switching unit, used to switch the communication server for communicating with the target server according to the fault condition;

[0120] A data transmission unit, configured to select undelivered data packets from the local storage space and transmit the undelivered data packets to the communication server.

[0121] Further, preferably, the fault situation acquisition unit is specifically configured to:

[0122] If the response result of the detection request is normal, it is considered that the communication between the first communication server and the target server is abnormal, as the first fault situation;

[0123] If the response result of the detection request is abnormal, it is considered that the communication between the first communication server and the cache server is abnormal, as the second fault situation;

[0124] Based on the first fault situation and the second fault situation, obtain the fault situation of the communication server in the same subnet.

[0125] Furthermore, as a preferred implementation manner, the communication server switching unit is specifically configured to:

[0126] When the fault situation is the first fault situation, generate a data retransmission request according to the data packet and send the data request to the second communication server in another subnet, so that the second communication server communicates with the target server;

[0127] When the fault situation is the second fault situation, send a re-election notice to all power consumption terminals in the subnet where the first communication server is located, and re-select the first communication server from all the power consumption terminals, so that the new first communication server communicates with the target server.

[0128] As a preferred implementation manner, the delivery notice response module 13 is specifically configured to:

[0129] If a delivery notice from the communication server in the same subnet is received within a preset time limit, send the delivery notice to the cache server actually storing the data packet;

[0130] In response to the delivery notice, mark the data packet as delivered, and delete the data packet in the local storage space according to the mark of the data packet;

[0131] If the delivery notice comes from the communication server, generate a communication completion notice and send the communication completion notice to the communication server actually communicating with the target server.

[0132] Further, preferably, in response to the delivery notice, marking the data packet as delivered and deleting the data packet in the local storage space according to the mark of the data packet includes:

[0133] In response to the delivery notice, marking the data packet as delivered;

[0134] When the local storage space is less than the preset storage space, deleting the data packets in the local storage space according to the marked time.

[0135] As a preferred implementation manner, the power communication system further includes a fault recovery notice response module, configured to, in response to a fault recovery notice from a communication server, screen out undelivered message data from the local of the cache server and send it to the communication server according to the fault recovery notice.

[0136] As a preferred implementation manner, the power communication system further includes a detection request response module, configured to, in response to a detection request from a communication server in the same subnet, send a latest request identifier to the communication server; the latest request identifier includes the request identifier corresponding to the data packet with the latest reception time.

[0137] By using a power communication system provided by an embodiment of the present invention, caching data packets through a cache server and performing unified message sending through a communication server reduces the number of power consumption terminals directly interacting with the target server, can greatly reduce the transmission pressure of the target server, and reduce the occurrence of network congestion. More importantly, by automatically selecting the cache server and the communication server, sharing storage resources between subnets can be realized, and it can also ensure that data packets in the network are normally delivered to the target server, improving the reliability of data transmission.

[0138] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.

[0139] The above are the preferred implementation manners of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.

Claims

1. A power communication method, characterized in that, Applied to a cache server, including: When receiving a data packet, if the local storage space is sufficient, store the data packet in the local cache server; if the local storage space is insufficient, transmit the data packet to the cache server of another subnet; If a delivery notice or response packet from the communication server is not received within a preset time limit, judge the fault situation of the communication server, switch the communication server for communicating with the target server based on the fault situation, and select the data packet from the local storage space and transmit it to the communication server; If a delivery notice from the communication server of the same subnet is received within the preset time limit, notify the cache server actually storing the data packet to delete the data packet, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server; If a response packet from the communication server of a non - same subnet is received within the preset time limit, forward the response packet to the power consumption terminal requesting communication, and notify the cache server actually storing the data packet to delete the data packet.

2. The power communication method according to claim 1, wherein The data packet received by the cache server comes from the user terminal of the same subnet or the cache server of another subnet.

3. The power communication method according to claim 1, wherein The step of, if a delivery notice or response packet from the communication server is not received within a preset time limit, judge the fault situation of the communication server, switch the communication server for communicating with the target server based on the fault situation, and select the data packet from the local storage space and transmit it to the communication server, includes: If a delivery notice or response packet from the first communication server currently in communication is not received within the preset time limit, send a probe request to the first communication server; Obtain the fault situation of the first communication server according to the response result of the probe request; Switch the communication server for communicating with the target server according to the fault situation; Select an undelivered data packet from the local storage space and transmit the undelivered data packet to the communication server.

4. The power communication method according to claim 3, wherein The step of obtaining the fault situation of the first communication server according to the response result of the probe request includes: If the response result of the probe request is normal, consider that the first communication server has abnormal communication with the target server, which is the first fault situation; If the response result of the probe request is abnormal, consider that the first communication server has abnormal communication with the cache server, which is the second fault situation; Obtain the fault situation of the communication server of the same subnet according to the first fault situation and the second fault situation.

5. The power communication method according to claim 4, wherein The step of switching the communication server for communicating with the target server according to the fault situation includes: When the fault situation is the first fault situation, generate a data re - transmission request according to the data packet and send the data request to the second communication server of another subnet so that the second communication server communicates with the target server; When the fault situation is the second fault situation, send a re-election notice to all power consumption terminals in the subnet where the first communication server is located, and re-select the first communication server from all the power consumption terminals, so that the new first communication server communicates with the target server.

6. The power communication method according to claim 1, wherein If a delivery notice from a communication server in the same subnet is received within the preset time limit, notify the cache server actually storing the data packet to delete the data packet, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server, including: If a delivery notice from a communication server in the same subnet is received within the preset time limit, send the delivery notice to the cache server actually storing the data packet; In response to the delivery notice, mark the data packet as delivered, and delete the data packet in the local storage space according to the mark of the data packet; If the delivery notice comes from the communication server, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server.

7. The power communication method according to claim 6, wherein The step of, in response to the delivery notice, marking the data packet as delivered and deleting the data packet in the local storage space according to the mark of the data packet includes: In response to the delivery notice, mark the data packet as delivered; When the local storage space is less than the preset storage space, delete the data packets in the local storage space according to the marked time.

8. The power communication method according to claim 1, characterized in that The power communication method further includes: In response to a fault recovery notice from a communication server, according to the fault recovery notice, screen out the packet data that has not been delivered to the communication server from the local of the cache server and send it to the communication server.

9. The power communication method according to claim 1, characterized in that The power communication method further includes: In response to a detection request from a communication server in the same subnet, send the latest request identifier to the communication server; the latest request identifier includes the request identifier corresponding to the data packet with the latest reception time.

10. A power communication system, characterized in that, Applied to a cache server, it includes: A data packet caching module, configured to, when receiving a data packet, if the local storage space is sufficient, store the data packet locally in the cache server, and if the local storage space is insufficient, transmit the data packet to a cache server in another subnet; A communication server switching module, configured to, if a delivery notice or a response message from a communication server is not received within the preset time limit, judge the fault situation of the communication server, switch the communication server communicating with the target server based on the fault situation, and select the data packet from the local storage space and transmit it to the communication server; A delivery notice response module, configured to, if a delivery notice from a communication server in the same subnet is received within the preset time limit, notify the cache server actually storing the data packet to delete the data packet, generate a communication completion notice, and send the communication completion notice to the communication server actually communicating with the target server; A response message response module, which is used to forward the response message to the power consumption terminal requesting communication and notify the cache server actually storing the data message to delete the data message if a response message from a communication server in a non-same subnet is received within a preset time limit.