Site information searching method and device, master site, slave site, system and medium
By using the mechanism of broadcast messages and random number lists in site communication in the photovoltaic field, the automatic acquisition of site information and the efficiency of searching are improved, and the shortcomings of manual operations in the prior art are solved.
Patent Information
- Application Number
- CN202510087142.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-04-25
AI Technical Summary
In site communication in the photovoltaic field, the prior art relies on manual operations to obtain site archives, resulting in the possibility of inaccessibility of information in complex field environments and the risk of errors.
By broadcasting site search request messages between the master site and the slave site, using the random number list and response interval mechanism, automatic acquisition of site information and search convergence are achieved.
It realizes automatic acquisition of site information, improves search efficiency, and ensures the convergence of the entire search process through multiple searches and updates of random number lists.
Smart Images

Figure CN119892155A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power line carrier communication technology, and in particular to a site information search method, device, master site, slave site, system and medium. Background Art
[0002] In the site communication solution in the photovoltaic field, the topology is usually determined by networking. The networking operation requires the master site to know the site archive of this topology. In the conventional operation process, the way to obtain archives is manual operation. This method is limited by the on-site environment. There may be various scenarios that cause workers to be unable to obtain archive information, and manual behavior may cause errors, resulting in incorrect archive information. Summary of the invention
[0003] The present invention provides a site information search method, device, master site, slave site, system and medium, which realize automatic acquisition of site information, converge the entire site information search and improve the search efficiency.
[0004] In a first aspect, an embodiment of the present invention provides a site information search method, which is applied to a primary site, and the method includes:
[0005] Broadcasting a site search request message, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number;
[0006] receiving a site search confirmation message reported by a slave site and updating the random number list, wherein the slave site that reports the site search confirmation message is a slave site that meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number;
[0007] When the current search time exceeds the response interval, updating the response interval;
[0008] According to the updated random number list and the response interval, an updated site search request message is obtained, and the step of broadcasting the site search request message is returned to continue until no site search confirmation message is received within the set search times, and then the search is stopped.
[0009] In a second aspect, an embodiment of the present invention provides a site information search method, which is applied to a slave site, and the method includes:
[0010] Receive a site search request message broadcast by the master site, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number;
[0011] Determine whether the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number;
[0012] If the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number, reporting a site search confirmation message to the master site, wherein the site search confirmation message includes a random number generated by the slave site;
[0013] Otherwise, no site search confirmation message is reported to the primary site.
[0014] In a third aspect, an embodiment of the present invention provides a site information search device, which is integrated in a main site, and the device includes:
[0015] A message broadcast module, used for broadcasting a site search request message, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by the slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number;
[0016] A confirmation message receiving module, used for receiving a site search confirmation message reported by a slave site and updating the random number list, wherein the slave site that reports the site search confirmation message is a slave site that meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number;
[0017] An interval updating module, used for updating the response interval when the current search time exceeds the response interval;
[0018] The message update module is used to obtain an updated site search request message according to the updated random number list and the response interval, and return to continue the step of broadcasting the site search request message until no site search confirmation message is received within the set search times, and then stop the search.
[0019] In a fourth aspect, an embodiment of the present invention provides a site information search device, which is integrated in a slave site, and the device includes:
[0020] A request message receiving module, used to receive a site search request message broadcast by a master site, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number;
[0021] A reporting judgment module, used to determine whether the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number;
[0022] A message reporting module, configured to report a site search confirmation message to the master site if the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number, wherein the site search confirmation message includes a random number generated by the slave site;
[0023] The message non-reporting module is used for not reporting the site search confirmation message to the main site otherwise.
[0024] In a fifth aspect, an embodiment of the present invention provides a primary site, including:
[0025] at least one processor; and
[0026] a memory communicatively connected to the at least one processor; wherein,
[0027] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the site information search method as described in any embodiment of the present invention.
[0028] In a sixth aspect, an embodiment of the present invention provides a slave site, including:
[0029] at least one processor; and
[0030] a memory communicatively connected to the at least one processor; wherein,
[0031] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the site information search method as described in any embodiment of the present invention.
[0032] In a seventh aspect, an embodiment of the present invention provides a site information search system, comprising: a master site as described in any embodiment of the present invention and a slave site as described in any embodiment of the present invention.
[0033] In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the site information search method as described in any embodiment of the present invention when executed.
[0034] The embodiment of the present invention provides a site information search method, device, master site, slave site, system and medium. The method is applied to the master site, comprising: first broadcasting a site search request message, the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition and a random number list, the random number list contains random numbers generated by slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number; secondly receiving a site search confirmation message reported by the slave site and updating the random number list, the slave site that reports the site search confirmation message is a slave site that meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number; then when the current search time exceeds the response interval, updating the response interval; finally, according to the updated random number list and the response interval, obtaining an updated site search request message, returning to continue to execute the step of broadcasting the site search request message, until the site search confirmation message is not received within the set search times, then stopping the search. In the above technical solution, the master site broadcasts a site search request message to search for slave sites, and receives a site search confirmation message reported by the slave site, and realizes automatic acquisition of site information through the master site search and slave site reporting. In addition, the site information search process is a multiple search, and the number of slave sites searched each time will be less than the number of the previous search. Since the number of slave sites that need to be reported is reduced, the entire site information search process converges; at the same time, the response interval of each search is updated after each search, so that the time interval reported by the slave site is gradually reduced, further convergence of the entire site information search, and improved search efficiency.
[0035] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1A schematic diagram of a flow chart of a site information search method provided in Embodiment 1 of the present invention;
[0038] Figure 2 A flowchart of another site information search method provided in Embodiment 2 of the present invention;
[0039] Figure 3 A flowchart of another site information search method provided in Embodiment 3 of the present invention;
[0040] Figure 4 A flowchart of another site information search method provided in Embodiment 4 of the present invention;
[0041] Figure 5 This is a flowchart of a site information search method in a certain application scenario provided by Embodiment 4 of the present invention;
[0042] Figure 6 A schematic diagram of the structure of a site information search device provided in Embodiment 5 of the present invention;
[0043] Figure 7 A schematic diagram of the structure of another site information search device provided in Embodiment 6 of the present invention;
[0044] Figure 8 A schematic diagram of the structure of a primary site provided in Embodiment 7 of the present invention;
[0045] Fig. 9 A schematic diagram of the structure of a slave site provided in Embodiment 8 of the present invention;
[0046] Fig.10 A schematic diagram of the structure of a site information search system provided in Embodiment 9 of the present invention. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0048] It should be noted that the terms "original", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] Embodiment 1
[0050] Figure 1 A flow chart of a site information search method provided in Embodiment 1 of the present invention is applicable to the situation of searching for site information. The method can be executed by a site information search device, which can be implemented in the form of hardware and / or software and can be integrated in a main site.
[0051] like Figure 1 As shown, the site information search method provided in this embodiment may specifically include the following steps:
[0052] S101. Broadcast a site search request message.
[0053] In this embodiment, the site search request message is a downlink message broadcasted by the master site, and the site search request message includes a search sequence number, network parameters, response interval, reporting restriction conditions, and a random number list. It should be clear that the search process for a search task can be considered as a round of site information search, and a round of site information search will include multiple message sending and message reporting processes. Exemplarily, assuming that the master site is expected to search for 200 slave sites, the entire process of the master site searching for 200 slave sites can be considered as a round of search, and the master site searching for 200 slave sites may be divided into multiple searches, such as the first search to 100 slave sites, which is considered as one search, the second search to 50 slave sites, which is considered as one search, and the third search to 20 slave sites, which is considered as one search. It can be considered that a round of site information search includes multiple site information searches. In each round of site information search, the search sequence number, network parameters, and reporting restriction conditions are unchanged.
[0054] In this embodiment, networking refers to the process of matching the slave site with the master site; network access refers to the completion of the matching of the slave site with the master site; reporting refers to the action of the slave site responding to the message after the master site sends a site search request message. According to the message sent by the master site, the slave site can respond to the site search of this network or the site search of other networks.
[0055] The network parameters include the source of the site search request message. Based on the network parameters, the slave site can confirm the source of the downstream site search request message and decide whether to report it later. For example, if the network parameters include that the source of the site search request message is area 1, if you want this site to report, the slave site will determine whether the slave site belongs to area 1, and if it belongs to area 1, it will report it.
[0056] In this embodiment, the response interval can be specifically understood as a specified time range allowed for reporting from the site. Due to the communication characteristics of power line carrier (PLC), when multiple sites communicate on the carrier at the same time, the receiving end may not be able to recognize the message content. Therefore, when all downlink messages are received from the site, responding will cause carrier conflicts. By setting a response interval, each site will select a random time within the specified time range to report to avoid message conflicts. However, this mechanism still cannot completely avoid conflicts, so the site search function is set to a convergence process, and the response interval can be set each time a site search is performed. Therefore, setting a reasonable response interval can optimize the entire search process.
[0057] Among them, the reporting restriction condition can be specifically understood as the screening condition for which sites are allowed to report. There are many types of reporting restriction conditions, which can be realized by combining network parameters, such as only allowing sites that are not on the network to report, only allowing sites on the network to report, only allowing sites that are not on the network to report, or only allowing sites that are not on the network to report. By sending down signal strength or signal-to-noise ratio values, sites that cannot meet the numerical requirements can be controlled not to report. The specific restriction condition to be selected depends on what kind of site information screening to be achieved.
[0058] Preferably, the reporting restriction condition includes at least one of: only allowing unconnected sites to report, only allowing this site to report, only allowing non-site sites to report, only allowing unreported sites to report, or only allowing sites with link quality higher than a set value to report.
[0059] It should be noted that the reporting restriction condition of each round of search can be set to include only one of these reporting restriction conditions, or these reporting restriction conditions can be combined as the final reporting restriction condition. The following is a description of a single reporting restriction condition.
[0060] Example 1: Only allow sites that are not yet online to report: When preparing to build a new area, the sites that can communicate with the main site include sites in other areas that have been online and some sites that have not yet been online. The main site only needs to search the archives of all the sites that are not yet online, and does not need the sites that have been online to report. Therefore, the reporting restriction condition is selected to only allow sites that are not yet online to report, that is, prohibiting sites that have been online from reporting.
[0061] Example 2: Only allow this site to report: All sites in the current area have been connected to the network, and now want to obtain the network information of all slave sites that have matched the master site. Select the reporting restriction condition to only allow this site to report.
[0062] Example 3: Only non-site sites are allowed to report: The master site of area 1 cannot communicate with its slave sites. There is area 2 nearby. Use the master site of area 2 to try to communicate with the slave site of area 1. Select the reporting restriction condition to only allow non-site sites to report.
[0063] Example 4: Only allow unreported sites to report: Only allow unreported sites to report, and prohibit the reporting function of reported sites. The slave site will carry a confirmation random number during the reporting process. After the master site does statistics, it will send the site search function again and send the random number down again. After receiving the message, the slave site will compare the random number. If the same random number appears, it means that the report has been successful. The slave site will not report again during the search process of this search number.
[0064] Example 5: Only sites with link quality higher than the set value are allowed to report: Only sites with link quality higher than the set value are allowed to report, and sites with low link quality are prohibited from reporting. For example, if the link quality is set, the signal strength sent is 40, the signal strength received by this site is about 50, and the signal strength of the message received by other network sites through crosstalk is about 30. At this time, the slave sites with message signal strength lower than 40 will not report.
[0065] Each individual reporting restriction condition is described above, and the above reporting restriction conditions can also be combined, which is not specifically limited here. For example, it can be set to allow only this website to report and only allow sites with higher link quality than the set link quality to report.
[0066] In this embodiment, the random number list contains the random numbers generated by the slave sites that have been successfully reported. After receiving, the master site sends it again to confirm the report from the slave site. The number of random number lists determines the number of silent slave sites to be searched each time. Usually, the site search request message will be set to prohibit the reported site from reporting. For example, it is expected that there are 200 sites in a substation area, and the random number list can accommodate up to 50 groups of random numbers. Therefore, the minimum number of searches is 4 times. Each time the master site sends a random number list with random numbers, the slave site will compare its own random number with the random number in the random number list. If its own random number is the same as the random number in the random number list, it confirms that it has been successfully reported and will no longer respond to the site search request message of the current search sequence number.
[0067] In this embodiment, the search sequence number can be specifically understood as a number used to mark this round of search. For each search sequence number, the slave site will only generate a random number once. Different search sequence numbers control the generation of different random numbers from the slave site. In a round of site search, the master site will send multiple site search request messages. When no site is reported for several consecutive times, it is considered that this round of site search has ended.
[0068] S102: Receive a site search confirmation message reported by a slave site and update a random number list. The slave site that reports the site search confirmation message is a slave site that meets a reporting restriction condition and has not successfully reported a site search confirmation message for a search sequence number.
[0069] In this embodiment, a search sequence number represents a round of site information search. After the master site broadcasts the site search request message, each slave site will receive the site search request message and further determine whether the slave site needs to report this time. The basis for determining whether the slave site needs to report this time is: whether the slave site itself meets the reporting restriction conditions. If the slave site itself does not meet the reporting restriction conditions, then no reporting is required in this round of search; if the slave site itself meets the reporting restriction conditions, then it is also necessary to determine whether the slave site has been reported in this round of search. If it has been reported, it does not need to be reported again. If it has not been reported, then it is reported.
[0070] In this embodiment, the site search confirmation message can be specifically understood as an uplink message sent by the slave site, which carries the network parameters of the site and the random number generated by the site. The slave site that meets the reporting restriction conditions and has not successfully reported the site search confirmation message for the search sequence number will report the site search request message. Correspondingly, the master site receives the site search confirmation message reported by the slave site, and the site search confirmation message contains the random number generated by the slave site, so that the random number is added to the random number list.
[0071] S103: When the current search time exceeds the response interval, update the response interval.
[0072] In this embodiment, the site search request message includes a response interval, and the response interval represents the specified time range allowed for reporting from the site. When the current search time exceeds the response interval included in the site search request message sent this time, it means that the current site information search is over and it is necessary to continue the next site information search. Considering that the number of slave sites searched each time will be less than the previous search, the time interval for reporting from the site will gradually decrease. The response interval can be set each time a site search is performed, so setting a reasonable response interval can optimize the entire search process. Exemplarily, the corresponding response interval can be set according to the estimated number of remaining unreported sites. It should be noted that whether to update the response interval can be determined based on the actual situation. If the current response interval can achieve a good search effect, there is no need to update the response interval.
[0073] It should be noted that the method of updating the response interval can be to decide whether to update the response interval based on the instruction of the host computer, or the master site can automatically update the response interval. This embodiment does not specifically limit who executes the update of the response interval.
[0074] S104. Obtain an updated site search request message according to the updated random number list and the response interval, and return to continue the step of broadcasting the site search request message until no site search confirmation message is received within the set search times, then stop the search.
[0075] It is clear that each round of site information search will include multiple message sending-message reporting processes. When the search time of this search exceeds the response interval of this search, an updated site search request message will be obtained based on the updated random number list and the updated response interval. Return to continue the step of broadcasting the site search request message. At this time, the broadcast message is the updated site search request message. Steps S101-S104 will be repeated in each search until no site search confirmation message is received within the set search times, then the search is stopped, and this round of search ends. Among them, the set search times can be set according to actual conditions, for example, the set search times can be set to 3 times.
[0076] It is understandable that a round of site search has multiple sending and reporting processes. Based on the update of the random number list and the response interval, the number of slave sites searched each time will be less than the previous one. This means that the response interval reported by the slave site and the number of sub-sites that need to be reported are gradually decreasing. Therefore, the site search function is a convergence process. When there is no site report for many consecutive times, it is considered that the site has been searched.
[0077] In addition, it should be noted that the application scenario of the site search function is the establishment of files before networking. It is different from the traditional active registration networking. In the active registration scheme, the master site will allocate addresses, that is, it will change the address information of the slave site, while the site search function does not change the address of the slave site, and uses the original address of the slave site for reporting.
[0078] In the above technical solution, the master site broadcasts a site search request message to search for slave sites, and receives a site search confirmation message reported by the slave site, and realizes automatic acquisition of site information through the master site search and slave site reporting. In addition, the site information search process is a multiple search, and the number of slave sites searched each time will be less than the number of the previous search. Since the number of slave sites that need to be reported is reduced, the entire site information search process converges; at the same time, the response interval of each search is updated after each search, so that the time interval reported by the slave site is gradually reduced, further convergence of the entire site information search, and improved search efficiency.
[0079] Embodiment 2
[0080] Figure 2 A flow chart of another site information search method provided in Embodiment 2 of the present invention. This embodiment is a further optimization of the above-mentioned embodiment. In this embodiment, "receiving a site search confirmation message reported from the site and updating the random number list" is further limited and optimized, and "updating the response interval after the current search time exceeds the response interval" is further limited and optimized.
[0081] like Figure 2 As shown, this embodiment 2 provides a site information search method, which specifically includes the following steps:
[0082] S201. Broadcast a site search request message.
[0083] The site search request message includes a search sequence number, network parameters, a response interval, reporting restrictions, and a random number list. The random number list contains random numbers generated from the successfully reported slave sites. Each slave site generates a random number only once for the search sequence number.
[0084] S202: Receive a site search confirmation message reported by a slave site and extract a random number included in the site search confirmation message.
[0085] In this embodiment, after the master site broadcasts the site search request message, the slave site that meets the reporting restriction condition and has not successfully reported the site search confirmation message for the search sequence number will report the site search confirmation message. The master site will receive one or more site search confirmation messages reported by the slave site, and the site search confirmation message includes the random number generated by the slave site, and then the master site can extract the random number in each received site search confirmation message.
[0086] S203, adding the random number to the random number list.
[0087] Continuing with the above description, the random numbers in each site search confirmation message are counted and added to the random number list. It should be clear that in the main site search process, it operates around the random number mechanism. Each site search request message sent down carries a random number list. The random number list in the first site search request message sent down is empty. The random number list carried in the subsequent site search request message contains the random numbers generated by the reported slave site. The random numbers in the random number list come from the site search confirmation message reported by the slave site. The purpose is to complete an interaction between the master and slave sites, confirm that the slave site has successfully reported, and can be used to prevent the slave site from reporting again.
[0088] S204: When the current search time exceeds the response interval, the response interval is shortened according to the estimated number of slave sites that have not been successfully reported.
[0089] In this embodiment, considering that the number of slave sites searched each time will be less than that of the previous search, the time interval for slave site reporting will gradually decrease. A response interval can be set each time a site search is performed. Therefore, setting a reasonable response interval can optimize the entire search process. When the current search time exceeds the response interval, the response interval is reduced according to the number of slave sites that have not been successfully reported. A response interval that is too large or too small will affect the duration of a single round of site search, and needs to be adjusted according to the known topological scale. Usually, the time will become smaller and smaller as the site converges. For example, a response interval of the number of sites * 10ms is relatively ample and effective. Assuming that there are expected to be 200 sites in a station area, it would be more appropriate to set the response interval at 2000ms. However, if it is expected that only 20 sites have not been reported, then the response interval needs to be reduced accordingly. 200ms will be more efficient than 2000ms.
[0090] S205. Obtain an updated site search request message according to the updated random number list and the response interval, and return to continue the step of broadcasting the site search request message until no site search confirmation message is received within the set search times, then stop the search.
[0091] The above technical solution specifies the steps of updating the random number list and updating the response interval. By updating the random number list, the slave sites that have been successfully reported are recorded, so that the slave sites that have been successfully reported are no longer reported; by updating the response interval, the response interval is shortened as the number of slave sites that need to be reported gradually decreases with each search; based on the above random number list update and response interval update, it is ensured that the entire site information search process is a convergence process, thereby improving the efficiency of site information search.
[0092] Embodiment 3
[0093] Figure 3 This is a flow chart of another site information search method provided in the third embodiment of the present invention. The method is applicable to the case of searching for site information. The method can be executed by a site information search device. The device can be implemented in the form of hardware and / or software and can be integrated in a slave site. Figure 3 As shown, the site information search method provided in this embodiment 3 may specifically include the following steps:
[0094] S301: Receive a site search request message broadcast by a primary site.
[0095] In this embodiment, the site search request message is a downlink message broadcast by the master site, and the site search request message includes a search sequence number, network parameters, a response interval, reporting restrictions, and a random number list. It should be clear that the search process for a search task can be considered as a round of site information search, and a round of site information search will include multiple message sending and message reporting processes. Correspondingly, each slave site receives the site search request message broadcast by the master site.
[0096] The site search request message includes a search sequence number, network parameters, a response interval, reporting restrictions, and a random number list. The random number list contains random numbers generated from the successfully reported slave sites. Each slave site generates a random number only once for the search sequence number.
[0097] S302: Determine whether the slave site meets the reporting restriction condition and whether the site search confirmation message has not been successfully reported for the search sequence number.
[0098] In this embodiment, after each slave site receives the site search request message broadcast by the master site, each slave site will first determine whether the slave site meets the reporting restriction conditions and has not successfully reported the search sequence number based on the site search request message. First, each slave site will first determine whether the slave site meets the reporting restriction conditions. If the reporting restriction conditions are not met, there is no need to report. If the reporting restriction conditions are met, it will further determine whether the search sequence number has been successfully reported. Since a search sequence number represents a round of site information search, whether the search sequence number has been successfully reported is equivalent to whether the current round of site information search has been successfully reported. The slave site determines whether it meets the reporting restriction conditions, which is equivalent to determining whether it needs to be reported in the current round of search, and further determines whether the search sequence number has been successfully reported, which is equivalent to determining whether it needs to be reported in the current search.
[0099] Specifically, the site search request message broadcast by the master site includes network parameters, reporting restrictions, etc., and the slave site also has the network parameters of the slave site, etc., and the slave site can further determine whether the slave site meets the reporting restrictions. If it is determined that the reporting restrictions are met, it is further determined whether the slave site has successfully reported a site search confirmation message for the search sequence number based on the random number list included in the site search request message.
[0100] S303: If the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number, then a site search confirmation message is reported to the master site.
[0101] In this embodiment, if the slave site determines that it meets the reporting restriction condition and has not successfully reported the search sequence number, it reports a site search confirmation message to the master site. It should be noted that the site search confirmation message includes a random number generated by the slave site.
[0102] S304: Otherwise, do not report the site search confirmation message to the primary site.
[0103] Specifically, if the slave site determines that the slave site does not meet the reporting restriction conditions, the slave site does not report to the master site; or if the slave site determines that the slave site meets the reporting restriction conditions but has successfully reported to the master site, the slave site does not report to the master site either.
[0104] In the above technical solution, the master site broadcasts a site search request message to search for the slave site, and the slave site determines whether it needs to report in this search. If the slave site meets the reporting restriction conditions and has not successfully reported the site search confirmation message for the search sequence number, it reports the site search confirmation message to the master site. The automatic acquisition of site information is achieved by the master site search and the slave site report. In addition, the process of site information search is multiple searches, and the number of slave sites searched each time will be less than the number of the previous search. Since the number of slave sites that need to be reported is reduced, the whole process of site information search is converged, and the search efficiency is improved.
[0105] As an optional embodiment of the embodiment of the present invention, based on the above embodiment, after reporting the site search confirmation message to the primary site, the method may be optimized to further include:
[0106] a1) Generate and store message reporting records based on the search sequence number and the random number generated from the site.
[0107] In this embodiment, after the slave site reports the site search confirmation message to the master site, a message reporting record will be generated for the reporting situation. The message reporting record can be specifically understood as the relevant information reported by the slave site to the master site, including at least the search sequence number of this round of search, the random number generated by the slave site for this search sequence number, the message reporting time, whether the message is successfully reported, and other information. It can be understood that when the slave site reports the site search confirmation message for the first time, although the message has been reported, it is unknown whether the master site has successfully received it, that is, whether the site search confirmation message reported by the slave site is successfully reported is unknown, therefore, whether the message is successfully reported in the message reporting record generated for the first time is unknown, and can be initialized to 0.
[0108] b1) When the site search confirmation message is received again, it is determined whether the random number exists in the random number list of the site search request message.
[0109] In this embodiment, when a site search confirmation message carrying the search sequence number is received again, it is necessary to determine whether the random number in the random number list of the site search request message is the same as the random number recorded in the message reporting record.
[0110] c1) If it exists, the site reporting information successfully reported by the site will be updated to the message reporting record.
[0111] Specifically, if the random number in the message reporting record exists in the random number list, indicating that the slave site has successfully reported the site search confirmation message, then the site reporting information that the slave site has successfully reported is updated to the message reporting record generated by the slave site, that is, whether the message in the message reporting record is successfully reported is marked as the message has been successfully reported.
[0112] d1) If not, return to re-execute the step of determining whether the random number exists in the random number list of the site search request message when the site search confirmation message is received again.
[0113] In this embodiment, if the random number in the message reporting record does not exist in the random number list, indicating that the slave site has not successfully reported the site search confirmation message, then the process returns to re-execute the step of determining whether the random number exists in the random number list of the site search request message when the site search confirmation message is received again.
[0114] The above technical solution adds a step of generating a message reporting record, which provides a basis for the subsequent site to determine whether it is necessary to report the message.
[0115] As an optional embodiment of the embodiment of the present invention, based on the above embodiment, if the slave station does not store the message reporting record, the method further includes:
[0116] a2) Generate a random number for the slave site corresponding to the search sequence number, and determine whether the random number of the slave site exists in the random number list.
[0117] In this embodiment, if the slave site does not store a message reporting record, a random number for the search sequence number will be generated. In the process of generating random numbers, in order to avoid duplication of the newly generated random number with the random number in the random number list, the newly generated random number will be compared with the random number list in the site search request message to determine whether there is an identical random number, so as to avoid duplication with the reported random number.
[0118] It should be clear that the type of random number will affect the accuracy of site search. Multiple slave sites may generate the same random number with a low probability, which will interfere with the search results. Therefore, using U16 or U32 random numbers can reduce the probability of generating the same random number.
[0119] b2) If the random number of the slave site exists in the random number list, return to re-execute the step of generating the random number of the slave site until the generated random number of the slave site does not exist in the random number list.
[0120] In this embodiment, if the random number of the slave site exists in the random number list, the step of generating the random number of the slave site will be re-executed to avoid duplication with the random number in the random number list. Since the slave site will only generate a random number once for each search sequence number, if the message reporting record of the current search sequence number has not been stored, duplication with the random number in the random number list will be avoided during the random number generation process.
[0121] In addition, you can search for sites with different serial numbers. Changing the search serial number will cause the slave site to generate a different random number than before, which can also improve the problem of random number conflicts. In other words, if a random number conflict is found in a round of search, you can perform a new round of search and change the new search serial number, so that the slave site will generate a different random number than before, improving the random number conflict.
[0122] The above technical solution adds a step of generating a random number from the site, and provides a basis for whether to report from the site subsequently based on the random number.
[0123] Embodiment 4
[0124] Figure 4 A flow chart of another site information search method provided for Embodiment 4 of the present invention. This embodiment is a further optimization of the above-mentioned embodiment. In this embodiment, "determining whether the slave site meets the reporting restriction condition and has not successfully reported the site search confirmation message for the search sequence number" is further limited and optimized, and "reporting the site search confirmation message to the main site" is further limited and optimized.
[0125] like Figure 4 As shown, this fourth embodiment provides a site information search method, which specifically includes the following steps:
[0126] S401: Receive a site search request message broadcast by a primary site.
[0127] The site search request message includes a search sequence number, network parameters, a response interval, reporting restrictions, and a random number list. The random number list contains random numbers generated from the successfully reported slave sites. Each slave site generates a random number only once for the search sequence number.
[0128] S402: Determine whether the slave site meets the reporting restriction condition.
[0129] In this embodiment, after each slave site receives the site search request message broadcast by the master site, it will first determine whether the slave site meets the reporting restriction condition. For example, assuming that the reporting restriction condition is to allow only sites that are not connected to the network to report, it is necessary to determine whether the slave site has been connected to the network; if the reporting restriction condition is to allow only this site to report, it is necessary to determine whether the network parameters of the slave site are consistent with the network parameters included in the site search request message; if the reporting restriction condition is to allow only sites with a link quality higher than the set link quality to report, it is necessary to determine whether the link quality of the slave site is higher than the set link quality. The reporting restriction conditions are not listed one by one here.
[0130] As a specific implementation method, the steps of determining whether the slave site meets the reporting restriction condition may be optimized, including:
[0131] a3) If the reporting restriction condition is that only off-network sites are allowed to report, then when the slave site is off-network, the reporting restriction condition is met, and when the slave site is on-network, the reporting restriction condition is not met.
[0132] In this embodiment, if the reporting restriction condition is that only sites not on the network are allowed to report, that is, sites on the network are prohibited from reporting, then the master site requires sites on the network not to report. Each slave site determines the status of the slave site, if it is not on the network, the reporting restriction condition is met, and if it is on the network, the reporting restriction condition is not satisfied.
[0133] b3) If the reporting restriction condition is to only allow this website to report, when the network parameters from the site are the same as the network parameters contained in the site search request message, the reporting restriction condition is met; when the network parameters from the site are different from the network parameters contained in the site search request message, the reporting restriction condition is not met.
[0134] In this embodiment, if the reporting restriction condition is to allow only this website to report, then whether the current site belongs to this area is determined based on whether the network parameters contained in the site search request message are the same as the network parameters of the slave site. If the network parameters contained in the site search request message are the same as the network parameters of the slave site, that is, the current site belongs to this area, then it is determined that the current site meets the reporting restriction condition; if the network parameters contained in the site search request message are different from the network parameters of the slave site, that is, the current site does not belong to this area, then it is determined that the current site does not meet the reporting restriction condition.
[0135] c3) If the reporting restriction condition is to only allow non-site sites to report, when the network parameters of the slave site are different from the network parameters contained in the site search request message, the reporting restriction condition is met; when the network parameters of the slave site are the same as the network parameters contained in the site search request message, the reporting restriction condition is not met.
[0136] In this embodiment, if the reporting restriction condition is to allow only non-site sites to report, then whether the current site belongs to this area is determined based on whether the network parameters contained in the site search request message are the same as the network parameters of the slave site. If the network parameters contained in the site search request message are different from the network parameters of the slave site, that is, the current site does not belong to this area, then it is determined that the current site meets the reporting restriction condition; if the network parameters contained in the site search request message are the same as the network parameters of the slave site, that is, the current site belongs to this area, then it is determined that the current site does not meet the reporting restriction condition.
[0137] d3) If the reporting restriction condition is to allow only unreported stations to report, when the slave station fails to report successfully, the reporting restriction condition is met, and when the slave station successfully reports, the reporting restriction condition is not met.
[0138] In this embodiment, if there is a historical reporting record for the search sequence number, and the random number reported by the current sequence number is found in the downstream random number list, when the main site requires the reported site to no longer report, that is, only the unreported site is allowed to report, then if the site search confirmation message has not been successfully reported from the site, the reporting restriction condition is met; if the site search confirmation message has been successfully reported from the site, the reporting restriction condition is not met.
[0139] e3) If the reporting restriction condition is to only allow sites with link quality higher than the set link quality to report, when the link quality of the slave site is higher than the set link quality, the reporting restriction condition is met; when the link quality of the slave site is lower than or equal to the set link quality, the reporting restriction condition is not met.
[0140] In this embodiment, the site information search message broadcast by the master site carries the link quality standard, and the reporting restriction condition is that only sites with link quality higher than the set link quality are allowed to report. If the downlink message quality received by the slave site is higher than the set link quality, it is determined that the slave site meets the reporting restriction condition. If the downlink message quality received by the slave site is lower than the standard required by the master site, it is determined that the slave site does not meet the reporting restriction condition.
[0141] The above technical solution specifies the steps for each slave site to determine whether it meets the reporting restriction conditions, and provides a basis for whether each slave site performs reporting in the future.
[0142] S403: If the slave site meets the reporting restriction condition, determine whether the slave site has successfully reported a site search confirmation message for the search sequence number according to the random number list included in the site search request message.
[0143] In this embodiment, if the slave site determines that it meets the reporting restriction condition, it is necessary to further determine whether the slave site has successfully reported according to the random number list contained in the site search request message. The search sequence number is used to mark the number of this round of search, which is used to characterize this round of search. Specifically, the random number carried in the site search request message includes a random number generated by the slave site that has been successfully reported. The slave site can determine whether the slave site has successfully reported the site search confirmation message for this round of search based on whether the random number of the slave site already exists in the random number list.
[0144] As a specific implementation method, the step of determining whether the slave site has successfully reported a site search confirmation message for the search sequence number according to the random number list included in the site search request message can be optimized, including:
[0145] a4) Determine whether there is a message reporting record stored for the search sequence number.
[0146] The message reporting record stored in the slave site can be specifically understood as the relevant information reported by the slave site to the master site, such as the search sequence number, whether the slave site has successfully reported, the random number carried when the slave site reports the site search confirmation message, the random reporting time, etc. Specifically, the slave site first determines whether the slave site stores a message reporting record for the search sequence number.
[0147] b4) If no message reporting record is stored, it is determined that the slave site has not successfully reported a site search confirmation message for the search sequence number.
[0148] In this embodiment, if the slave site does not store a message reporting record, it indicates that the slave site has not reported a site search confirmation message for the search sequence number, and further it can be determined that the site search confirmation message has not been successfully reported for the search sequence number.
[0149] c4) If a message reporting record is stored, determine whether the slave site has successfully reported a site search confirmation message for the search sequence number according to the message reporting record and / or the random number list.
[0150] In this embodiment, a search sequence number represents a round of search process. If a message reporting record is stored in the slave site, it can be determined whether the slave site has successfully reported a site search confirmation message for this round of search process based on the message reporting record and / or the random number list. One implementation method for determining whether the slave site has successfully reported a message is: obtaining a message reporting record, the message reporting record records the search sequence number, the random number generated from the site for the search sequence number, the message reporting time, whether the message is successfully reported, the message reporting time and other information. Based on this, if the message reporting record records that the message has been successfully reported for the search sequence number, it can be determined that the slave site has successfully reported a site search confirmation message for the search sequence number.
[0151] In this embodiment, for the message reporting record generated for the first time after the slave site reports the site search confirmation message, since the message reporting record generated for the first time does not record whether the message from the site is successfully reported, it is not possible to directly judge whether the slave site has successfully reported the message based on the message reporting record. At this time, it is necessary to judge whether the slave site has successfully reported the message in combination with the random number list. Another implementation method for determining whether the slave site has successfully reported the message is: judging whether the random number included in the message reporting record exists in the random number list; if the random number included in the reporting record exists in the random number list, it is determined that the slave site has successfully reported the site search confirmation message for the search sequence number; if the random number included in the reporting record does not exist in the random number list, it is determined that the slave site has not successfully reported the site search confirmation message for the search sequence number.
[0152] Specifically, if the slave site stores a message report record, it is also necessary to determine whether the master site has successfully received the report from the slave site, that is, it is necessary to compare the random number contained in the message report record with the random number list in the site search request message to determine whether the random number contained in the message report record exists in the random number list. If the random number contained in the report record exists in the random number list, it means that the slave site has successfully reported the site search confirmation message in this round of search, and does not need to report again in this search. If the random number contained in the report record does not exist in the random number list, it means that the slave site has not successfully reported the site search confirmation message in this round of search, and needs to report in this search.
[0153] It should be noted that if the master site fails or loses power and needs to be restarted, the site search request message sent by the master site may not carry the random number list after the master site is restarted. At this time, the master site requires the reported site to stop reporting. After receiving the site search request message, the slave site does not find its own random number in the sent site search request message, but has recorded the current search sequence number in the message reporting record, indicating that the slave site has successfully reported, and the slave site will not report again.
[0154] The above technical solution specifies the steps of determining whether the slave site has successfully reported the site search confirmation message based on the search sequence number, and provides a basis for subsequently determining whether the slave site should report.
[0155] S404: If the slave site meets the reporting restriction condition and has not successfully reported the site search confirmation message for the search sequence number, the sum of the random number generated by the slave site and the data session protocol address of the slave site is used as a random number seed.
[0156] In this embodiment, if the slave site meets the reporting restriction conditions and has not successfully reported the site search confirmation message for the search sequence number, after generating a random number, the slave site uses the sum of the generated random number and the data dialogue protocol address (such as Modbus) of the slave site as a random number seed, and the random number seed is used for the subsequent generation of a random reporting time.
[0157] S405: Generate a random reporting time for the slave site within the response interval according to the random number seed.
[0158] In this embodiment, the response interval can be specifically understood as a specified time range that is allowed for the slave station to report. Due to the characteristics of the PLC carrier, if multiple stations send messages at the same time, message conflicts will occur, resulting in the inability to correctly receive the messages. By setting the response interval, each slave station will select a random time within the specified time range to report, avoiding message conflicts.
[0159] Continuing with the above description, after the random number seed is determined, a random reporting time is generated within the response interval in the site search request message sent by the primary site to avoid site search confirmation message reporting conflicts as much as possible.
[0160] S406: Report a site search confirmation message to the primary site based on the random reporting time.
[0161] The site search confirmation message includes a random number generated from the site.
[0162] It should be noted that in this search, each slave site that needs to report will determine the random number seed of the slave site, generate a random reporting time based on the random number seed of the slave site, and report the site search confirmation message based on the random reporting time. The slave site reports the site search confirmation message based on the random reporting time generated by the random number, which can effectively reduce the probability of message conflicts.
[0163] S407: Otherwise, do not report the site search confirmation message to the primary site.
[0164] The above technical solution specifies the steps of whether the slave site reports in this search, and the steps of reporting the site search confirmation message to the master site. Whether the slave site needs to report to the master site is determined based on the reporting restriction conditions and whether it has been successfully reported. For the slave site that has successfully reported, it will no longer report, making the entire site information search process a convergence process, improving the search efficiency. And considering that in PLC communication, due to the characteristics of the PLC carrier, if multiple sites send messages at the same time, message conflicts will occur, resulting in the inability to correctly receive the messages. The above technical solution, based on the random time generated by random numbers, reports the site search confirmation message, which can effectively reduce the probability of message conflicts.
[0165] Exemplarily, in order to more clearly describe the site information search method provided by the embodiment of the present invention, how to perform site information search in a certain application scenario is described as an example. Figure 5 This is an example flow chart of a site information search method in a certain application scenario provided by the fourth embodiment of the present invention. The application scenario is: an existing station area includes a master site and an estimated 200 slave sites, and the master site needs to search for information of the 200 slave sites. Figure 5 As shown, the execution process of the site information search method can be described as:
[0166] S1. The master site broadcasts a site search request message and starts the site search with the search sequence number 01. The proposed response interval is 2000ms, that is, each site is expected to take 10ms. The reporting restriction condition is that the reported site will not be reported again.
[0167] S2. Report after receiving the site search request message from the site.
[0168] S3. Due to message conflict, the master site receives a random number of site search confirmation messages from 100 slave sites.
[0169] S4. After the search time ends, the master site sends a site search request message with the search sequence number 01 again with the same parameters. The response interval is changed to 1000ms, and it carries the random numbers reported by the 100 slave sites in the previous search.
[0170] The same parameters refer to the same reporting restriction conditions, search sequence numbers and other parameters.
[0171] S5. The slave site receives the site search request message with the search sequence number 01 sent again by the master site. 100 slave sites match the reported random number and no longer report. The remaining sites execute the normal reporting process.
[0172] S6. This time the master site received random numbers from 80 slave sites, but it is still expected that 20 slave sites have not reported successfully. Therefore, the master site starts the site search again with search sequence number 01, changes the response interval to 200ms, and carries the random numbers reported by the 180 slave sites in the previous two searches.
[0173] S7. The slave site receives the search command with sequence number 01 sent again by the master site. 180 sites match the reported random number and no longer report. The remaining sites execute the normal reporting process.
[0174] S8. This time the master site received random numbers from 18 slave sites, and there were 2 expected slave sites that had not reported. The master site started site search again with search sequence number 01, the response interval was changed to 20ms, and carried the random numbers reported by 198 slave sites in the previous three searches.
[0175] S9. The slave site receives the search command with sequence number 01 sent again by the master site. 198 sites match the reported random number and no longer report. The remaining sites execute the normal reporting process.
[0176] S10. The master site does not receive a report from the slave site this time, and continues to send site search request messages. If no report from the slave site is received three times in a row, the master site ends the site search process with the search sequence number 01.
[0177] Embodiment 5
[0178] Figure 6 FIG. 1 is a schematic diagram of a structure of a site information search device provided in Embodiment 5 of the present invention. The device is applicable to the case of searching for site information. The site information search device can be integrated in a main site, such as Figure 6As shown, the device includes: a message broadcast module 51, a confirmation message receiving module 52, an interval updating module 53 and a message updating module 54; wherein,
[0179] The message broadcast module 51 is used to broadcast a site search request message, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by the slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number;
[0180] The confirmation message receiving module 52 is used to receive the site search confirmation message reported by the slave site and update the random number list. The slave site that reports the site search confirmation message is a slave site that meets the reporting restriction condition and has not successfully reported the site search confirmation message for the search sequence number;
[0181] The interval updating module 53 is used to update the response interval when the current search time exceeds the response interval;
[0182] The message updating module 54 is used to obtain an updated site search request message according to the updated random number list and the response interval, and return to continue to execute the step of broadcasting the site search request message until no site search confirmation message is received within the set search times, and then stop searching.
[0183] In the above technical solution, the master site broadcasts a site search request message to search for slave sites, and receives a site search confirmation message reported by the slave site, and realizes automatic acquisition of site information through the master site search and slave site reporting. In addition, the site information search process is a multiple search, and the number of slave sites searched each time will be less than the number of the previous search. Since the number of slave sites that need to be reported is reduced, the entire site information search process converges; at the same time, the response interval of each search is updated after each search, so that the time interval reported by the slave site is gradually reduced, further convergence of the entire site information search, and improved search efficiency.
[0184] Optionally, the confirmation message receiving module 52 is specifically configured to:
[0185] receiving a site search confirmation message reported by a site and extracting a random number contained in the site search confirmation message;
[0186] Add a random number to the random number list.
[0187] Optionally, the message updating module 54 is specifically configured to:
[0188] When the current search time exceeds the response interval, the response interval is shortened according to the estimated number of slave sites that have not been successfully reported.
[0189] Optionally, the reporting restriction condition includes at least one of: only allowing unconnected sites to report, only allowing this site to report, only allowing non-site sites to report, only allowing unreported sites to report, or only allowing sites with link quality higher than a set value to report.
[0190] The site information search device provided in the embodiment of the present invention can execute the site information search method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0191] Embodiment 6
[0192] Figure 7 Schematic diagram of the structure of a site information search device provided in Embodiment 6 of the present invention. The device is applicable to the case of searching for site information. The site information search device can be integrated in a slave site, such as Figure 7 As shown, the device includes: a request message receiving module 61, a reporting judgment module 62, a message reporting module 63 and a message non-reporting module 64; wherein,
[0193] The request message receiving module 61 is used to receive the site search request message broadcast by the master site, the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition and a random number list, the random number list includes the random numbers generated by the slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number;
[0194] A reporting judgment module 62, used to determine whether the slave site meets the reporting restriction condition and has not successfully reported the site search confirmation message for the search sequence number;
[0195] A message reporting module 63, configured to report a site search confirmation message to the master site if the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number, wherein the site search confirmation message includes a random number generated by the slave site;
[0196] The message non-reporting module 64 is used for not reporting the site search confirmation message to the main site otherwise.
[0197] In the above technical solution, the master site broadcasts a site search request message to search for the slave site, and the slave site determines whether it needs to report in this search. If the slave site meets the reporting restriction conditions and has not successfully reported the site search confirmation message for the search sequence number, it reports the site search confirmation message to the master site. The automatic acquisition of site information is achieved by the master site search and the slave site report. In addition, the process of site information search is multiple searches, and the number of slave sites searched each time will be less than the number of the previous search. Since the number of slave sites that need to be reported is reduced, the whole process of site information search is converged, and the search efficiency is improved.
[0198] Optionally, the reporting judgment module 62 includes:
[0199] A first judgment unit, used to determine whether the slave site meets the reporting restriction condition;
[0200] The second judgment unit is used to determine whether the slave site has successfully reported a site search confirmation message for the search sequence number according to the random number list included in the site search request message if the slave site meets the reporting restriction condition.
[0201] Optionally, the first judgment unit is specifically configured to:
[0202] If the reporting restriction condition is to allow only sites that are not connected to the network to report, when the slave site is not connected to the network, the reporting restriction condition is met, and when the slave site is connected to the network, the reporting restriction condition is not met;
[0203] If the reporting restriction condition is to allow only this website to report, when the network parameters of the slave site are the same as the network parameters included in the site search request message, the reporting restriction condition is met; when the network parameters of the slave site are different from the network parameters included in the site search request message, the reporting restriction condition is not met;
[0204] If the reporting restriction condition is to allow only non-site sites to report, when the network parameters of the slave site are different from the network parameters included in the site search request message, the reporting restriction condition is met; when the network parameters of the slave site are the same as the network parameters included in the site search request message, the reporting restriction condition is not met;
[0205] If the reporting restriction condition is to allow only unreported sites to report, when the slave site fails to report successfully, the reporting restriction condition is met, and when the slave site successfully reports, the reporting restriction condition is not met;
[0206] If the reporting restriction condition is to only allow sites with link quality higher than the set link quality to report, when the link quality of the slave site is higher than the set link quality, the reporting restriction condition is met; when the link quality of the slave site is lower than or equal to the set link quality, the reporting restriction condition is not met.
[0207] Optionally, the second judgment condition is specifically used for:
[0208] Determine whether there is a message reporting record stored for the search sequence number;
[0209] If no message reporting record is stored, it is determined that the slave site has not successfully reported a site search confirmation message for the search sequence number;
[0210] If a message reporting record is stored, it is determined whether the slave site has successfully reported a site search confirmation message for the search sequence number according to the message reporting record and / or the random number list.
[0211] Optionally, the device further includes a random number generation module, which is specifically used to:
[0212] Generate a random number for the slave site for the search sequence number;
[0213] Determine whether the random number from the site exists in the random number list;
[0214] If the random number of the slave site exists in the random number list, return to re-execute the step of generating the random number of the slave site until the generated random number of the slave site does not exist in the random number list.
[0215] Optionally, the device further includes a record generating module, which is specifically used to:
[0216] Generate and store message reporting records based on the search sequence number and the random number generated from the site;
[0217] When receiving the site search confirmation message again, determine whether the random number exists in the random number list of the site search request message;
[0218] If it exists, the site reporting information that has been successfully reported from the site will be updated to the message reporting record;
[0219] If not, the process returns to re-execute the step of determining whether the random number exists in the random number list of the site search request message when the site search confirmation message is received again.
[0220] Optionally, the reporting judgment module 62 is specifically configured to:
[0221] The sum of the random number generated from the site and the data session protocol address from the site is used as a random number seed;
[0222] Generate a random reporting time for the slave station within the response interval based on the random number seed;
[0223] Report a site search confirmation message to the primary site based on the random reporting time.
[0224] The site information search device provided in the embodiment of the present invention can execute the site information search method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0225] Embodiment 7
[0226] Figure 8 A schematic diagram of the structure of a primary site provided for Embodiment 7 of the present invention. The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0227] like Figure 8 As shown, the master site 70 includes at least one processor 71, and a memory connected to the at least one processor 71, such as a read-only memory (ROM) 72, a random access memory (RAM) 73, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 71 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 72 or the computer program loaded from the storage unit 78 to the random access memory (RAM) 73. In the RAM 73, various programs and data required for the operation of the master site 70 can also be stored. The processor 71, the ROM 72, and the RAM 73 are connected to each other through a bus 74. An input / output (I / O) interface 75 is also connected to the bus 74.
[0228] A number of components in the main site 70 are connected to the I / O interface 75, including: an input unit 76, such as a keyboard, a mouse, etc.; an output unit 77, such as various types of displays, speakers, etc.; a storage unit 78, such as a disk, an optical disk, etc.; and a communication unit 79, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 79 allows the main site 70 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0229] The processor 71 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 71 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 71 executes the various methods and processes described above, such as the site information search method.
[0230] In some embodiments, the site information search method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 78. In some embodiments, part or all of the computer program may be loaded and / or installed on the master site 70 via the ROM 72 and / or the communication unit 79. When the computer program is loaded into the RAM 73 and executed by the processor 71, one or more steps of the site information search method described above may be performed. Alternatively, in other embodiments, the processor 71 may be configured to perform the site information search method in any other appropriate manner (e.g., by means of firmware).
[0231] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0232] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0233] Embodiment 8
[0234] Fig. 9 A schematic diagram of the structure of a slave station provided for Embodiment 8 of the present invention. The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0235] like Fig. 9 As shown, the slave station 80 includes at least one processor 81, and a memory connected to the at least one processor 81, such as a read-only memory (ROM) 82, a random access memory (RAM) 83, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 81 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 82 or the computer program loaded from the storage unit 88 to the random access memory (RAM) 83. In the RAM 83, various programs and data required for the operation of the slave station 80 can also be stored. The processor 81, the ROM 82, and the RAM 83 are connected to each other through a bus 84. An input / output (I / O) interface 85 is also connected to the bus 84.
[0236] A number of components in the slave station 80 are connected to the I / O interface 85, including: an input unit 86, such as a keyboard, a mouse, etc.; an output unit 87, such as various types of displays, speakers, etc.; a storage unit 88, such as a disk, an optical disk, etc.; and a communication unit 89, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 89 allows the slave station 80 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0237] The processor 81 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 81 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 81 executes the various methods and processes described above, such as the site information search method.
[0238] In some embodiments, the site information search method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 88. In some embodiments, part or all of the computer program may be loaded and / or installed on the slave station 80 via the ROM 82 and / or the communication unit 89. When the computer program is loaded into the RAM 83 and executed by the processor 81, one or more steps of the site information search method described above may be performed. Alternatively, in other embodiments, the processor 81 may be configured to perform the site information search method in any other appropriate manner (e.g., by means of firmware).
[0239] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0240] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0241] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0242] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0243] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0244] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0245] Embodiment 9
[0246] Fig.10 This is a schematic diagram of the structure of a site information search system provided by Embodiment 9 of the present invention. Fig.10 As shown, the site information search system includes the master site described in the seventh embodiment and the slave sites described in the eighth embodiment, and each slave site is respectively recorded as slave site 1, slave site 2, ..., slave site n.
[0247] The site information search system provided by the embodiment of the present invention can execute the site information search method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0248] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0249] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A site information search method, characterized in that: Applied to the primary site, the method comprises: Broadcasting a site search request message, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number; receiving a site search confirmation message reported by a slave site and updating the random number list, wherein the slave site that reports the site search confirmation message is a slave site that meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number; When the current search time exceeds the response interval, updating the response interval; According to the updated random number list and the response interval, an updated site search request message is obtained, and the step of broadcasting the site search request message is returned to continue until no site search confirmation message is received within the set search times, and then the search is stopped.
2. The method according to claim 1, characterized in that The receiving a site search confirmation message reported by a site and updating the random number list includes: receiving the site search confirmation message reported by the site and extracting the random number contained in the site search confirmation message; Add the random number to the random number list.
3. The method according to claim 1, characterized in that When the current search time exceeds the response interval, updating the response interval includes: When the current search time exceeds the response interval, the response interval is shortened according to the estimated number of slave sites that have not reported successfully.
4. The method according to claim 1, characterized in that: The reporting restriction condition includes at least one of: only allowing unconnected sites to report, only allowing this site to report, only allowing non-site sites to report, only allowing unreported sites to report, or only allowing sites with link quality higher than a set value to report.
5. A site information search method, characterized in that: Applied to a slave site, the method comprises: Receive a site search request message broadcast by the master site, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number; Determine whether the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number; If the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number, reporting a site search confirmation message to the master site, wherein the site search confirmation message includes a random number generated by the slave site; Otherwise, no site search confirmation message is reported to the primary site.
6. The method according to claim 5, characterized in that The determining whether the slave site meets the reporting restriction condition and the site search confirmation message has not been successfully reported for the search sequence number includes: Determine whether the slave site meets the reporting restriction condition; If the slave site meets the reporting restriction condition, it is determined whether the slave site has successfully reported a site search confirmation message for the search sequence number according to the random number list included in the site search request message.
7. The method according to claim 6, characterized in that The determining whether the slave site meets the reporting restriction condition includes: If the reporting restriction condition is that only sites not connected to the network are allowed to report, when the slave site is not connected to the network, the reporting restriction condition is met, and when the slave site is connected to the network, the reporting restriction condition is not met; If the reporting restriction condition is that only this website is allowed to report, when the network parameters of the slave site are the same as the network parameters included in the site search request message, the reporting restriction condition is met; when the network parameters of the slave site are different from the network parameters included in the site search request message, the reporting restriction condition is not met; If the reporting restriction condition is that only non-website sites are allowed to report, when the network parameters of the slave site are different from the network parameters included in the site search request message, the reporting restriction condition is met; when the network parameters of the slave site are the same as the network parameters included in the site search request message, the reporting restriction condition is not met; If the reporting restriction condition is to allow only unreported stations to report, when the slave station fails to report successfully, the reporting restriction condition is met, and when the slave station has successfully reported, the reporting restriction condition is not met; If the reporting restriction condition is to only allow sites with link quality higher than the set link quality to report, when the link quality of the slave site is higher than the set link quality, the reporting restriction condition is met; when the link quality of the slave site is lower than or equal to the set link quality, the reporting restriction condition is not met.
8. The method according to claim 6, characterized in that The step of determining, according to the random number list included in the site search request message, whether the slave site has successfully reported a site search confirmation message for the search sequence number comprises: Determining whether a message reporting record for the search sequence number is stored; If the message reporting record is not stored, determining that the slave site has not successfully reported a site search confirmation message for the search sequence number; If the message reporting record is stored, it is determined whether the slave site has successfully reported a site search confirmation message for the search sequence number according to the message reporting record and / or the random number list.
9. The method according to claim 8, characterized in that If the slave site does not store the message reporting record, the method further includes: Generate a random number from the site for the search sequence number; Determine whether the random number of the slave site exists in the random number list; If the random number of the slave site exists in the random number list, return to re-execute the step of generating the random number of the slave site until the generated random number of the slave site does not exist in the random number list.
10. The method according to claim 5, characterized in that After reporting the site search confirmation message to the primary site, the method further includes: Generate and store a message reporting record according to the search sequence number and the random number generated from the site; When receiving the site search confirmation message again, determining whether the random number exists in the random number list of the site search request message; If it exists, the site reporting information that has been successfully reported from the site will be updated to the message reporting record; If not, the process returns to re-execute the step of determining whether the random number exists in the random number list of the site search request message when the site search confirmation message is received again.
11. The method according to claim 5, characterized in that The reporting of the site search confirmation message to the primary site includes: The sum of the random number generated from the site and the data session protocol address from the site is used as a random number seed; Generating a random reporting time from the station within the response interval according to the random number seed; A site search confirmation message is reported to the primary site based on the random reporting time.
12. A site information search device, characterized in that: Integrated in the main site, the device comprises: A message broadcast module, used for broadcasting a site search request message, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by the slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number; A confirmation message receiving module, used for receiving a site search confirmation message reported by a slave site and updating the random number list, wherein the slave site that reports the site search confirmation message is a slave site that meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number; An interval updating module, used for updating the response interval when the current search time exceeds the response interval; The message update module is used to obtain an updated site search request message according to the updated random number list and the response interval, and return to continue the step of broadcasting the site search request message until no site search confirmation message is received within the set search times, and then stop the search.
13. A site information search device, characterized in that: Integrated in a slave station, the device comprises: A request message receiving module, used to receive a site search request message broadcast by a master site, wherein the site search request message includes a search sequence number, network parameters, a response interval, a reporting restriction condition, and a random number list, wherein the random number list includes random numbers generated by slave sites that have been successfully reported, and each slave site generates a random number only once corresponding to the search sequence number; A reporting judgment module, used to determine whether the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number; A message reporting module, configured to report a site search confirmation message to the master site if the slave site meets the reporting restriction condition and has not successfully reported a site search confirmation message for the search sequence number, wherein the site search confirmation message includes a random number generated by the slave site; The message non-reporting module is used for not reporting the site search confirmation message to the main site otherwise.
14. A primary site, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the site information search method according to any one of claims 1 to 4.
15. A slave station, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the site information search method according to any one of claims 5 to 11.
16. A site information search system, characterized in that: include: A master station as claimed in claim 14 and a slave station as claimed in claim 15.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the site information search method according to any one of claims 1 to 11 when executed.
Citation Information
Cited By
Slave device address acquisition method and system
CN120811882A
A method and system for obtaining a device address
CN120811882B