WO2023174043A1 - 一种电力线通信系统、在网状态检测方法及设备 - Google Patents

一种电力线通信系统、在网状态检测方法及设备 Download PDF

Info

Publication number
WO2023174043A1
WO2023174043A1 PCT/CN2023/078470 CN2023078470W WO2023174043A1 WO 2023174043 A1 WO2023174043 A1 WO 2023174043A1 CN 2023078470 W CN2023078470 W CN 2023078470W WO 2023174043 A1 WO2023174043 A1 WO 2023174043A1
Authority
WO
WIPO (PCT)
Prior art keywords
site
target site
heartbeat
heartbeat cycle
target
Prior art date
Application number
PCT/CN2023/078470
Other languages
English (en)
French (fr)
Inventor
曹倩
茆意伟
郑博文
林学森
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023174043A1 publication Critical patent/WO2023174043A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/46Monitoring; Testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Definitions

  • the present application relates to the field of terminal technology, and in particular to a power line communication system, network status detection method and equipment.
  • Power line communication refers to a communication technology that uses power lines as communication media to transmit signals through carrier waves.
  • the roles of electronic devices that communicate in PLC can include central coordinator (central coordinator, CCO), proxy coordinator (proxy coordinator, PCO) and station (station, STA).
  • CCO central coordinator
  • proxy coordinator proxy coordinator
  • station station
  • STA station
  • CCO central coordinator
  • PLC gateway which is responsible for network management, such as managing the network status of PCO and STA in PLC.
  • PLC can perform hierarchical networking based on CCO.
  • the hierarchical networking process can be as follows: the first-level site attempts to access the PLC network, the CCO performs whitelist authentication on the first-level site, and after the CCO passes the authentication of the first-level site, the association result is passed The association confirmation frame is returned to the first-level site, and the first-level site successfully accesses the PLC network.
  • the first-level site is one-hop communication distance from the CCO.
  • the site two-hop communication distance from the CCO is called the second-level site.
  • the first-level site After the first-level site is connected to the PLC network, it can send a beacon frame to announce the existence of the PLC network.
  • the first-level site is connected to the PLC network.
  • the role of the first-level site is PCO.
  • Level-by-level announcements can help STAs far away from the CCO access the PLC network.
  • CCO can be connected to PCO or STA
  • PCO can be connected to other PCOs or STAs.
  • the STA After the networking is completed, the STA needs to regularly send heartbeat messages to the CCO to maintain the STA's online status and route reachability.
  • all STAs in the PLC network send heartbeat messages to the CCO at a fixed period. If the communication quality of the link where the STA is located is low or the communication distance between the STA and the CCO is far, it may cause the CCO to be unable to detect the online status of the STA in a timely manner. , which in turn cannot guarantee the controllability of the equipment, affecting the normal communication between various equipment in the PLC network.
  • This application provides a power line communication system, a network status detection method and equipment, which are used to detect the network status of each site in a PLC network in a timely manner.
  • the present application provides a power line communication system, which includes a central coordinator and at least one site, and the target site is any one of the at least one site.
  • the central coordinator is used to obtain equipment information and/or link information of the at least one site.
  • the equipment information is used to indicate the number of offline times of the site, and the link information is used to indicate the number of times the link of the site is located.
  • Communication quality and/or site association status determine the heartbeat cycle of the target site based on the device information and/or link information of the target site, and indicate the heartbeat cycle of the target site to the target site;
  • the target site is used to obtain the heartbeat cycle of the target site indicated by the central coordinator, and based on the The heartbeat message is sent according to the heartbeat cycle of the target site, and the heartbeat message is used to indicate that the network status of the target site is online.
  • the CCO in the PLC network can determine the heartbeat cycle of the site based on the site's device information and/or link information, so that the heartbeat cycle of different sites can be flexibly set.
  • CCO can detect the network status of each site in a timely manner and ensure the controllability of the PLC network equipment.
  • the device information of the target site includes the number of times the target site has been offline within a preset time period; the link information of the target site includes the communication quality of the link where the target site is located, the At least one of the number of sites linked to the proxy site associated with the target site and the number of levels linked to the proxy site associated with the target site.
  • the heartbeat period of the target site determined by CCO is related to the offline status of the target site and the link condition of the target site, so that the heartbeat period of the target site is more suitable for the target site to send heartbeat messages.
  • the heartbeat cycle of the target site satisfies at least one of the following conditions: the heartbeat cycle of the target site is negatively correlated with the number of times the target site has been offline within a preset time period; the heartbeat cycle of the target site The cycle is positively related to the communication quality of the link where the target site is located; the heartbeat cycle of the target site is positively related to the number of sites linked to the proxy site associated with the target site; the heartbeat cycle of the target site is positively related to the The number of levels linked to the proxy site associated with the target site is positively correlated.
  • the CCO in this application determines the heartbeat cycle of the target site, the more times the target site is offline within the preset time period, the shorter the heartbeat cycle of the target site will be, so that the CCO can quickly detect the target site. Detect changes in the network status of the target site in a timely manner. Or the worse the communication quality of the target site, the shorter the heartbeat cycle of the target site. This prevents the CCO from being able to sense the network status of the target site in a timely manner due to poor communication quality of the link where the target site is located. Or when the proxy site associated with the target site has a large number of linked sites or a large number of linked levels, the cycle of the target site can be longer to prevent conflicts caused by multiple sites sending heartbeat messages frequently at the same time.
  • the central coordinator is specifically configured to: send a routing parameter notification entry to the target site, where the routing parameter notification entry includes the device identification of the target site and the heartbeat cycle of the target site. ; Or send a management message to the target site, where the management message includes the device identification of the target site and the heartbeat cycle of the target site.
  • CCO can indicate the heartbeat period of the target site to the target site through routing parameter notification entries or new management messages, thus flexibly realizing heartbeat period indication.
  • the target site is at least a secondary site; the target site is specifically configured to: send a heartbeat message to a proxy site associated with the target site based on the heartbeat cycle of the target site;
  • the central coordinator is also configured to: receive a heartbeat detection message sent by a primary site in the link where the target site is located, where the heartbeat detection message includes activity information of the target site; according to the heartbeat The detection packet determines that the network status of the target site is online.
  • CCO can receive heartbeat detection messages sent by the proxy site associated with the target site to sense the network status of the target site, and aggregate the site activity information of multiple sites in In one heartbeat detection message, the overhead of network maintenance messages can be reduced.
  • the target site is at least a second-level site, which can be understood to mean that the target site is a second-level site or a second-level or higher site (for example, a third-level site or a fourth-level site).
  • the target site is a first-level site; the target site is specifically configured to: send a heartbeat message to the central coordinator based on the heartbeat cycle of the target site;
  • the central coordinator is also configured to: receive the heartbeat message sent by the target site, and determine the presence of the target site.
  • the network status is online.
  • the target site when the target site is a first-level site, that is, when the target site is directly connected to the CCO, the target site can directly send a heartbeat message to the CCO to indicate that the target site's network status is online.
  • the central coordinator if the central coordinator does not receive the heartbeat message of the target site or the heartbeat detection message containing the activity information of the target site in the preset heartbeat detection cycle, then determine the target site The network status of the site is offline; if the central coordinator determines that the network status of the target site is offline in N consecutive heartbeat detection cycles, it determines that the network status of the target site is not connected to the network.
  • this application provides a method for detecting network status, which is applied to a central coordinator.
  • the method includes: obtaining equipment information and/or links of at least one site in the power line communication system to which the central coordinator belongs.
  • Information the device information is used to indicate the number of offline times of the site, and the link information is used to indicate the communication quality of the link where the site is located and/or the site association situation; determined based on the equipment information and/or link information of the target site.
  • the heartbeat cycle of the target site which is any one of the at least one site; indicating the heartbeat cycle of the target site to the target site, so that the target site is based on the heartbeat cycle of the target site.
  • a heartbeat message is sent in a heartbeat cycle, and the heartbeat message is used to indicate that the network status of the target site is online.
  • the device information of the target site includes the number of times the target site has been offline within a preset time period; the link information of the target site includes the communication quality of the link where the target site is located, the At least one of the number of sites linked to the proxy site associated with the target site and the number of levels linked to the proxy site associated with the target site.
  • the heartbeat cycle of the target site satisfies at least one of the following conditions: the heartbeat cycle of the target site is negatively correlated with the number of times the target site has been offline within a preset time period; the heartbeat cycle of the target site The cycle is positively related to the communication quality of the link where the target site is located; the heartbeat cycle of the target site is positively related to the number of sites linked to the proxy site associated with the target site; the heartbeat cycle of the target site is positively related to the The number of levels linked to the proxy site associated with the target site is positively correlated.
  • indicating the heartbeat cycle of the target site to the target site includes: sending a routing parameter notification entry to the target site, and the routing parameter notification entry includes a device of the target site. identification and the heartbeat cycle of the target site; or send a management message to the target site, where the management message includes the device identification of the target site and the heartbeat cycle of the target site.
  • the method further includes: receiving a heartbeat detection report sent by a primary station in the link where the target station is located.
  • the heartbeat detection message includes the activity information of the target site; determines that the network status of the target site is online according to the heartbeat detection message; or receives the heartbeat message sent by the target site and determines The network status of the target site is online; wherein the target site is associated with the central coordinator.
  • this application provides a method for detecting network status, which is applied to sites in a power line communication system.
  • the method includes: obtaining the heartbeat cycle of the site indicated by the central coordinator, where the heartbeat cycle of the site is The central coordinator determines based on the equipment information and/or link information of the site.
  • the equipment information is used to indicate the number of offline times of the site.
  • the link information is used to indicate the number of times the link where the site is located. Communication quality and/or site association status; sending heartbeat messages based on the heartbeat cycle of the site, and the heartbeat messages are used to indicate that the network status of the site is online.
  • the device information of the site includes the number of times the site has been offline within a preset time period;
  • the link information of the site includes the communication quality of the link where the site is located, the At least one of the number of sites linked to the proxy site and the number of levels linked to the proxy site associated with the site.
  • the heartbeat cycle of the site satisfies at least one of the following conditions: the heartbeat cycle of the site is negatively correlated with the number of times the site is offline within a preset period of time; the heartbeat cycle of the site is negatively correlated with the The communication quality of the link where the site is located is positively correlated; the heartbeat cycle of the site is positively correlated with the number of sites linked to the proxy site associated with the site; the heartbeat cycle of the site is positively correlated with the number of sites linked to the proxy site associated with the site The number of levels is positively correlated.
  • obtaining the heartbeat cycle of the site indicated by the central coordinator includes: receiving a routing parameter notification entry sent by the central coordinator, and the routing parameter notification entry includes the device of the site identification and the heartbeat cycle of the site; or receive a management message sent by the central coordinator, where the management message includes the device identity of the site and the heartbeat cycle of the site.
  • sending a heartbeat message based on the heartbeat cycle of the site includes: when the site is at least a secondary site, sending a heartbeat message to a proxy site associated with the site based on the heartbeat cycle of the site.
  • the present application provides an electronic device, which includes multiple functional modules; the multiple functional modules interact to implement any of the above aspects and the methods executed by the target site or sites in each embodiment thereof.
  • the multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementation.
  • the present application provides an electronic device, including at least one processor and at least one memory.
  • Computer program instructions are stored in the at least one memory.
  • the at least one processor executes any of the above. Aspects and methods performed by target sites or sites in various embodiments thereof.
  • the present application provides a central coordinator, which includes multiple functional modules; the multiple functional modules interact to implement any of the above aspects and what the central coordinator performs in each embodiment.
  • the multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementation.
  • the present application provides a central coordinator, including at least one processor and at least one memory.
  • Computer program instructions are stored in the at least one memory.
  • the central coordinator executes the above A method performed by a central coordinator in any aspect and embodiments thereof.
  • the present application also provides a computer program product containing instructions, which when the computer program product is run on a computer, causes the computer to execute any of the above aspects and the central coordinator or site in each embodiment thereof. (target site) execution method.
  • the present application also provides a computer-readable storage medium.
  • a computer program is stored in the computer-readable storage medium.
  • the computer program is executed by a computer, the computer is caused to execute any one of the above aspects and the above.
  • the method is performed by a central coordinator or site (target site) in various embodiments.
  • the present application also provides a chip, which is used to read the computer program stored in the memory and execute the method executed by the central coordinator or site (target site) in any of the above aspects and each embodiment thereof. .
  • the present application also provides a chip system, which includes a processor for supporting a computer device to implement any of the above aspects and methods executed by a central coordinator or a site (target site) in each embodiment thereof.
  • the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device.
  • the chip system can be composed of chips or include chips and other discrete devices.
  • Figure 1 is a schematic diagram of a PLC circuit in a smart home scenario provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a PLC network provided by an embodiment of the present application.
  • Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Figure 4 is a software structure block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a PLC network provided by an embodiment of the present application.
  • Figure 6 is a flow chart of a network presence detection method provided by an embodiment of the present application.
  • At least one refers to one or more, and “multiple” refers to two or more.
  • “And/or” describes the relationship between associated objects, indicating that there can be three relationships. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A, B can be singular or plural. The character “/” generally indicates that the related objects are in an “or” relationship. "At least one (item) of the following” or similar expressions thereof refers to any combination of these items, including any combination of single item (items) or plural items (items).
  • At least one of a, b or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c Can be single or multiple.
  • Power line communication refers to a communication technology that uses power lines as communication media to transmit signals through carrier waves.
  • PLC Power line communication
  • One of the main advantages of PLC compared to other communication technologies is that PLC can use existing power lines as transmission media and does not need to set up new lines, thus greatly reducing early deployment costs, and does not require separate maintenance of lines, further reducing later maintenance costs.
  • Due to the high popularity of power line deployment power line communication is also widely used.
  • PLC can be used in scenarios such as smart homes, remote meter reading, urban lighting, smart communities, parking lot management systems, security and anti-theft and fire alarm systems.
  • FIG. 1 is a schematic diagram of a PLC circuit in a smart home scenario provided by an embodiment of the present application.
  • gateways in a smart home scenario, gateways, distribution boxes, light-emitting diode (LED) drivers, curtain motors, temperature controls, and switches/sockets can communicate through power lines.
  • the gateway can perform network management on the entire PLC network through power lines, such as sending control messages to electronic devices connected to the PLC network through power lines, receiving heartbeat messages sent by electronic devices, etc.
  • the gateway can be a wireless and wired hybrid gateway, and the hybrid gateway can interact with a cloud server through wireless communication.
  • the cloud server can be a server provided by a terminal device or smart home device manufacturer, or can also be a server provided by a third-party application platform. Server, the embodiment of this application does not limit this.
  • the electronic device used by the user can also communicate with the cloud server.
  • the user can trigger the control command through the electronic device.
  • the electronic device sends the control command to the cloud server.
  • the cloud server sends the control command to the hybrid gateway.
  • the hybrid gateway performs the control command according to the The control instructions control each smart home device through the PLC network.
  • users can control smart home devices through applications installed on smartphones, or users can voice control smart home devices through speakers.
  • the Institute of Electrical and Electronics Engineers (IEEE) 1901.1 standard was officially released and implemented.
  • This standard divides the PLC protocol stack into the following layers: application layer, transport layer, network layer, data link layer and physical layer.
  • the data link layer includes a network management sublayer and a medium access control (medium access control, MAC) sublayer.
  • the network management sublayer is responsible for the aggregation and fragmentation of application layer messages, network management, and routing update and maintenance.
  • the MAC sublayer is responsible for seizing physical channels to provide reliable communication.
  • the physical layer is responsible for encoding and modulating the data from the MAC sublayer and sending it to the power line, and demodulating and decoding the signal received from the power line and sending it back to the MAC sublayer.
  • FIG. 2 is a schematic diagram of a PLC network provided by an embodiment of the present application.
  • the roles of electronic equipment communicating in the PLC network include central coordinator (central coordinator, CCO), proxy coordinator (proxy coordinator, PCO) and station (station, STA).
  • CCO is the PLC gateway, responsible for network management, such as managing the network status of PCO and STA in the PLC network.
  • the hybrid gateway in the smart home scenario shown in Figure 1 can be a CCO.
  • the PCO can assist STAs that are far away from the CCO to access the PLC network. It can also manage the network status of STAs connected to the PCO, and report the network status of the STAs connected to the PCO to the CCO.
  • the PCO needs to assist the STAs that communicate with the CCO far away from each other to access the PLC network and build the PLC network through hierarchical networking. .
  • the following is an introduction to the step-by-step networking process of the PLC network based on the PLC network structure shown in Figure 2.
  • first-level sites sites that are one hop away from the CCO are called first-level sites.
  • STA1, STA2, PCO1, and STA3 are first-level sites; sites that are two communication distances away from the CCO are called second-level sites.
  • Sites, for example, STA4, STA5, PCO2, and PCO3 are secondary sites; and by analogy, STA6, STA7, STA8, and STA9 are third-level sites.
  • the level of the electronic equipment (such as the first-level site or the second-level site) is related to the physical distance in the line.
  • the CCO When the first-level site attempts to access the PLC network, the CCO performs whitelist authentication on the first-level site. After the CCO passes the authentication of the first-level site, the association result is sent back to the first-level site through the association confirmation frame.
  • the first-level site successfully connects. Enter the PLC network. After the first-level site is connected to the PLC network, it can send a beacon frame to announce the existence of the PLC network. After the unassociated second-level site near the first-level site listens to the beacon frame of the first-level site, it can send it through a The first-level site is connected to the PLC network. At this time, the role of the first-level site is PCO.
  • STA4, STA5, PCO2 and PCO3 can access the PLC network through PCO1.
  • STA4, STA5, PCO2 and PCO3 can also send beacon frames to announce the existence of the PLC network.
  • STA6 and STA7 can access the PLC network through PCO2, and STA8 and STA9 can access the PLC network through PCO3.
  • the PCO is associated with its attached STA.
  • STA4, STA5, PCO2, and PCO3 are associated with PCO1
  • STA6, STA7 are associated with PCO2
  • STA8, STA9 are associated with PCO3.
  • the PCO can assist other sites in accessing the PLC network, and can also serve as a message transfer station to deliver messages to the STAs and CCOs attached to the PCO. Therefore, the PCO can be regarded as a special site in the PLC network.
  • the PCO can also It is called a proxy site, and a site that is not connected to any STA can be called a discovery site.
  • the CCO can also designate certain STAs to become PCOs to assist STAs that are far away from the CCO in accessing the PLC network.
  • the CCO can specify the PCO based on the link quality and the number of directly connected hops.
  • the CCO (the gateway in Figure 1) can indicate that the switch closer to the CCO is the PCO, then The switch can send beacon frames through the power line to announce the existence of the PLC network, thereby assisting electronic devices near the switch to access the PLC network.
  • the beacon frame sent by the PCO needs to carry the time slot scheduling arrangement of the central beacon frame.
  • the STA When the STA attempts to access the network, it can evaluate the PCO near the STA and select a channel with better channel quality and a distance from the CCO.
  • the PCO with a shorter path sends an association request.
  • the STA can send an association request frame to the PCO.
  • the STA can determine whether it can send the beacon frame based on the start associated bit in the received beacon frame and the time slot scheduling arrangement.
  • the PCO sends the association request and the timing of sending the association request.
  • the STA is a first-level site, the STA can directly send an association request to the CCO.
  • the STA waits for the association confirmation message (or association confirmation frame) returned by the PCO or CCO, and determines whether the STA has successfully accessed the network based on the result field in the association confirmation message.
  • the CCO needs to promptly sense the network status of each STA and PCO in the PLC network for network management.
  • the network status of each STA can be online, offline, or not connected to the network.
  • An STA online means that the STA is active, can receive packets from other STAs at any time, and can periodically send heartbeat packets to the PCO or CCO associated with the STA.
  • STA offline means that the STA cannot normally receive messages from other electronic devices, but the CCO will not reclaim the communication resources occupied by the STA.
  • SOF start of frame
  • the STA is not connected to the network. This means that the STA is not connected to the PLC network.
  • the CCO determines that the STA is not connected to the network, it will recycle the communication resources occupied by the STA. At this time, the STA needs to resend the association request before requesting access to the PLC network again.
  • the STA in the PLC network needs to periodically send heartbeat messages to the PCO or CCO associated with the STA.
  • the heartbeat messages can be used by the PCO or CCO to determine that the STA is online.
  • the PCO can report the site activity information in the discovery list maintained by the PCO to the CCO through periodic heartbeat detection messages, so that the CCO can summarize the network status of STAs on the entire network.
  • the sites in the discovery list maintained by the PCO can be STAs attached to the PCO. That is to say, the PCO in the PLC network can send heartbeat detection packets to the CCO to report the information of the active sites that the PCO can perceive.
  • the STA directly connected to the CCO can directly send the heartbeat packet to the CCO, so that the CCO can determine Periodically sense the network status of STAs on the entire network.
  • the active site is the STA whose network status is online.
  • the heartbeat detection message of the low-level PCO can be triggered by the heartbeat detection message of the high-level PCO.
  • the content of the heartbeat detection packets of the high-level PCO can be summarized in the heartbeat detection packets of the low-level PCO, thereby summarizing the information of active sites that the PCO can sense into one heartbeat detection packet, saving the overhead of network maintenance packets.
  • low-level PCO1 can receive heartbeat detection messages sent by high-level PCO2 and PCO3, thereby triggering PCO1 to generate its own heartbeat detection message.
  • the heartbeat detection message of PCO2 may include the activity information of STA6 and/or STA7
  • the heartbeat detection message of PCO3 may include the activity information of STA8 and/or STA9.
  • PCO1 receives the heartbeat detection message of PCO2 and After the heartbeat detection message of PCO3, the heartbeat detection message of PCO1 can be generated.
  • the heartbeat detection message of PCO1 can include the heartbeat detection message of PCO2 and the content of the heartbeat detection message of PCO3, and can also include STA4 and/or STA5 activity information.
  • PCO1 sends the heartbeat detection message to the CCO, so that the CCO can sense the network status of STA4-STA9 in a heartbeat detection message.
  • the generation period of heartbeat detection messages is generally 1/8 of the routing period, where the routing period can be dynamically adjusted by the CCO according to the network status.
  • the CCO determines that the STA's network status is online.
  • the CCO can determine that the STA's network status is online.
  • CCO determines that the STA's online status is offline.
  • a complete heartbeat detection cycle can be set to two routing cycles.
  • the CCO detects that the STA is an active site, such as the CCO receives the heartbeat message sent by the STA, or the CCO detects that the STA is an active site through the heartbeat detection message reported by the PCO. Active site, CCO can re-determine the STA's network status to online.
  • CCO can maintain a white list, and the information of sites that successfully connect to the PLC network is included in the white list. If the CCO detects that there is a site in the PLC network that is not included in the whitelist, the CCO can send an offline indication message to the site. After receiving the offline indication message, the site performs offline actions after the preset delayed offline time expires. If the site needs to reconnect to the PLC network after performing offline actions, it can reapply to access the PLC network.
  • the CCO can fill the offline indication message with the information of the STAs that need to perform offline actions, and send the offline indication message through broadcast, so that it can pass a message Instruct multiple STAs to perform offline actions to reduce overhead.
  • the CCO determines that the STA is not connected to the network.
  • the CCO determines that the STA's online status is not connected to the network.
  • the CCO if the CCO receives a message from an STA that has determined that the network status is not connected to the network, the CCO needs to send an offline indication message to the STA. After receiving the offline indication message, the STA performs offline actions. If the site needs to reconnect to the PLC network after performing offline actions, it can reapply to access the PLC network.
  • the STA determines that its online status is offline.
  • the STA can also determine whether its online status is offline. When the STA determines that its network status is offline, it needs to reapply to join the network. For example, in any of the following situations, the STA can determine that its online status is offline:
  • the STA did not receive any beacon frames within a complete heartbeat detection cycle
  • the communication success rate of the PCO associated with the STA is 0;
  • the STA receives the offline indication message, indicating that the STA's network status is offline;
  • the first-level site STA detects that the MAC address of the CCO has changed, and the new MAC address takes effect for more than one heartbeat cycle;
  • the STA detects that the site role of the PCO associated with the STA changes to a discovery site, and the PCO becomes a discovery site for more than one routing cycle;
  • the level of STA is greater than the maximum level threshold of the PLC network.
  • the maximum level threshold can be 15.
  • the STAs in the PLC network all send heartbeat messages based on the same cycle.
  • the CCO detects the online status of the STA in the PLC network based on the preset heartbeat detection cycle. detection, and the heartbeat cycle of the STA sending heartbeat messages, the generation cycle of the PCO heartbeat detection message, and the cycle of the STA judging that its network status is offline are only related to the routing cycle.
  • the CCO may not be able to detect the online status of the STA in time, thereby failing to ensure the controllability of the equipment, affecting the control rate of the equipment in the PLC network, and at the same time affecting the communication between various equipment in the PLC network. Normal communication.
  • this application provides a network status detection method.
  • This method is used to detect the network status of each STA in the PLC network, so that the CCO can sense the network status of the STA in a timely manner and ensure the controllability of the equipment of the PLC network.
  • the CCO determines the heartbeat cycle of the target site based on the device information and/or link information of the target site.
  • the device information of the target site is used to indicate the number of offline times and/or business requirements of the target site.
  • the link information of the target site is used to indicate the communication quality and/or site association of the link where the target site is located in the PLC network.
  • the CCO indicates the target site's heartbeat cycle to the target site, and the target site sends messages based on the target site's heartbeat cycle.
  • Heartbeat messages are used to indicate that the network status of the target site is online.
  • the CCO in the PLC network can determine the heartbeat cycle of the site based on the site's device information and/or link information, so that the heartbeat cycle of different sites can be flexibly set.
  • the CCO can detect the network status of each site in a timely manner to ensure Equipment controllability of PLC network.
  • the network presence detection method provided by the embodiment of this application can be applied to the PLC network shown in Figure 2. Furthermore, the network presence detection method provided by the embodiment of this application is suitable for smart homes, remote meter reading, urban lighting, and smart communities. , parking lot management system, security anti-theft and fire alarm system and other scenarios. For example, this method can be applied to the smart home scenario shown in Figure 1.
  • the station may be an electronic device with a PLC module, such as a light, a curtain motor, an air conditioner, a home sensor, a garage sensor, etc.
  • a PLC module such as a light, a curtain motor, an air conditioner, a home sensor, a garage sensor, etc.
  • the embodiment of the present application does not place any restrictions on the specific type of electronic device.
  • FIG. 3 is a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , Antenna 1, Antenna 2, mobile communication module 150, wireless communication module 160, power line communication module 161, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indication Device 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) wait.
  • image signal processor, ISP image signal processor
  • controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices.
  • the charging management module 140 is used to receive charging input from the charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, wireless communication module 160, etc.
  • the wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
  • the mobile communication module 150 can provide wireless communication including 2G/3G/4G/5G etc. applied on the electronic device 100. solution.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellites.
  • WLAN wireless local area networks
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the power line communication module 161 may provide a solution for power line communication applied on the electronic device 100 .
  • the power line communication module 161 can receive messages sent by other devices through the power line, process the received messages, and perform operations corresponding to the messages through the processor 110 .
  • the power line communication module 161 can also send messages to other devices through the power line to implement power line communication between devices.
  • at least part of the functional modules of the power line communication module 161 may be provided in the same device as at least part of the modules of the processor 110 .
  • the display screen 194 is used to display a display interface of an application, such as displaying a display page of an application installed on the electronic device 100 .
  • Display 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • Camera 193 is used to capture still images or video.
  • the object passes through the lens to produce an optical image that is projected onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor.
  • CCD charge coupled device
  • CMOS complementary metal oxide semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the electronic device 100 .
  • the internal memory 121 may include a program storage area and a data storage area.
  • the stored program area can store an operating system, software code of at least one application program, etc.
  • the storage data area may store data generated during use of the electronic device 100 (such as captured images, recorded videos, etc.).
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, save pictures, videos, etc. files on an external memory card.
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, an acceleration sensor 180B, a touch sensor 180C, etc.
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • Touch sensor 180C also known as "touch panel”.
  • the touch sensor 180C can be disposed on the display screen 194.
  • the touch sensor 180C and the display screen 194 form a touch screen, which is also called a "touch screen”.
  • the touch sensor 180C is used to detect a touch operation on or near the touch sensor 180C.
  • the touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
  • Visual output related to the touch operation may be provided through display screen 194 .
  • the touch sensor 180C may also be disposed on the surface of the electronic device 100 at a location different from that of the display screen 194 .
  • the buttons 190 include a power button, a volume button, etc.
  • Key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback.
  • touch operations for different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects.
  • the touch vibration feedback effect can also be customized.
  • the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • FIG. 3 do not constitute a specific limitation on the electronic device 100.
  • the electronic device may also include more or less components than shown in the figure, or some components may be combined or decomposed. , or a different component arrangement.
  • the combination/connection relationship between the components in Figure 3 can also be adjusted and modified.
  • Figure 4 is a software structure block diagram of an electronic device provided by an embodiment of the present application.
  • the software structure of the electronic device can be a layered architecture.
  • the software can be divided into several layers, and each layer has a clear role and division of labor.
  • the layers communicate through software interfaces.
  • the operating system is divided into four layers, from top to bottom: Application layer, application framework layer (framework, FWK), runtime and system libraries, and kernel layer.
  • the application layer can include a series of application packages. As shown in Figure 4, the application layer can include cameras, settings, skin modules, user interface (UI), third-party applications, etc. Among them, third-party applications can include gallery, calendar, calls, maps, navigation, WLAN, Bluetooth, music, video, short messages, etc.
  • the application layer may include a target installation package of a target application that the electronic device requests to download from the server, and the function files and layout files in the target installation package are adapted to the electronic device.
  • the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.
  • the application framework layer can include some predefined functions. As shown in Figure 4, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, and notification manager.
  • a window manager is used to manage window programs.
  • the window manager can obtain the display size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • Content providers are used to store and retrieve data and make this data accessible to applications. Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
  • a view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • Telephone managers are used to provide communication functions of electronic devices. For example, call status management (including connected, hung up, etc.).
  • the resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
  • the runtime includes core libraries and virtual machines.
  • the runtime is responsible for the scheduling and management of the operating system.
  • the core library contains two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core library of the operating system.
  • the application layer and application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and application framework layer into binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
  • System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (media libraries), three-dimensional graphics processing libraries (for example: OpenGL ES), two-dimensional graphics engines (for example: SGL), image processing libraries, etc.
  • surface manager surface manager
  • media libraries media libraries
  • three-dimensional graphics processing libraries for example: OpenGL ES
  • two-dimensional graphics engines for example: SGL
  • image processing libraries etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
  • 2D Graphics Engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the hardware layer can include various types of sensors, such as acceleration sensors, gyroscope sensors, touch sensors, etc.
  • the structure shown in Figure 3 and Figure 4 is only an example of the electronic device provided by the embodiment of the present application, and cannot limit the electronic device provided by the embodiment of the present application.
  • the electronic device can There may be more or fewer devices or modules than in the structure shown in Figure 3 or Figure 4.
  • the CCO in the embodiment of this application is a device in the PLC used for network management, and the site is an electronic device in the PLC other than the CCO.
  • the roles of sites in the PLC network can be divided into agent sites and discovery sites.
  • An agent site is a site with other electronic equipment attached to it.
  • An agent site can also be called a PCO;
  • a discovery site is a site that does not have any electronic equipment attached to it.
  • PCO1-PCO3 are proxy sites
  • STA1-STA9 are discovery sites.
  • PCO may refer to the proxy site
  • STA may refer to the discovery site.
  • the CCO can determine the architecture of the PLC network. For example, the CCO can determine the level of each site in the PLC network, the number of STAs attached to each PCO, and other information.
  • CCO can obtain the device information and link information of the target site.
  • the target site can be any agent site or any discovery site in the PLC network.
  • the target site's device information is used to indicate the number of times the target site has been offline.
  • the device information of the target site may include the number of times the target site has been offline within a preset time period, where the preset time period may be, for example, a routing cycle.
  • the link information of the target site is used to indicate the communication quality and/or site association status of the link where the target site is located in the PLC network.
  • the link information of the target site may include the communication quality of the link where the target site is located, the number of sites linked to the proxy site associated with the target site, the number of levels linked to the proxy site associated with the target site, and other information. at least one of.
  • the link where the target site is located is the PLC line from the target site to the CCO.
  • the link where STA5 is located includes the line between STA5 and PCO1 and the line between PCO1 and CCO; the link where STA9 is located includes the line between STA9 and PCO3, the line between PCO3 and PCO1, and Line between PCO1 and CCO.
  • the level of the site can be the number of hops in the communication distance between the site and the CCO.
  • the level of STA5 in the PLC network is 2
  • the level of STA9 in the PLC network is 3.
  • the CCO may determine the heartbeat cycle of the target site based on the device information and/or link information of the target site.
  • the relationship between the heartbeat cycle of the target site and device information and link information can be as follows:
  • the heartbeat cycle of the target site is negatively correlated with the number of times the target site is offline within the preset time period.
  • the more times the target site is offline within the preset time period which means the more frequently the network status of the target site changes, the shorter the heartbeat cycle determined by CCO for the target site to send heartbeat messages, thereby improving the detection target of CCO.
  • the frequency of the site's online presence is improved.
  • the heartbeat cycle of the target site is positively related to the communication quality of the link where the target site is located.
  • the communication quality of the link where the target site is located can be represented by at least one piece of data such as communication success rate, signal-to-noise ratio, and the number of times the link quality is poor in the preset time period.
  • the communication quality of the link where the target site is located can be represented by at least one piece of data such as communication success rate, signal-to-noise ratio, and the number of times the link quality is poor in the preset time period.
  • the CCO can determine that the communication quality of the link where the target site is located is poor; when the signal-to-noise ratio of the link where the target site is located is less than or equal to the second threshold, the CCO can determine that the target site The communication quality of the link where the target site is located is poor; when the number of times that the link where the target site is located detects poor communication quality within the preset time period is greater than or equal to the third threshold, the CCO can determine that the communication quality of the link where the target site is located is poor, where , the preset duration may be, for example, one or more routing cycles.
  • the communication quality of the link where the target site is located it means that the communication of the target site is unstable.
  • CCO can determine that the heartbeat cycle of the target site is short to quickly detect the online status of the target site.
  • the heartbeat cycle of the target site is positively related to the number of sites or levels linked to the proxy site associated with the target site.
  • heartbeat detection messages from high-level sites in the PLC network need to be aggregated to the site at the upper level.
  • the greater the number of sites or levels linked to the proxy site associated with the target site the greater the number of sites or levels that the proxy site is associated with within the unit time.
  • the greater the number of received heartbeat detection packets or heartbeat packets the longer the heartbeat period of the target site can be set to prevent the target site's heartbeat packets from conflicting with packets from other sites.
  • FIG. 5 is a schematic diagram of a PLC network provided by an embodiment of the present application.
  • CCO can dynamically adjust the heartbeat cycle of each STA during the communication process. For example, if PCO1 and PCO2 have the same number of sites, CCO can determine that the heartbeat cycles of STA3-STA8 are the same. For example, it can be determined that the heartbeat cycles of STA3-STA8 are 30 seconds. If STA6 under PCO2 goes offline many times within the preset time period, CCO can reduce the heartbeat period of STA6, for example, determine the heartbeat period of STA6 to 10 seconds.
  • the proxy site associated with STA4, STA5, PCO2, and PCO3 is PCO1
  • the proxy site associated with STA6 and STA7 is PCO2
  • the proxy site associated with STA8 and STA9 is PCO3.
  • the number of sites and levels connected to PCO2 and PCO3 are the same, so CCO can determine that the heartbeat cycles of STA4, STA5, PCO2, and PCO3 are greater than STA6-
  • the heartbeat cycle of STA9, STA6-STA9 can have the same heartbeat cycle. If the CCO determines that the communication quality of the link where STA6 is located is poor, the CCO can reduce the heartbeat cycle of STA6 to quickly detect the network status of STA6.
  • the CCO may indicate the heartbeat cycle of the target site to the target site.
  • the CCO can indicate the heartbeat period of the target site to the target site through the routing parameter notification entry.
  • Table 1 shows a routing parameter notification entry provided by an embodiment of the present application.
  • the heartbeat cycle field is a new field added to the routing parameter notification entry by an embodiment of the present application. This field may include a device identifier and a heartbeat cycle time parameter. , after each site receives the routing parameter notification entry, it can search for the corresponding heartbeat cycle based on the device identification.
  • the CCO can also indicate the heartbeat cycle of the target site to the target site through management packets.
  • the management message can be an existing message of the CCO in the PLC, and the message is multiplexed to indicate the heartbeat cycle of the target site.
  • the management message can be a new management message, used to notify each site of the heartbeat cycle.
  • the management message may include the device identification of each site and the heartbeat cycle corresponding to each site.
  • the CCO broadcasts the management message.
  • the site receives the management message, it can obtain the information based on its own device identification.
  • the heartbeat cycle of the site in the management message is used to notify multiple sites of the heartbeat cycle through one management message, reducing the cost of the CCO notifying each site of the heartbeat cycle and saving PLC channel resources.
  • the target site may send a heartbeat message based on the heartbeat cycle of the target site to indicate that the network status of the target site is online.
  • the network status detection method provided by the embodiment of the present application is a method of dynamically adjusting the heartbeat cycle of each site during the power line communication process.
  • the CCO can obtain the equipment information and/or of each site in real time during the communication process. Link information, and then determine the heartbeat cycle corresponding to each site based on the device information and/or link information of each site, and indicate the heartbeat cycle of each site to each site respectively.
  • different sites in the PLC network can have different heartbeat cycles, and the heartbeat cycle of each site is related to the device information and link information of the site, so that the CCO can timely Detect the network status of each site to improve the success rate of device control.
  • this application also provides a method for detecting network status, which can be executed by the central coordinator and at least one site in the PLC system.
  • this method can be applied to the smart home scenario shown in Figure 1 PLC system.
  • Figure 6 is a flow chart of a network presence detection method provided by an embodiment of the present application. Referring to Figure 6, the method includes the following steps:
  • the central coordinator obtains device information and/or link information of at least one site.
  • the device information is used to indicate the number of offline times of the site
  • the link information is used to indicate the communication quality and/or site association status of the link where the site is located.
  • the central coordinator determines the heartbeat cycle of the target site based on the device information and/or link information of the target site.
  • the target site is any site among at least one site included in the PLC system.
  • the central coordinator indicates the heartbeat cycle of the target site to the target site, and the target site obtains the heartbeat cycle of the target site indicated by the central coordinator.
  • the target site sends a heartbeat message based on the heartbeat cycle of the target site.
  • the heartbeat message sent by the target site is used to indicate that the network status of the target site is online.
  • this application also provides a central coordinator, which includes multiple functional modules; the multiple functional modules interact to realize the functions performed by the central coordinator in the methods described in the embodiments of this application.
  • S601-S603 executed by the central coordinator in the embodiment shown in Figure 6 are performed.
  • the multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementation.
  • this application also provides a central coordinator.
  • the central coordinator includes at least one processor and at least one memory. Computer program instructions are stored in the at least one memory.
  • the At least one processor performs the functions performed by the central coordinator in each method described in the embodiments of this application. S601-S603 executed by the central coordinator in the embodiment shown in Figure 6 are performed.
  • this application also provides an electronic device, which includes multiple functional modules;
  • the multiple functional modules interact with each other to realize the functions performed by the site in each method described in the embodiments of this application.
  • S603-S604 executed by the target site in the embodiment shown in Figure 6 are executed.
  • the multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementation.
  • this application also provides an electronic device.
  • the electronic device includes at least one processor and at least one memory.
  • Computer program instructions are stored in the at least one memory.
  • the at least one processing The server performs the functions performed by the site in each method described in the embodiments of this application. S603-S604 executed by the target site in the embodiment shown in Figure 6 are executed.
  • this application also provides a computer program product containing instructions.
  • the computer program product When the computer program product is run on a computer, it causes the computer to execute the methods described in the embodiments of this application.
  • the present application also provides a computer-readable storage medium.
  • a computer program is stored in the computer-readable storage medium.
  • the computer program is executed by a computer, the computer is caused to execute the embodiments of the present application. Each method is described.
  • this application also provides a chip, which is used to read the computer program stored in the memory and implement the methods described in the embodiments of this application.
  • this application provides a chip system.
  • the chip system includes a processor and is used to support a computer device to implement the methods described in the embodiments of this application.
  • the chip system further includes a memory, and the memory is used to store necessary programs and data of the computer device.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
  • the device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
  • Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Power Engineering (AREA)
  • Small-Scale Networks (AREA)

Abstract

本申请提供一种电力线通信系统、在网状态检测方法及设备。在该电力线通信系统中,中央协调器获取至少一个站点的设备信息和/或链路信息,设备信息用于指示站点的离线次数,链路信息用于指示站点所处链路的通信质量和/或站点关联情况;中央协调器根据目标站点的设备信息和/或链路信息确定目标站点的心跳周期,并向目标站点指示目标站点的心跳周期。目标站点获取中央协调器指示的目标站点的心跳周期,并基于目标站点的心跳周期发送心跳报文。基于该电力线通信系统,中央协调器可以根据站点的设备信息和/或链路信息确定该站点的心跳周期,从而可以灵活设置不同站点的心跳周期,以及时检测各个站点的在网状态,保证电力线通信网络的设备可控性。

Description

一种电力线通信系统、在网状态检测方法及设备
相关申请的交叉引用
本申请要求在2022年03月14日提交中华人民共和国知识产权局、申请号为202210245488.9、发明名称为“一种电力线通信系统、在网状态检测方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种电力线通信系统、在网状态检测方法及设备。
背景技术
电力线通信(power line communication,PLC)是指利用电力线作为通信媒介,通过载波方式传输信号的一种通信技术。PLC中进行通信的电子设备角色可以包括中央协调器(central coordinator,CCO)、代理协调器(proxy coordinator,PCO)和站点(station,STA)。其中,CCO为PLC网关,负责进行网络管理,例如管理PLC中PCO和STA的在网状态。PLC可以基于CCO进行逐级组网,逐级组网过程可以如下:一级站点尝试接入PLC网络,CCO对一级站点进行白名单认证,CCO对一级站点认证通过后,将关联结果通过关联确认帧回复给该一级站点,该一级站点成功接入PLC网络。其中,一级站点为距离CCO一跳通信距离的站点,类似的,距离CCO两跳通信距离的站点称为二级站点。一级站点在接入PLC网络后,可以发送信标帧以宣告PLC网络的存在,一级站点附近未接入PLC网络的二级站点侦听到一级站点的信标帧后,可以通过一级站点接入PLC网络,此时该一级站点的角色为PCO。通过逐级宣告可以辅助距离CCO较远的STA接入PLC网络。在PLC网络中,CCO可以下挂PCO或STA,PCO可以下挂其它PCO或STA。
当完成组网后,STA需要向CCO定期发送心跳报文,以维持STA在线的状态和路由的可达性。目前PLC网络中的所有STA都以固定周期向CCO发送心跳报文,若STA所在的链路通信质量较低或STA与CCO通信距离较远,都有可能造成CCO无法及时检测STA的在网状态,进而无法保证设备的可控性,影响PLC网络中各个设备之间的正常通信。
发明内容
本申请提供一种电力线通信系统、在网状态检测方法及设备,用以及时检测PLC网络中各个站点的在网状态。
第一方面,本申请提供一种电力线通信系统,该电力线通信系统包括中央协调器和至少一个站点,目标站点为至少一个站点中的任一站点。
所述中央协调器,用于获取所述至少一个站点的设备信息和/或链路信息,所述设备信息用于指示站点的离线次数,所述链路信息用于指示站点所处链路的通信质量和/或站点关联情况;根据目标站点的设备信息和/或链路信息确定所述目标站点的心跳周期,并向所述目标站点指示所述目标站点的心跳周期;
所述目标站点,用于获取所述中央协调器指示的所述目标站点的心跳周期,并基于所 述目标站点的心跳周期发送心跳报文,所述心跳报文用于指示所述目标站点的在网状态为在线。
基于上述电力线通信系统,PLC网络中的CCO可以根据站点的设备信息和/或链路信息确定该站点的心跳周期,从而可以灵活设置不同站点的心跳周期。通过该方案,CCO可以及时检测各个站点的在网状态,保证PLC网络的设备可控性。
在一个可能的设计中,所述目标站点的设备信息包括所述目标站点在预设时长内离线的次数;所述目标站点的链路信息包括所述目标站点所处链路的通信质量、所述目标站点关联的代理站点下挂的站点数量、所述目标站点关联的代理站点下挂的层级数量中的至少一项。
通过该设计,CCO确定出的目标站点的心跳周期与目标站点的离线情况、目标站点所处的链路情况相关,以使目标站点的心跳周期更适合目标站点发送心跳报文。
在一个可能的设计中,所述目标站点的心跳周期满足以下至少一种条件:所述目标站点的心跳周期与所述目标站点在预设时长内离线的次数负相关;所述目标站点的心跳周期与所述目标站点所处链路的通信质量正相关;所述目标站点的心跳周期与所述目标站点关联的代理站点下挂的站点数量正相关;所述目标站点的心跳周期与所述目标站点关联的代理站点下挂的层级数量正相关。
通过该设计,本申请中CCO在确定目标站点的心跳周期时,目标站点在预设时长内离线的次数越多,则目标站点的心跳周期越短,从而CCO可以实现对目标站点的快速检测,及时感知目标站点的在网状态的变化。或者目标站点所处的通信质量越差,目标站点的心跳周期越短,从而防止由于目标站点所处链路通信质量差而导致的CCO无法及时感知目标站点的在网状态。又或者目标站点关联的代理站点下挂的站点数量较多或下挂层级数量较多时,目标站点的周期可以较长,以防止多个站点同时频繁发送心跳报文导致冲突。
在一个可能的设计中,所述中央协调器具体用于:向所述目标站点发送路由参数通知条目,所述路由参数通知条目中包括所述目标站点的设备标识和所述目标站点的心跳周期;或者向所述目标站点发送管理报文,所述管理报文中包括所述目标站点的设备标识和所述目标站点的心跳周期。
通过该设计,CCO可以通过路由参数通知条目或新增的管理报文向目标站点指示目标站点的心跳周期,灵活实现心跳周期的指示。
在一个可能的设计中,所述目标站点至少为二级站点;所述目标站点具体用于:基于所述目标站点的心跳周期向所述目标站点关联的代理站点发送心跳报文;
所述中央协调器还用于:接收所述目标站点所处链路中的一级站点发送的心跳检测报文,所述心跳检测报文中包括所述目标站点的活跃信息;根据所述心跳检测报文确定所述目标站点的在网状态为在线。
通过该设计,当目标站点至少为二级站点时,CCO可以接收目标站点关联的代理站点发送的心跳检测报文,以感知目标站点的在网状态,通过将多个站点的站点活跃信息汇聚在一条心跳检测报文中,可以减少网络维护报文的开销。其中,目标站点至少为二级站点,可以理解为,目标站点为二级站点或二级以上站点(例如三级站点、四级站点)。
在一个可能的设计中,所述目标站点为一级站点;所述目标站点具体用于:基于所述目标站点的心跳周期向所述中央协调器发送心跳报文;
所述中央协调器还用于:接收所述目标站点发送的心跳报文,确定所述目标站点的在 网状态为在线。
通过该设计,当目标站点为一级站点,也就是说目标站点直接下挂在CCO下时,目标站点可以直接向CCO发送心跳报文以指示目标站点的在网状态为在线。
在一个可能的设计中,若中央协调器在预设的心跳检测周期中未接收到所述目标站点的心跳报文或包含所述目标站点的活跃信息的心跳检测报文,则确定所述目标站点的在网状态为离线;若中央协调器在连续N个心跳检测周期中确定所述目标站点的在网状态为离线,则确定所述目标站点的在网状态为未入网。
第二方面,本申请提供一种在网状态检测方法,应用于中央协调器,所述方法包括:获取所述中央协调器所属的电力线通信系统中的至少一个站点的设备信息和/或链路信息,所述设备信息用于指示站点的离线次数,所述链路信息用于指示站点所处链路的通信质量和/或站点关联情况;根据目标站点的设备信息和/或链路信息确定所述目标站点的心跳周期,所述目标站点为所述至少一个站点中的任一站点;向所述目标站点指示所述目标站点的心跳周期,以使所述目标站点基于所述目标站点的心跳周期发送心跳报文,所述心跳报文用于指示所述目标站点的在网状态为在线。
在一个可能的设计中,所述目标站点的设备信息包括所述目标站点在预设时长内离线的次数;所述目标站点的链路信息包括所述目标站点所处链路的通信质量、所述目标站点关联的代理站点下挂的站点数量、所述目标站点关联的代理站点下挂的层级数量中的至少一项。
在一个可能的设计中,所述目标站点的心跳周期满足以下至少一种条件:所述目标站点的心跳周期与所述目标站点在预设时长内离线的次数负相关;所述目标站点的心跳周期与所述目标站点所处链路的通信质量正相关;所述目标站点的心跳周期与所述目标站点关联的代理站点下挂的站点数量正相关;所述目标站点的心跳周期与所述目标站点关联的代理站点下挂的层级数量正相关。
在一个可能的设计中,所述向所述目标站点指示所述目标站点的心跳周期,包括:向所述目标站点发送路由参数通知条目,所述路由参数通知条目中包括所述目标站点的设备标识和所述目标站点的心跳周期;或者向所述目标站点发送管理报文,所述管理报文中包括所述目标站点的设备标识和所述目标站点的心跳周期。
在一个可能的设计中,在所述向所述目标站点指示所述目标站点的心跳周期之后,所述方法还包括:接收所述目标站点所处链路中的一级站点发送的心跳检测报文,所述心跳检测报文中包括所述目标站点的活跃信息;根据所述心跳检测报文确定所述目标站点的在网状态为在线;或者接收所述目标站点发送的心跳报文,确定所述目标站点的在网状态为在线;其中,所述目标站点与所述中央协调器关联。
第三方面,本申请提供一种在网状态检测方法,应用于电力线通信系统中的站点,所述方法包括:获取中央协调器指示的所述站点的心跳周期,所述站点的心跳周期为所述中央协调器根据所述站点的设备信息和/或链路信息确定的,所述设备信息用于指示所述站点的离线次数,所述链路信息用于指示所述站点所处链路的通信质量和/或站点关联情况;基于所述站点的心跳周期发送心跳报文,所述心跳报文用于指示所述站点的在网状态为在线。
在一个可能的设计中,所述站点的设备信息包括所述站点在预设时长内离线的次数;所述站点的链路信息包括所述站点所处链路的通信质量、所述站点关联的代理站点下挂的站点数量、所述站点关联的代理站点下挂的层级数量中的至少一项。
在一个可能的设计中,所述站点的心跳周期满足以下至少一种条件:所述站点的心跳周期与所述站点在预设时长内离线的次数负相关;所述站点的心跳周期与所述站点所处链路的通信质量正相关;所述站点的心跳周期与所述站点关联的代理站点下挂的站点数量正相关;所述站点的心跳周期与所述站点关联的代理站点下挂的层级数量正相关。
在一个可能的设计中,所述获取中央协调器指示的所述站点的心跳周期,包括:接收所述中央协调器发送的路由参数通知条目,所述路由参数通知条目中包括所述站点的设备标识和所述站点的心跳周期;或者接收所述中央协调器发送的管理报文,所述管理报文中包括所述站点的设备标识和所述站点的心跳周期。
在一个可能的设计中,所述基于所述站点的心跳周期发送心跳报文,包括:当所述站点至少为二级站点时,基于所述站点的心跳周期向所述站点关联的代理站点发送心跳报文;或者当所述站点为一级站点时,基于所述站点的心跳周期向所述中央协调器发送心跳报文。
第四方面,本申请提供一种电子设备,所述电子设备包括多个功能模块;所述多个功能模块相互作用,实现上述任一方面及其各实施方式中目标站点或站点所执行的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
第五方面,本申请提供一种电子设备,包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述电子设备运行时,所述至少一个处理器执行上述任一方面及其各实施方式中目标站点或站点执行的方法。
第六方面,本申请提供一种中央协调器,所述中央协调器包括多个功能模块;所述多个功能模块相互作用,实现上述任一方面及其各实施方式中的中央协调器所执行的方法。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
第七方面,本申请提供一种中央协调器,包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述中央协调器运行时,所述至少一个处理器执行上述任一方面及其各实施方式中的中央协调器执行的方法。
第八方面,本申请还提供一种包含指令的计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述任一方面及其各实施方式中的中央协调器或站点(目标站点)执行的方法。
第九方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行上述任一方面及其各实施方式中的中央协调器或站点(目标站点)执行的方法。
第十方面,本申请还提供一种芯片,所述芯片用于读取存储器中存储的计算机程序,执行上述任一方面及其各实施方式中的中央协调器或站点(目标站点)执行的方法。
第十一方面,本申请还提供一种芯片系统,该芯片系统包括处理器,用于支持计算机装置实现上述任一方面及其各实施方式中的中央协调器或站点(目标站点)执行的方法。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。
附图说明
图1为本申请实施例提供的一种智能家居场景中PLC线路示意图;
图2为本申请实施例提供的一种PLC网络的示意图;
图3为本申请实施例提供的一种电子设备的结构示意图;
图4为本申请实施例提供的一种电子设备的软件结构框图;
图5为本申请实施例提供的一种PLC网络的示意图;
图6为本申请实施例提供的一种在网状态检测方法的流程图。
具体实施方式
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例作进一步地详细描述。其中,在本申请实施例的描述中,以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。
应理解,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一(项)个”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、b和c,其中a、b、c可以是单个,也可以是多个。
电力线通信(power line communication,PLC)是指利用电力线作为通信媒介,通过载波方式传输信号的一种通信技术。PLC相比其它通信技术的一个主要优势为PLC可以利用现有的电力线作为传输媒介,不需要架设新线路,从而极大地降低前期部署成本,并且也不需要单独维护线路,进一步降低后期的维护成本。由于电力线部署的普及度很高,因此电力线通信的应用也很广泛,如PLC可以应用在智能家居、远程抄表、城市照明、智慧小区、停车场管理系统、安全防盗及消防报警系统等场景。
例如,图1为本申请实施例提供的一种智能家居场景中PLC线路示意图。参考图1,在智能家居场景中,网关、配电箱、发光二极管(light-emitting diode,LED)驱动、窗帘电机、温控、开关/插座之间可以通过电力线进行通信。其中,网关可以通过电力线对整个PLC网络进行网络管理,如通过电力线向接入PLC网络的电子设备发送控制报文、接收电子设备发送的心跳报文等。其中,网关可以为无线有线混合网关,则混合网关可以通过无线通信与云端服务器进行信息交互,该云端服务器可以为终端设备或智能家居设备生产厂商提供的服务器,还可以为第三方应用平台提供的服务器,本申请实施例对此不做限定。
参考图1,用户使用的电子设备也可以与云端服务器进行通信,用户可以通过电子设备触发控制指令,电子设备将控制指令发送给云端服务器,云端服务器将控制指令发送给混合网关,混合网关根据该控制指令通过PLC网络对各个智能家居设备进行控制。例如,用户可以通过智能手机上安装的应用对智能家居设备进行控制,或者用户可以通过音箱对智能家居设备进行语音控制。
在国网低压电力线宽带载波通信互联互通技术规范的基础上,电气和电子工程师协会(institute of electrical and electronics engineers,IEEE)1901.1标准正式发布实施。该标准将PLC协议栈分成了如下几个层次:应用层、传输层、网络层、数据链路层以及物理层。 其中,数据链路层包括网络管理子层和媒介接入控制(medium access control,MAC)子层。网络管理子层负责应用层报文的聚合分片、网络管理以及路由的更新维护,MAC子层负责抢占物理信道提供可靠通信。物理层负责对来自MAC子层数据进行编码调制后发送至电力线,以及对从电力线接收到的信号进行解调解码后回传给MAC子层。
下面对PLC网络进行进一步介绍,图2为本申请实施例提供的一种PLC网络的示意图。参考图2,PLC网络中进行通信的电子设备角色包括中央协调器(central coordinator,CCO)、代理协调器(proxy coordinator,PCO)和站点(station,STA)。CCO为PLC网关,负责进行网络管理,如管理PLC网络中PCO和STA的在网状态。例如,图1所示的智能家居场景中的混合网关可以为CCO。PCO可以辅助与CCO通信距离较远的STA接入PLC网络,还可以管理PCO下挂的STA的在网状态,并将PCO下挂的STA的在网状态上报给CCO。
由于各个电子设备的物理距离可能较远,CCO可能无法发现与CCO距离较远的电子设备,需要PCO辅助与CCO通信距离较远的STA接入PLC网络,通过逐级组网的方式组建PLC网络。下面结合图2所示的PLC网络结构,对PLC网络逐级组网的过程进行介绍。
在图2所示的PLC网络中,距离CCO一跳通信距离的站点称为一级站点,例如,STA1、STA2、PCO1以及STA3为一级站点;距离CCO两条通信距离的站点称为二级站点,例如,STA4、STA5、PCO2以及PCO3为二级站点;以此类推,STA6、STA7、STA8以及STA9为三级站点。其中,电子设备为几级站点(例如一级站点或二级站点)与线路中的物理距离有关。
当一级站点尝试接入PLC网络时,CCO对一级站点进行白名单认证,CCO对一级站点认证通过后,将关联结果通过关联确认帧回复给该一级站点,该一级站点成功接入PLC网络。一级站点在接入PLC网络后,可以发送信标(beacon)帧以宣告PLC网络的存在,一级站点附近未关联的二级站点侦听到一级站点的信标帧后,可以通过一级站点接入PLC网络,此时该一级站点的角色为PCO。如图2中,STA4、STA5、PCO2以及PCO3可以通过PCO1接入PLC网络。类似地,STA4、STA5、PCO2以及PCO3也可以发送信标帧以宣告PLC网络的存在,STA6、STA7可以通过PCO2接入PLC网络,STA8和STA9可以通过PCO3接入PLC网络。STA通过PCO接入PLC网络后,PCO与其下挂的STA关联,如图2中,STA4、STA5、PCO2以及PCO3与PCO1关联,STA6、STA7与PCO2关联,STA8、STA9与PCO3关联。也就是说,PCO可以辅助其它站点接入PLC网络,也可以作为报文中转站为PCO下挂的STA和CCO传递报文,因此PCO可以看作为PLC网络中一种特殊的站点,PCO又可以称为代理站点,未下挂任何STA的站点可以称为发现站点。
可选地,CCO也可以指定某些STA成为PCO,以辅助距离CCO通信距离较远的STA接入PLC网络。例如,CCO可以根据链路质量、直连的跳数指定PCO,如在图1所示的智能家居场景中,CCO(图1中的网关)可以指示与CCO距离较近的开关为PCO,则开关可以通过电力线发送信标帧以宣告PLC网络的存在,进而辅助开关附近的电子设备接入PLC网络。在逐级组网过程中,PCO发送的信标帧需要携带中央信标帧的时隙调度安排,STA尝试接入网络时,可以对STA附近的PCO进行评估,选择信道质量较好,距离CCO路径较短的PCO发送关联请求,例如,STA可以向PCO发送关联请求帧。STA可以根据接收到的信标帧中的开始关联位以及时隙调度安排,确定是否可以通过发送该信标帧的 PCO发送关联请求,以及发送关联请求的时机。当然,若STA为一级站点,则STA可以直接向CCO发送关联请求。STA发送关联请求后,等待PCO或CCO返回的关联确认报文(或称:关联确认帧),根据关联确认报文中的结果字段判断该STA是否已成功入网。
当完成组网后,CCO需要及时感知PLC网络中各个STA和PCO的在网状态,以便进行网络管理。其中,每个STA的在网状态可以为在线、离线或未入网。STA在线是指STA活跃,可以随时接收其他STA的报文,并且可以定周期地向该STA关联的PCO或CCO发送心跳报文。STA离线是指该STA无法正常接收其他电子设备的报文,但CCO不会回收该STA占用的通信资源,当CCO接收到该STA的任何一个帧首包(start of frame,SOF)、或接收到其它STA传递上来的该STA的心跳报文时,CCO可以更新该STA的在网状态为在线。STA未入网是指该STA未接入PLC网络,当CCO确定STA未入网时,会将该STA占用的通信资源进行回收,此时STA需要重新发送关联请求才能再次请求接入PLC网络。
PLC网络中的STA需要定周期向该STA关联的PCO或CCO发送心跳报文,心跳报文可以用于PCO或CCO确定该STA在线。PCO可以通过定周期的心跳检测报文,将该PCO维护的发现列表中的站点活跃信息上报给CCO,从而CCO可以汇总全网的STA的在网状态。其中,PCO维护的发现列表中的站点可以为PCO下挂的STA。也就是说,PLC网络中的PCO可以通过向CCO发送心跳检测报文上报该PCO可以感知到的活跃站点的信息,直接下挂在CCO的STA可以直接向CCO发送心跳报文,从而CCO可以定周期地感知全网的STA的在网状态。其中,活跃站点为在网状态为在线的STA。
在心跳检测报文的发送过程中,低层级PCO的心跳检测报文可以通过高层级PCO的心跳检测报文触发。低层级PCO的心跳检测报文中可以汇总高层级PCO的心跳检测报文的内容,从而将PCO所能感知的活跃站点的信息汇总在一个心跳检测报文中,节省网络维护报文的开销。例如,在图2所示的PLC网络中,低层级的PCO1可以接收高层级的PCO2和PCO3发送的心跳检测报文,从而触发PCO1生成自己的心跳检测报文。具体的,PCO2的心跳检测报文中可以包括STA6和/或STA7的活跃信息,PCO3的心跳检测报文中可以包括STA8和/或STA9的活跃信息,PCO1在接收到PCO2的心跳检测报文和PCO3的心跳检测报文后,可以生成PCO1的心跳检测报文,PCO1的心跳检测报文中可以包括PCO2的心跳检测报文和PCO3的心跳检测报文中的内容,还可以包括STA4和/或STA5的活跃信息。PCO1将心跳检测报文发送给CCO,从而CCO可以在一条心跳检测报文中感知STA4-STA9的在网状态。
一种可选的实施方式中,心跳检测报文的产生周期一般为路由周期的1/8,其中,路由周期可以由CCO根据网络状态进行动态调整。
下面对判断STA的在网状态的方法进行介绍:
1、CCO判断STA的在网状态为在线。
若CCO接收到STA的心跳报文,或者CCO接收到的PCO发送的心跳检测报文中指示STA活跃,则CCO可以确定该STA的在网状态为在线。
2、CCO判断STA的在网状态为离线。
若CCO在一个完整的心跳检测周期内,检测到STA的活跃次数为0次,则CCO确定该STA离线。其中,一个完整的心跳检测周期可以设置为两个路由周期。
需要说明的是,当STA的在网状态为离线时,若CCO检测到STA为活跃站点,如CCO接收到STA发送的心跳报文,或CCO通过PCO上报的心跳检测报文检测到STA为 活跃站点,CCO可以重新确定STA的在网状态为在线。
另外,CCO可以维护白名单,成功接入PLC网络的站点的信息均包含在白名单内。若CCO检测到PLC网络中存在不包含在白名单内的站点,CCO可以向该站点发送离线指示报文。站点在接收到离线指示报文后,在预设的延迟离线时间到期后,执行离线动作。若该站点在执行离线动作后需要重新接入PLC网络,可以重新申请接入PLC网络。
其中,若CCO需要向多个STA发送离线指示报文,CCO可以将需要执行离线动作的STA的信息填充到离线指示报文中,并通过广播方式发送离线指示报文,从而可以通过一条报文指示多个STA执行离线动作,减少开销。
3、CCO判断STA未入网。
对于已确定在网状态为离线的STA,若CCO在连续四个完整的心跳检测周期内,检测该STA的活跃次数为0次,则CCO确定该STA的在网状态为未入网。
在一些实施例中,若CCO接收到已确定在网状态为未入网的STA发送的报文,CCO需要向该STA发送离线指示报文,STA接收到离线指示报文后,执行离线动作。若该站点在执行离线动作后需要重新接入PLC网络,可以重新申请接入PLC网络。
4、STA判断自身的在网状态为离线。
一些实施方式中,STA也可以判断自身的在网状态是否为离线。当STA判断自身的在网状态为离线后,需要重新申请加入网络。示例性的,在以下任一情形中,STA可以确定自身的在网状态为离线:
(1)STA在接入PLC网络后,在一个完整的心跳检测周期内,未接收到任何信标帧;
(2)STA在连续四个路由周期内,与该STA关联的PCO的通信成功率为0;
(3)STA接收到的CCO发送的组网序列号与自身记录的组网序列号不同;
(4)STA接收到离线指示报文,指示该STA的在网状态为离线;
(5)一级站点STA检测到CCO的MAC地址已变化,且新MAC地址生效时间超过一个心跳周期;
(6)STA检测到与STA关联的PCO的站点角色变换为发现站点,且该PCO变为发现站点的时间超过一个路由周期;
(7)STA的层级大于PLC网络的最大层级阈值,如最大层级阈值可以为15。
通过上述介绍可知,目前在检测STA的在网状态时,PLC网络中的STA均是基于相同的周期发送心跳报文,CCO基于预设的心跳检测周期对PLC网络中的STA的在网状态进行检测,而STA发送心跳报文的心跳周期、PCO心跳检测报文的产生周期以及STA判断自身的在网状态为离线的周期,都只与路由周期有关,当STA所处的层级较高或STA所处的链路通信质量较差时,CCO可能不能及时检测STA的在网状态,进而无法保证设备的可控性,影响PLC网络中设备的控制率,同时影响PLC网络中各个设备之间的正常通信。
基于以上问题,本申请提供一种在网状态检测方法,该方法用于检测PLC网络中各个STA的在网状态,以使CCO可以及时感知STA的在网状态,保证PLC网络的设备可控性。在本申请提供的在网状态检测方法中,CCO根据目标站点的设备信息和/或链路信息确定目标站点的心跳周期,目标站点的设备信息用于指示目标站点的离线次数和/或业务需求;目标站点的链路信息用于指示目标站点在PLC网络中所处链路的通信质量和/或站点关联情况。CCO向目标站点指示目标站点的心跳周期,目标站点基于目标站点的心跳周期发送 心跳报文,心跳报文用于指示目标站点的在网状态为在线。通过该方法,PLC网络中的CCO可以根据站点的设备信息和/或链路信息确定该站点的心跳周期,从而可以灵活设置不同站点的心跳周期,CCO可以及时检测各个站点的在网状态,保证PLC网络的设备可控性。
本申请实施例提供的在网状态检测方法可以应用于图2所示的PLC网络,进一步地,本申请实施例提供的在网状态检测方法适用于智能家居、远程抄表、城市照明、智慧小区、停车场管理系统、安全防盗及消防报警系统等场景,如该方法可以适用于图1所示的智能家居场景。
本申请实施例中站点可以为具有PLC模块的电子设备,例如可以为电灯、窗帘电机、空调、家用传感器、车库传感器等,本申请实施例对电子设备的具体类型不作任何限制。
图3为本申请实施例提供的一种电子设备100的结构示意图。如图3所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,电力线通信模块161,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的 解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电力线通信模块161可以提供应用在电子设备100上的电力线通信的解决方案。电力线通信模块161可以接收其它设备通过电力线发送的报文,对接收到的报文进行处理,并通过处理器110执行该报文对应的操作。电力线通信模块161还可以通过电力线向其它设备发送报文,以实现设备之间的电力线通信。在一些实施例中,电力线通信模块161的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
显示屏194用于显示应用的显示界面,例如显示电子设备100上安装的应用的显示页面等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体 (complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,以及至少一个应用程序的软件代码等。存储数据区可存储电子设备100使用过程中所产生的数据(例如拍摄的图像、录制的视频等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将图片,视频等文件保存在外部存储卡中。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
其中,传感器模块180可以包括压力传感器180A,加速度传感器180B,触摸传感器180C等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。
触摸传感器180C,也称“触控面板”。触摸传感器180C可以设置于显示屏194,由触摸传感器180C与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180C用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180C也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现与电子设备100的接触和分离。
可以理解的是,图3所示的部件并不构成对电子设备100的具体限定,电子设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。此外,图3中的部件之间的组合/连接关系也是可以调整修改的。
图4为本申请实施例提供的一种电子设备的软件结构框图。如图4所示,电子设备的软件结构可以是分层架构,例如可以将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将操作系统分为四层,从上至下分别为 应用程序层,应用程序框架层(framework,FWK),运行时(runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包(application package)。如图4所示,应用程序层可以包括相机、设置、皮肤模块、用户界面(user interface,UI)、三方应用程序等。其中,三方应用程序可以包括图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等。在本申请实施例中,应用程序层可以包括电子设备从服务器请求下载的目标应用的目标安装包,该目标安装包中的功能文件和布局文件适配于电子设备。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层可以包括一些预先定义的函数。如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
运行时包括核心库和虚拟机。运行时负责操作系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是操作系统的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),二维图形引擎(例如:SGL)、图像处理库等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
硬件层可以包括各类传感器,例如加速度传感器、陀螺仪传感器、触摸传感器等。
需要说明的是,图3和图4所示的结构仅作为本申请实施例提供的电子设备的一种示例,并不能对本申请实施例提供的电子设备进行任何限定,具体实施中,电子设备可以具有比图3或图4所示的结构中更多或更少的器件或模块。
下面对本申请实施例提供的在网状态检测方法进行介绍。
本申请实施例中的CCO为PLC中用于进行网络管理的设备,站点为PLC中除CCO以外的电子设备。其中,PLC网络中站点的角色又可以分为代理站点和发现站点,代理站点为下挂了其它电子设备的站点,代理站点又可以称为PCO;发现站点为未下挂任何电子设备的站点。例如,参考图2,PCO1-PCO3为代理站点,STA1-STA9为发现站点。为便于描述,下文中PCO可以指代理站点,STA可以指发现站点。
在本申请实施例中,在PLC网络的组网过程中,CCO可以确定PLC网络的架构,例如CCO可以确定PLC网络中各个站点所处的层级、每个PCO下挂的STA的数量等信息。
在PLC网络的组网过程完成后,CCO可以获取目标站点的设备信息和链路信息。其中,目标站点可以为PLC网络中的任一代理站点或任一发现站点。
目标站点的设备信息用于指示目标站点的离线次数。可选的,目标站点的设备信息可以包括目标站点在预设时长内离线的次数,其中,预设时长例如可以为一个路由周期。
目标站点的链路信息用于指示目标站点在PLC网络中所处链路的通信质量和/或站点关联情况。示例性的,目标站点的链路信息可以包括目标站点所处链路的通信质量、目标站点所关联的代理站点下挂的站点数量、目标站点所关联的代理站点下挂的层级数量等信息中的至少一项。其中,目标站点所处链路为从目标站点到CCO之间的PLC线路。例如,参考图2,STA5所处链路包括STA5与PCO1之间的线路和PCO1与CCO之间的线路;STA9所处链路包括STA9与PCO3之间的线路、PCO3和PCO1之间的线路以及PCO1和CCO之间的线路。需要说明的是,站点的层级可以为站点与CCO的通信距离的跳数,如图2所示的PLC网络中STA5在PLC网络中所处的层级为2,STA9在PLC网络中所处的层级为3。
一种可选的实施方式中,CCO可以根据目标站点的设备信息和/或链路信息确定目标站点的心跳周期。示例性的,目标站点的心跳周期与设备信息、链路信息的关系可以如下:
(1)目标站点的心跳周期与目标站点在预设时长内离线的次数负相关。
可选的,目标站点在预设时长内离线的次数越多,表示目标站点的在网状态变化越频繁,则CCO确定出的目标站点发送心跳报文的心跳周期越短,从而提高CCO检测目标站点的在网状态的频率。
(2)目标站点的心跳周期与目标站点所处链路的通信质量正相关。
可选的,目标站点所处链路的通信质量可以通过通信成功率、信噪比、预设时长中链路质量差的次数等至少一项数据的表示,例如,目标站点所处链路的通信成功率小于或小于等于第一阈值时,CCO可以确定目标站点所处链路的通信质量差;目标站点所处链路的信噪比小于或小于等于第二阈值时,CCO可以确定目标站点所处链路的通信质量差;目标站点所处链路在预设时长中检测通信质量差的次数大于或大于等于第三阈值时,CCO可以确定目标站点所处链路的通信质量差,其中,预设时长例如可以为一个或多个路由周期。 当目标站点所处链路的通信质量较差时,表示目标站点通信不稳定,CCO可以确定该目标站点的心跳周期较短,以实现快速检测目标站点的在网状态。
(3)目标站点的心跳周期与目标站点所关联的代理站点下挂的站点数量或层级数量正相关。
可选的,PLC网络中高层级站点的心跳检测报文需要汇聚到上一层级的站点处,目标站点所关联的代理站点下挂的站点数量或层级数量越大,该代理站点在单位时间内接收到的心跳检测报文或心跳报文的数量就越多,则目标站点的心跳周期可以设置的越长,从而防止目标站点的心跳报文与其它站点的报文产生冲突。
举例来说,图5为本申请实施例提供的一种PLC网络的示意图。参考图5,CCO可以在通信过程中动态调整各个STA的心跳周期。例如,PCO1与PCO2下挂的站点数量相同,则CCO可以确定STA3-STA8的心跳周期相同,如确定STA3-STA8的心跳周期为30s。若PCO2下的STA6在预设时长内离线的次数较多,则CCO可以减小STA6的心跳周期,如确定STA6的心跳周期为10s。
又例如,在图2所示的PLC网络中,STA4、STA5、PCO2、PCO3关联的代理站点为PCO1,STA6、STA7关联的代理站点为PCO2,STA8、STA9关联的代理站点为PCO3。PCO1下挂的站点数量较多,PCO1下挂的层级数量也较多,而PCO2和PCO3下挂的站点数量和层级数量相同,则CCO可以确定STA4、STA5、PCO2、PCO3的心跳周期大于STA6-STA9的心跳周期,STA6-STA9可以具有相同的心跳周期。若CCO确定STA6所处链路的通信质量较差,CCO可以减小STA6的心跳周期,以实现快速检测STA6的在网状态。
本申请实施例中,CCO在确定目标站点的心跳周期后,可以向目标站点指示目标站点的心跳周期。可选地,CCO可以通过路由参数通知条目向目标站点指示目标站点的心跳周期。例如,表1为本申请实施例提供的一种路由参数通知条目,其中心跳周期字段为本申请实施例在路由参数通知条目中新增的一个字段,该字段可以包含设备标识与心跳周期时间参数,每个站点在接收到路由参数通知条目后,可以根据设备标识查找对应的心跳周期。
表1路由参数通知条目
可选地,CCO还可以通过管理报文向目标站点指示目标站点的心跳周期。该管理报文可以为CCO在PLC中现有的报文,通过对该报文进行复用以指示目标站点的心跳周期。 或者该管理报文可以为一条新增的管理报文,用于通知各个站点的心跳周期。
具体实施中,管理报文中可以包括每个站点的设备标识以及每个站点对应的心跳周期,CCO广播发送该管理报文,站点在接收到该管理报文时,可以根据自身的设备标识获取管理报文中的该站点的心跳周期,从而实现通过一条管理报文通知多个站点心跳周期,减少CCO通知各个站点心跳周期的开销,节约PLC信道资源。
一些实施例中,目标站点在接收到CCO发送的目标站点的心跳周期后,可以基于目标站点的心跳周期发送心跳报文,以表示目标站点的在网状态为在线。
可以理解的是,本申请实施例提供的在网状态检测方法是一种在电力线通信过程中动态调整各个站点的心跳周期的方法,CCO可以在通信过程中实时获取各个站点的设备信息和/或链路信息,进而根据每个站点的设备信息和/或链路信息确定每个站点对应的心跳周期,并分别向每个站点指示每个站点的心跳周期。根据本申请实施例提供的在网状态检测方法,PLC网络中不同的站点可以具有不同的心跳周期,且每个站点的心跳周期与该站点的设备信息、链路信息相关,以使CCO可以及时检测各个站点的在网状态,提升设备控制成功率。
基于以上实施例,本申请还提供一种在网状态检测方法,该方法可以由PLC系统中的中央协调器和至少一个站点执行,如该方法可以应用于图1所示的智能家居场景中的PLC系统。图6为本申请实施例提供的一种在网状态检测方法的流程图。参考图6,该方法包括以下步骤:
S601:中央协调器获取至少一个站点的设备信息和/或链路信息。
其中,设备信息用于指示站点的离线次数,链路信息用于指示站点所处链路的通信质量和/或站点关联情况。
S602:中央协调器根据目标站点的设备信息和/或链路信息确定目标站点的心跳周期。
其中,目标站点为PLC系统包含的至少一个站点中的任一站点。
S603:中央协调器向目标站点指示目标站点的心跳周期,目标站点获取中央协调器指示的目标站点的心跳周期。
S604:目标站点基于目标站点的心跳周期发送心跳报文。
其中,目标站点发送的心跳报文用于指示目标站点的在网状态为在线。
需要说明的是,本申请图6所示的在网状态检测方法在具体实施时可以参见本申请上述各实施例,重复之处不再赘述。
基于以上实施例,本申请还提供一种中央协调器,包括多个功能模块;所述多个功能模块相互作用,实现本申请实施例所描述的各方法中的中央协调器所执行的功能。如执行图6所示实施例中的中央协调器执行的S601-S603。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
基于以上实施例,本申请还提供一种中央协调器,该中央协调器包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述中央协调器运行时,所述至少一个处理器执行本申请实施例所描述的各方法中的中央协调器所执行的功能。如执行图6所示实施例中的中央协调器执行的S601-S603。
基于以上实施例,本申请还提供一种电子设备,所述电子设备包括多个功能模块;所 述多个功能模块相互作用,实现本申请实施例所描述的各方法中站点所执行的功能。如执行图6所示实施例中目标站点执行的S603-S604。所述多个功能模块可以基于软件、硬件或软件和硬件的结合实现,且所述多个功能模块可以基于具体实现进行任意组合或分割。
基于以上实施例,本申请还提供一种电子设备,该电子设备包括至少一个处理器和至少一个存储器,所述至少一个存储器中存储计算机程序指令,所述电子设备运行时,所述至少一个处理器执行本申请实施例所描述的各方法中站点所执行的功能。如执行图6所示实施例中目标站点执行的S603-S604。
基于以上实施例,本申请还提供一种包含指令的计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行本申请实施例所描述的各方法。
基于以上实施例,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行本申请实施例所描述的各方法。
基于以上实施例,本申请还提供了一种芯片,所述芯片用于读取存储器中存储的计算机程序,实现本申请实施例所描述的各方法。
基于以上实施例,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持计算机装置实现本申请实施例所描述的各方法。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (22)

  1. 一种电力线通信系统,其特征在于,所述电力线通信系统包括中央协调器和至少一个站点,目标站点为所述至少一个站点中的任一站点;
    所述中央协调器,用于获取所述至少一个站点的设备信息和/或链路信息,所述设备信息用于指示站点的离线次数,所述链路信息用于指示站点所处链路的通信质量和/或站点关联情况;根据目标站点的设备信息和/或链路信息确定所述目标站点的心跳周期,并向所述目标站点指示所述目标站点的心跳周期;
    所述目标站点,用于获取所述中央协调器指示的所述目标站点的心跳周期,并基于所述目标站点的心跳周期发送心跳报文,所述心跳报文用于指示所述目标站点的在网状态为在线。
  2. 如权利要求1所述的系统,其特征在于,所述目标站点的设备信息包括所述目标站点在预设时长内离线的次数;所述目标站点的链路信息包括所述目标站点所处链路的通信质量、所述目标站点关联的代理站点下挂的站点数量、所述目标站点关联的代理站点下挂的层级数量中的至少一项。
  3. 如权利要求2所述的系统,其特征在于,所述目标站点的心跳周期满足以下至少一种条件:
    所述目标站点的心跳周期与所述目标站点在预设时长内离线的次数负相关;
    所述目标站点的心跳周期与所述目标站点所处链路的通信质量正相关;
    所述目标站点的心跳周期与所述目标站点关联的代理站点下挂的站点数量正相关;
    所述目标站点的心跳周期与所述目标站点关联的代理站点下挂的层级数量正相关。
  4. 如权利要求1-3任一项所述的系统,其特征在于,所述中央协调器具体用于:
    向所述目标站点发送路由参数通知条目,所述路由参数通知条目中包括所述目标站点的设备标识和所述目标站点的心跳周期;或者
    向所述目标站点发送管理报文,所述管理报文中包括所述目标站点的设备标识和所述目标站点的心跳周期。
  5. 如权利要求1-4任一项所述的系统,其特征在于,所述目标站点至少为二级站点;
    所述目标站点具体用于:
    基于所述目标站点的心跳周期向所述目标站点关联的代理站点发送心跳报文;
    所述中央协调器还用于:
    接收所述目标站点所处链路中的一级站点发送的心跳检测报文,所述心跳检测报文中包括所述目标站点的活跃信息;根据所述心跳检测报文确定所述目标站点的在网状态为在线。
  6. 如权利要求1-4任一项所述的系统,其特征在于,所述目标站点为一级站点;
    所述目标站点具体用于:
    基于所述目标站点的心跳周期向所述中央协调器发送心跳报文;
    所述中央协调器还用于:
    接收所述目标站点发送的心跳报文,确定所述目标站点的在网状态为在线。
  7. 一种在网状态检测方法,其特征在于,应用于中央协调器,所述方法包括:
    获取所述中央协调器所属的电力线通信系统中的至少一个站点的设备信息和/或链路 信息,所述设备信息用于指示站点的离线次数,所述链路信息用于指示站点所处链路的通信质量和/或站点关联情况;
    根据目标站点的设备信息和/或链路信息确定所述目标站点的心跳周期,所述目标站点为所述至少一个站点中的任一站点;
    向所述目标站点指示所述目标站点的心跳周期,以使所述目标站点基于所述目标站点的心跳周期发送心跳报文,所述心跳报文用于指示所述目标站点的在网状态为在线。
  8. 如权利要求7所述的方法,其特征在于,所述目标站点的设备信息包括所述目标站点在预设时长内离线的次数;所述目标站点的链路信息包括所述目标站点所处链路的通信质量、所述目标站点关联的代理站点下挂的站点数量、所述目标站点关联的代理站点下挂的层级数量中的至少一项。
  9. 如权利要求8所述的方法,其特征在于,所述目标站点的心跳周期满足以下至少一种条件:
    所述目标站点的心跳周期与所述目标站点在预设时长内离线的次数负相关;
    所述目标站点的心跳周期与所述目标站点所处链路的通信质量正相关;
    所述目标站点的心跳周期与所述目标站点关联的代理站点下挂的站点数量正相关;
    所述目标站点的心跳周期与所述目标站点关联的代理站点下挂的层级数量正相关。
  10. 如权利要求7-9任一项所述的方法,其特征在于,所述向所述目标站点指示所述目标站点的心跳周期,包括:
    向所述目标站点发送路由参数通知条目,所述路由参数通知条目中包括所述目标站点的设备标识和所述目标站点的心跳周期;或者
    向所述目标站点发送管理报文,所述管理报文中包括所述目标站点的设备标识和所述目标站点的心跳周期。
  11. 如权利要求7-10任一项所述的方法,其特征在于,在所述向所述目标站点指示所述目标站点的心跳周期之后,所述方法还包括:
    接收所述目标站点所处链路中的一级站点发送的心跳检测报文,所述心跳检测报文中包括所述目标站点的活跃信息;根据所述心跳检测报文确定所述目标站点的在网状态为在线;或者
    接收所述目标站点发送的心跳报文,确定所述目标站点的在网状态为在线;其中,所述目标站点与所述中央协调器关联。
  12. 一种在网状态检测方法,其特征在于,应用于电力线通信系统中的站点,所述方法包括:
    获取中央协调器指示的所述站点的心跳周期,所述站点的心跳周期为所述中央协调器根据所述站点的设备信息和/或链路信息确定的,所述设备信息用于指示所述站点的离线次数,所述链路信息用于指示所述站点所处链路的通信质量和/或站点关联情况;
    基于所述站点的心跳周期发送心跳报文,所述心跳报文用于指示所述站点的在网状态为在线。
  13. 如权利要求12所述的方法,其特征在于,所述站点的设备信息包括所述站点在预设时长内离线的次数;所述站点的链路信息包括所述站点所处链路的通信质量、所述站点关联的代理站点下挂的站点数量、所述站点关联的代理站点下挂的层级数量中的至少一项。
  14. 如权利要求13所述的方法,其特征在于,所述站点的心跳周期满足以下至少一种 条件:
    所述站点的心跳周期与所述站点在预设时长内离线的次数负相关;
    所述站点的心跳周期与所述站点所处链路的通信质量正相关;
    所述站点的心跳周期与所述站点关联的代理站点下挂的站点数量正相关;
    所述站点的心跳周期与所述站点关联的代理站点下挂的层级数量正相关。
  15. 如权利要求12-14任一项所述的方法,其特征在于,所述获取中央协调器指示的所述站点的心跳周期,包括:
    接收所述中央协调器发送的路由参数通知条目,所述路由参数通知条目中包括所述站点的设备标识和所述站点的心跳周期;或者
    接收所述中央协调器发送的管理报文,所述管理报文中包括所述站点的设备标识和所述站点的心跳周期。
  16. 如权利要求12-15任一项所述的方法,其特征在于,所述基于所述站点的心跳周期发送心跳报文,包括:
    当所述站点至少为二级站点时,基于所述站点的心跳周期向所述站点关联的代理站点发送心跳报文;或者
    当所述站点为一级站点时,基于所述站点的心跳周期向所述中央协调器发送心跳报文。
  17. 一种中央协调器,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合,所述至少一个处理器用于读取所述至少一个存储器所存储的计算机程序,以执行如权利要求7-11中任一所述的方法。
  18. 一种中央协调器,其特征在于,包括多个功能模块;所述多个功能模块相互作用,实现如权利要求7-11中任一所述的方法。
  19. 一种电子设备,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合,所述至少一个处理器用于读取所述至少一个存储器所存储的计算机程序,以执行如权利要求12-16中任一所述的方法。
  20. 一种电子设备,其特征在于,包括多个功能模块;所述多个功能模块相互作用,实现如权利要求12-16中任一所述的方法。
  21. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行如权利要求7-11中任一所述的方法,或执行如权利要求12-16中任一所述的方法。
  22. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得计算机执行如权利要求7-11中任一所述的方法,或执行如权利要求12-16中任一所述的方法。
PCT/CN2023/078470 2022-03-14 2023-02-27 一种电力线通信系统、在网状态检测方法及设备 WO2023174043A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210245488.9A CN116800301A (zh) 2022-03-14 2022-03-14 一种电力线通信系统、在网状态检测方法及设备
CN202210245488.9 2022-03-14

Publications (1)

Publication Number Publication Date
WO2023174043A1 true WO2023174043A1 (zh) 2023-09-21

Family

ID=88022321

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/078470 WO2023174043A1 (zh) 2022-03-14 2023-02-27 一种电力线通信系统、在网状态检测方法及设备

Country Status (2)

Country Link
CN (1) CN116800301A (zh)
WO (1) WO2023174043A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117177101A (zh) * 2023-11-03 2023-12-05 深圳讯智物联科技有限公司 一种基于电表抄表系统的cco状态处理方法及系统
CN117575544A (zh) * 2024-01-15 2024-02-20 北京智芯微电子科技有限公司 配电台区设备管理方法、装置、存储介质及电子设备
CN117639906A (zh) * 2024-01-26 2024-03-01 成都星联芯通科技有限公司 用于高轨卫星宽带下信关站性能测试方法、装置及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139008A (zh) * 2011-11-23 2013-06-05 中兴通讯股份有限公司 检测报文心跳周期的自适应方法和装置
CN103634746A (zh) * 2013-12-13 2014-03-12 中国人民解放军重庆通信学院 一种保持PoC持续连接处理能力的方法和装置
CN104243293A (zh) * 2014-08-21 2014-12-24 深圳市合信自动化技术有限公司 一种心跳间隔自动调整的方法和网关设备、服务器
CN104333465A (zh) * 2014-10-31 2015-02-04 北京奇虎科技有限公司 一种心跳间隔设置的方法、装置及系统
WO2017107809A1 (zh) * 2015-12-21 2017-06-29 阿里巴巴集团控股有限公司 一种物联网链接管理方法和设备
CN109697117A (zh) * 2017-10-20 2019-04-30 中国电信股份有限公司 终端控制方法、装置以及计算机可读存储介质
CN109905259A (zh) * 2017-12-08 2019-06-18 中国电信股份有限公司 通信连接维持方法、系统和相关设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139008A (zh) * 2011-11-23 2013-06-05 中兴通讯股份有限公司 检测报文心跳周期的自适应方法和装置
CN103634746A (zh) * 2013-12-13 2014-03-12 中国人民解放军重庆通信学院 一种保持PoC持续连接处理能力的方法和装置
CN104243293A (zh) * 2014-08-21 2014-12-24 深圳市合信自动化技术有限公司 一种心跳间隔自动调整的方法和网关设备、服务器
CN104333465A (zh) * 2014-10-31 2015-02-04 北京奇虎科技有限公司 一种心跳间隔设置的方法、装置及系统
WO2017107809A1 (zh) * 2015-12-21 2017-06-29 阿里巴巴集团控股有限公司 一种物联网链接管理方法和设备
CN109697117A (zh) * 2017-10-20 2019-04-30 中国电信股份有限公司 终端控制方法、装置以及计算机可读存储介质
CN109905259A (zh) * 2017-12-08 2019-06-18 中国电信股份有限公司 通信连接维持方法、系统和相关设备

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117177101A (zh) * 2023-11-03 2023-12-05 深圳讯智物联科技有限公司 一种基于电表抄表系统的cco状态处理方法及系统
CN117177101B (zh) * 2023-11-03 2024-02-02 深圳讯智物联科技有限公司 一种基于电表抄表系统的cco状态处理方法及系统
CN117575544A (zh) * 2024-01-15 2024-02-20 北京智芯微电子科技有限公司 配电台区设备管理方法、装置、存储介质及电子设备
CN117575544B (zh) * 2024-01-15 2024-03-22 北京智芯微电子科技有限公司 配电台区设备管理方法、装置、存储介质及电子设备
CN117639906A (zh) * 2024-01-26 2024-03-01 成都星联芯通科技有限公司 用于高轨卫星宽带下信关站性能测试方法、装置及系统
CN117639906B (zh) * 2024-01-26 2024-04-12 成都星联芯通科技有限公司 用于高轨卫星宽带下信关站性能测试方法、装置及系统

Also Published As

Publication number Publication date
CN116800301A (zh) 2023-09-22

Similar Documents

Publication Publication Date Title
WO2023174043A1 (zh) 一种电力线通信系统、在网状态检测方法及设备
US10582451B2 (en) Direct link wireless devices with power savings
EP4132098A1 (en) Implementation method for wi-fi peer-to-peer service and related device
WO2020233538A1 (zh) 一种接入无线局域网的方法和终端
WO2021098533A1 (zh) 一种连接建立方法及终端设备
US11943650B2 (en) Acquiring interference information using OBSS and without management device
EP4247031A1 (en) Access method and system and electronic device
EP4311314A1 (en) Sleep scheduling method and device
CN116114239B (zh) 音量管理的方法及电子设备
AU2017352540A1 (en) Communication apparatus, communication control method, and program
WO2023143300A1 (zh) 一种切片选择方法、系统及相关装置
US11871449B2 (en) Backoff method and apparatus in transmission process, device, system, and storage medium
CN113056037A (zh) 网络标识的显示方法、设备及系统
CN113645608A (zh) 数据传输方法和数据传输装置
WO2018070096A1 (ja) 通信装置、通信制御方法およびプログラム
US20220346083A1 (en) Methods and apparatuses for determining network allocation vector, and storage media
CN111466127A (zh) 增强上行覆盖的处理方法、装置及存储介质
WO2022174746A1 (zh) 事件通知方法、蓝牙设备以及蓝牙系统
WO2022228190A1 (zh) 一种WiFi连接方法及装置
CN116709226A (zh) 通信接力方法、电子设备、通信系统及存储介质
WO2022083722A1 (zh) 一种不同设备之间的跨应用互联方法及相关装置
WO2022068646A1 (zh) 一种数据传输方法及电子设备
WO2023246660A1 (zh) 一种电力线通信系统、设备状态查询方法及设备
CN113746517B (zh) 一种波束训练的方法、终端设备及计算机可读存储介质
CN116528182A (zh) 一种无线网络接入方法、电子设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23769551

Country of ref document: EP

Kind code of ref document: A1