CN111083016A - Polling table processing method and device, storage medium and equipment - Google Patents
Polling table processing method and device, storage medium and equipment Download PDFInfo
- Publication number
- CN111083016A CN111083016A CN201911389960.0A CN201911389960A CN111083016A CN 111083016 A CN111083016 A CN 111083016A CN 201911389960 A CN201911389960 A CN 201911389960A CN 111083016 A CN111083016 A CN 111083016A
- Authority
- CN
- China
- Prior art keywords
- polling
- information corresponding
- polling list
- list
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000000034 method Methods 0.000 claims abstract description 34
- 238000004891 communication Methods 0.000 claims description 28
- 230000004044 response Effects 0.000 claims description 19
- 230000008569 process Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 239000002699 waste material Substances 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
- H04L43/103—Active monitoring, e.g. heartbeat, ping or trace-route with adaptive polling, i.e. dynamically adapting the polling rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the application provides a polling list processing method and device, a storage medium and equipment, wherein the method comprises the following steps: acquiring header information corresponding to a first polling list stored in slave station equipment; acquiring head information corresponding to a second polling list stored by the master station equipment; determining whether the header information corresponding to the second polling list is consistent with the header information corresponding to the first polling list; if the header information corresponding to the second polling list is inconsistent with the header information corresponding to the first polling list, acquiring request configuration information corresponding to the first polling list, wherein the header information corresponding to the polling list comprises: the updating count value and the effective request number corresponding to the polling list, and the request configuration information corresponding to the polling list comprises: a request for polling by the master station device; and updating the second polling list based on the request configuration information corresponding to the first polling list and the head information corresponding to the first polling list to obtain the updated second polling list. Therefore, the polling list of the master station equipment can be automatically updated.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a polling list processing method and apparatus, a storage medium, and a device.
Background
The polling protocol is a communication protocol widely used in the field of industrial automation, and common industrial automation field polling protocols include: modbus, IEC60870-5-101, IEC60870-5-103, and the like. The polling protocol is typically a bus-type (bus) protocol, such as the Modbus protocol, in which only one Master station (Master) device can initiate a transmission at a time, which may also be referred to herein as a poll or Request (Request), wherein the polling is referred to as polling, and the Slave station (Slave) device responds accordingly based on the data provided by the Master station device. Therefore, in a polling protocol, such as a Modbus protocol, only the master device has the right to initiate a Request, and the slave device can send a Response message (Response) to the master device only after receiving the Request. In other words, in the Modbus protocol, a slave can never actively upload any messages to the master.
However, although a request is transmitted from the master device to the slave device according to the polling list (also referred to as a request list), since the slave device is a data provider, the slave device may refuse to provide data requested by the master device when the request transmitted from the master device does not coincide with the request in the polling list of the slave device. For example, when the request Q1 sent by the master device includes: the start address is 0 and the number is 125, and the slave device only includes: when the request with the starting address of 0 and the number of 121 provides data, it is obvious that the data address in the request sent by the master station device exceeds the data address range that can be provided by the slave station device, at this time, the slave station device replies an exception response ER1, and the data segment part of the exception response ER1 only contains one byte of exception code 2, which indicates that the data address overflows.
In practical applications, the polling list of the slave station device often changes along with changes in the requirements, and therefore, in order to avoid resource waste, it is necessary to provide a method for enabling the master station device to automatically update the polling list of the master station device.
Disclosure of Invention
In view of this, embodiments of the present application provide a polling list processing method and apparatus, a storage medium, and a device, which can implement automatic update of a polling list of a master device.
The embodiment of the application mainly provides the following technical scheme:
in a first aspect, an embodiment of the present application provides a polling list processing method, where the method includes: acquiring header information corresponding to a first polling table stored in slave station equipment, wherein the header information corresponding to the first polling table comprises: the updated count value corresponding to the first polling list and the effective request number corresponding to the first polling list; acquiring head information corresponding to a second polling table stored by the master station device, wherein the head information corresponding to the second polling table comprises: the updated count value corresponding to the second polling list and the effective request number corresponding to the second polling list; determining whether the header information corresponding to the second polling table is consistent with the header information corresponding to the first polling table; if the header information corresponding to the second polling table is inconsistent with the header information corresponding to the first polling table, obtaining request configuration information corresponding to the first polling table, where the request configuration information corresponding to the first polling table includes: a request for polling by the master station device; and updating the second polling list based on the request configuration information corresponding to the first polling list and the head information corresponding to the first polling list to obtain the updated second polling list.
In a second aspect, an embodiment of the present application provides a polling list processing apparatus, where the apparatus includes: a first obtaining unit, configured to obtain header information corresponding to a first polling table stored in a slave device, where the header information corresponding to the first polling table includes: the updated count value corresponding to the first polling list and the effective request number corresponding to the first polling list; a second obtaining unit, configured to obtain header information corresponding to a second polling table stored by a master station device, where the header information corresponding to the second polling table includes: the updated count value corresponding to the second polling list and the effective request number corresponding to the second polling list; a first determining unit, configured to determine whether header information corresponding to the second polling table is consistent with header information corresponding to the first polling table; a third obtaining unit, configured to obtain request configuration information corresponding to the first polling table if the first determining unit determines that the header information corresponding to the second polling table is inconsistent with the header information corresponding to the first polling table, where the request configuration information corresponding to the first polling table includes: a request for polling by the master station device; and the first updating unit is used for updating the second polling list based on the request configuration information corresponding to the first polling list and the head information corresponding to the first polling list to obtain the updated second polling list.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where the storage medium includes a stored program, and when the program runs, the computer device in which the storage medium is located is controlled to execute the steps of the polling list processing method in the foregoing embodiment.
In a fourth aspect, an embodiment of the present application provides a computer device, where the computer device includes: at least one processor; and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform the steps of the polling list processing method in the above embodiments.
After acquiring the header information corresponding to the first polling list stored in the slave station device, the polling list processing method and apparatus, the storage medium, and the device provided in the embodiment of the application, where the header information corresponding to the first polling list includes: the update count value corresponding to the first polling table and the number of valid requests corresponding to the first polling table can obtain the header information corresponding to the second polling table stored by the master station device, where the header information corresponding to the second polling table includes: updating the count value corresponding to the second polling list and the effective request number corresponding to the second polling list; then, whether the header information corresponding to the second polling list is consistent with the header information corresponding to the first polling list is determined; next, if the header information corresponding to the second polling table is inconsistent with the header information corresponding to the first polling table, obtaining request configuration information corresponding to the first polling table, where the request configuration information corresponding to the first polling table includes: a request for polling by the master station device; and finally, updating the second polling list based on the request configuration information corresponding to the first polling list and the head information corresponding to the first polling list to obtain the updated second polling list. Therefore, when the polling list stored by the slave station equipment is changed, the master station equipment can automatically update the polling list stored by the master station equipment, manual operation is not needed, and waste of resources is reduced.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. Other advantages of the present application may be realized and attained by the instrumentalities and combinations particularly pointed out in the specification and the drawings.
Drawings
The accompanying drawings are included to provide an understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the examples serve to explain the principles of the disclosure and not to limit the disclosure.
FIG. 1 is a first flowchart illustrating a polling list processing method according to an embodiment of the present application;
FIG. 2 is a second flowchart illustrating a polling list processing method according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a polling list processing apparatus in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The embodiment of the application provides a polling list processing method. Can be applied to the master station equipment. Fig. 1 is a first schematic flowchart of a polling list processing method in an embodiment of the present application, and referring to fig. 1, the polling list processing method may include:
step S101: acquiring header information corresponding to a first polling list stored in slave station equipment;
step S102: acquiring head information corresponding to a second polling list stored by the master station equipment;
step S103: determining whether the header information corresponding to the second polling list is consistent with the header information corresponding to the first polling list;
if the header information corresponding to the second polling table does not match the header information corresponding to the first polling table, steps S104 to S105 may be executed.
Step S104: acquiring request configuration information corresponding to the first polling list;
step S105: and updating the second polling list based on the request configuration information corresponding to the first polling list and the head information corresponding to the first polling list to obtain the updated second polling list.
Here, the polling table may also be referred to as a request table, a request configuration table, a configuration table, or the like.
In this embodiment of the present application, the first polling list may be implemented by two parts, namely, a Request Configuration Block (RCB) and an RCB header (RCBHeader) corresponding to the Request Configuration Block (RCB).
In practical applications, the slave device provides a request configuration area for the master device to access. The request configuration zone and its corresponding RCB header are maintained by the slave device. For example, the request configuration area corresponding to the first polling table may store only requests that can be polled by the master station device, such as requests with code 1, 2, 3, 4 of function code in Modbus protocol.
Specifically, the RCB stores request configuration information corresponding to the polling table, and the RCB header stores header information corresponding to the polling table. Here, the request configuration information corresponding to the first polling table includes: a request for polling by the master station device; the header information corresponding to the first polling table includes: the updating count value corresponding to the first polling list and the effective request number corresponding to the first polling list. The request configuration information corresponding to the second polling table includes: a request for polling by the master station device; the header information corresponding to the second polling table includes: the updated count value corresponding to the second polling list and the effective request number corresponding to the second polling list.
The RCB and RCBHeader will be described below by specific examples.
First, the RCB will be explained.
In practical applications, an RCB may be implemented by one or more request configuration units (RCBUnit). Each RCBUnit may be composed of one or more registers (registers), for example, of a size of 16 bits or 2 bytes long.
For example, referring to table 1, the RCB may be composed of n RCBUnit, and each RCBUnit has 3 registers, so that the RCB has 3n registers in total, i.e. 6n bytes, and n is a positive integer greater than or equal to 1. Wherein, the definition of RCBUnit can be as follows:
typedef{
Register FunctionCode;
Register StartingAddress;
Register QuantityofUnits;
}RCBUnit;
in the definition of RCBUnit, functional code indicates the function code of the request, StartingAddress indicates the start address of the request, and quantityofmits units indicate the number of coils (function codes 1, 2) or registers (function codes 3, 4) included in the request.
In practical applications, the update policy of the RCB in the first polling table of the slave device may be: the RCB is downloaded to the slave station device by the slave station downloading program together with the configuration file of the slave station device, so that the actual operation program on the slave station device is ensured to be consistent with the RCB.
TABLE 1RCB and RCBUnit structures
Second, RCBHeader is explained.
As an example, referring to table 2, the RCBHeader may be composed of one Register (Register), for example, the size of the Register is 16 bits or 2 bytes long, wherein the definition of the RCBHeader may be as follows:
typedef{
byte UpdateCounter;
byte QuantityofRequests;
}RCBHeader;
in the definition of RCBHeader, the UpdateCounter of the high byte indicates an update count value corresponding to the first polling table, that is, the update count value of the RCB, and the value range may be [0, 255], the first polling table is increased by 1 every time it is updated, the initial value of the UpdateCounter is 0, and when the value of the UpdateCounter is greater than 255, the first polling table is rolled back to 0; the low-byte QuantityofRequests indicate the number of valid requests corresponding to the first polling table, that is, the number of valid requests of the request configuration area, and the value range may be [1, 255 ].
TABLE 2RCBHeader structure
In practical application, the register of the RCBHeader is included in the polling list, that is, the master station device can obtain the latest value of the RCBHeader through normal polling, that is, the header information corresponding to the latest first polling list. In addition, because the RCBHeader only has the overhead of one register, and the register is the minimum communication unit of Modbus analog quantity, the influence of the RCBHeader on the polling efficiency can be ignored.
In practical application, the update policy of RCBHeader in the first polling list of the slave station device is as follows: when the RCB provided by the slave station equipment changes, the RCBHeader is updated after the RCB is updated. Wherein: firstly, setting QuantityofRequests as the actual number of requests in a new RCB; then, the value of UpdateCounter is increased by 1, and if the value of the new UpdateCounter is greater than 255, the value of UpdateCounter is set to 0.
In another embodiment of the present application, before step S101, the method may include: when the master station equipment is started, acquiring the head information corresponding to the second polling list and the request configuration information corresponding to the second polling list from the slave station equipment; and storing the head information corresponding to the second polling list and the request configuration information corresponding to the second polling list to obtain a second polling list.
As an example, when the second polling table is an initial polling table obtained by the master device (i.e. an updated polling table stored by the master device), the process of the master device obtaining the second polling table is as follows: and when the master station device is just started each time, the master station device firstly acquires the data in the RCBHeader and the data in the RCBUnit corresponding to the second polling table from the slave station device and respectively stores the data in the local storage space of the master station device.
In other embodiments of the present application, step S101 may include: and when the communication state between the master station device and the slave station device is detected to be changed from the communication interruption state to the communication connection state, the slave station device acquires the head information corresponding to the first polling table.
Specifically, the step of acquiring the header information corresponding to the first polling table from the slave device may include: sending a preset request message to the slave station equipment, wherein the content of the preset request message is predetermined between the slave station equipment and the master station equipment; and receiving a first response message sent by the slave station equipment, wherein the first response message at least carries the head information corresponding to the first polling list.
Here, the transition of the communication state between the master device and the slave device from the communication interrupted state to the communication connected state may mean that the station device and the slave device have been interrupted in communication and reconnected successfully.
As an example, when it is detected that the communication state between the master station device and the slave station device is changed from the communication interruption state to the communication connection state, the master station device first obtains the latest value RCBHNew of RCBHeader in the polling table stored by the slave station device, compares the RCBHNew with the latest value RCBHLast of RCBHeader in the polling table locally stored by the master station device, and if the RCBHNew and the rcbhead are not consistent, reads RCBUnit in the polling table stored by the slave station device and updates the RCBUnit in the polling table locally stored by the master station device, and then updates RCBHNew in RCBHLast of the master station device; if the two are consistent, neither RCBHLast nor RCBUnitLast in the polling list locally stored by the master station device needs to be updated.
As an example, the communication unit RCBHeader of the minimum Modbus analog quantity may be covered in one request in the polling list. At this time, the first acknowledgement message may carry header information corresponding to the first polling table.
As an example, RCBHeader and RCBUnit may be covered in one request, and the request is a regular request, that is, the header information and request configuration information corresponding to the polling table stored by the slave device are covered in one request. At this time, the first acknowledgement message may carry header information and request configuration information corresponding to the first polling table.
In a specific implementation process, the step S105 may include: and replacing the request configuration information corresponding to the second polling list with the request configuration information corresponding to the first polling list, and replacing the head information corresponding to the second polling list with the head information corresponding to the first polling list to obtain the updated second polling list.
As an example, in a second polling table stored by the master station device, replacing contents in RCBUnit in the second polling table with contents in RCBUnit in the first polling table; and in a second polling list stored by the primary station equipment, replacing the content in the RCBHeader in the second polling list with the content in the RCBHeader in the first polling list.
In another embodiment of the present application, after step S105, the method may include: acquiring a request to be sent from the updated second polling list; generating a request message to be sent based on a request to be sent; sending a request message to be sent to slave station equipment; receiving a second response message sent by the slave station equipment; when the second response message carries the head information corresponding to the third polling table and the request configuration information corresponding to the third polling table, determining whether the head information corresponding to the third polling table is consistent with the head information corresponding to the first polling table, and determining whether the request configuration information corresponding to the third polling table is consistent with the request configuration information corresponding to the first polling table; and if the head information corresponding to the third polling list is inconsistent with the head information corresponding to the first polling list and the request configuration information corresponding to the third polling list is inconsistent with the request configuration information corresponding to the first polling list, updating the updated second polling list based on the head information corresponding to the third polling list and the request configuration information corresponding to the third polling list.
As an example, when the polling table in the master device is updated, the normal polling communication mode may be entered. In this mode, it is not necessary to send a request to update the polling table, but when the latest value RCBHNew of RCBHeader in the polling table stored in the slave device is scanned, step S102 to step S105 are re-executed in a typed manner, and the updated polling table is updated again.
At this point, the process of updating the polling list of the master device is completed.
As can be seen from the above, in the polling list processing method provided in this embodiment of the present application, after the header information corresponding to the first polling list stored in the slave device is acquired, the header information corresponding to the first polling list includes: the update count value corresponding to the first polling list and the number of valid requests corresponding to the first polling list can acquire the header information corresponding to the second polling list stored by the master station device, wherein the header information corresponding to the second polling list includes: updating the count value corresponding to the second polling list and the effective request number corresponding to the second polling list; then, whether the header information corresponding to the second polling list is consistent with the header information corresponding to the first polling list is determined; next, if the header information corresponding to the second polling table is inconsistent with the header information corresponding to the first polling table, obtaining request configuration information corresponding to the first polling table, where the request configuration information corresponding to the first polling table includes: a request for polling by the master station device; and finally, updating the second polling list based on the request configuration information corresponding to the first polling list and the head information corresponding to the first polling list to obtain the updated second polling list. Therefore, when the polling list stored by the slave station equipment is changed, the master station equipment can automatically update the polling list stored by the master station equipment, manual operation is not needed, and waste of resources is reduced.
Based on the foregoing embodiments, an embodiment of the present application provides a polling list processing method, fig. 2 is a second flowchart of the polling list processing method in the embodiment of the present application, and as shown in fig. 2, the method may include the following implementation manners:
implementation mode 1: when the master station device is just started each time, a round of RCBHeader and RCBUnit is updated unconditionally and stored locally as RCBHLast and RCBUnitLast.
Implementation mode 2: after the master station device is interrupted in communication with the slave station device every time and is successfully reconnected, the master station device updates the latest value RCBHNew of the slave station device RCBHeader for one time, compares the RCBHNew with the latest value RCBHLast locally stored in the master station device, reads RCBUnit of the master station device and updates the RCBUnitLast if the RCBHNew and the RCBHLast are not consistent, and then updates the RCBHNew into the RCBHLast; if the two are consistent, neither RCBHLast nor RCBUnitLast needs to be updated.
Implementation mode 3: the master device enters a normal polling communication mode. The master station device sequentially reads a request from a locally stored polling table rcbuntlast as a request to be sent this time, then generates the request into a request message, and starts an overtime timer (sets an overtime time) after the request message is successfully sent. Next, if the master station device successfully receives the response message of the slave station device within the timeout period, the master station device processes the response message, and then the master station device enters a next sending standby state; if the master station device cannot successfully receive the response message of the slave station device within the timeout period, the master station device considers that the request fails, the master station device enters timeout processing (recording one transmission failure, and reconnecting the link when the continuous failure occurs), and then the master station device enters a next transmission standby state, and the master station device can complete polling and data updating on the slave station device in such a repeated way. In this mode there is no need to specifically send a request to update the RCB. Because some request contains slave station equipment RCBHeader, when the latest value RCBHNew of RCBHeader is scanned, the master-slave request consistency check and automatic synchronization can be completed by using the implementation mode 2.
As can be seen from the above, in the polling list processing method provided in the embodiment of the present application, RCBHeader and RCBUnit may be included in a request agreed in advance by the master and the slave, and a data portion (composed of a plurality of sequential registers) of the request is in an agreed format by the master and the slave in advance (as shown in tables 1 and 2 in the foregoing embodiment). The main station equipment automatically and dynamically updates the polling list by sending a request agreed by both parties in advance. Therefore, by the three implementation modes, the master station device can automatically update the stored polling list when the polling list stored by the slave station device is changed, the polling list of the master station device does not need to be manually updated, the waste of resources is reduced, the automation degree is improved, and the consistency of the master request and the slave request of the master station device and the slave station device is ensured.
Based on the same inventive concept, as an implementation of the above method, the embodiment of the present application provides a polling list processing apparatus. Fig. 3 is a schematic structural diagram of a polling list processing apparatus in an embodiment of the present application, and referring to fig. 3, the apparatus 30 may include: a first obtaining unit 301, configured to obtain header information corresponding to a first polling table stored in a slave device, where the header information corresponding to the first polling table includes: updating the count value corresponding to the first polling list and the effective request number corresponding to the first polling list; a second obtaining unit 302, configured to obtain header information corresponding to a second polling table stored by the master device, where the header information corresponding to the second polling table includes: updating the count value corresponding to the second polling list and the effective request number corresponding to the second polling list; a first determining unit 303, configured to determine whether header information corresponding to the second polling table is consistent with header information corresponding to the first polling table; a third obtaining unit 304, configured to obtain the request configuration information corresponding to the first polling table if the first determining unit determines that the header information corresponding to the second polling table is inconsistent with the header information corresponding to the first polling table, where the request configuration information corresponding to the first polling table includes: a request for polling by the master station device; the first updating unit 305 is configured to update the second polling table based on the request configuration information corresponding to the first polling table and the header information corresponding to the first polling table, and obtain the updated second polling table.
In other embodiments of the present application, the apparatus may further include: a fourth obtaining unit, configured to obtain, from the slave device, header information corresponding to the second polling table and request configuration information corresponding to the second polling table when the master device is started, where the request configuration information corresponding to the second polling table includes: a request for polling by the master station device; and the storage unit is used for storing the head information corresponding to the second polling list and the request configuration information corresponding to the second polling list to obtain the second polling list.
In this embodiment of the present application, a first obtaining unit, configured to obtain header information corresponding to a first polling table stored in a slave device, includes: and the first acquisition unit is used for acquiring the head information corresponding to the first polling list from the slave station equipment when detecting that the communication state between the master station equipment and the slave station equipment is changed from the communication interruption state to the communication connection state.
In this embodiment of the present application, a first obtaining unit, configured to obtain header information corresponding to a first polling table stored in a slave device, includes: the system comprises a first obtaining unit and a second obtaining unit, wherein the first obtaining unit is used for sending a preset request message to slave station equipment, and the content of the preset request message is predetermined between the slave station equipment and master station equipment; and receiving a first response message sent by the slave station equipment, wherein the first response message at least carries the head information corresponding to the first polling list.
In other embodiments of the present application, the apparatus may further include: a fifth obtaining unit, configured to obtain, from the updated second polling list, a request to be sent; the generating unit is used for generating a request message to be sent based on the request to be sent; the sending unit is used for sending the request message to be sent to the slave station equipment; the receiving unit is used for receiving a second response message sent by the slave station equipment; a second determining unit, configured to determine whether the header information corresponding to the third polling table is consistent with the header information corresponding to the first polling table and determine whether the request configuration information corresponding to the third polling table is consistent with the request configuration information corresponding to the first polling table when the second response packet carries the header information corresponding to the third polling table and the request configuration information corresponding to the third polling table; and the second updating unit is used for updating the updated second polling table based on the head information corresponding to the third polling table and the request configuration information corresponding to the third polling table if the second determining unit determines that the head information corresponding to the third polling table is inconsistent with the head information corresponding to the first polling table and the request configuration information corresponding to the third polling table is inconsistent with the request configuration information corresponding to the first polling table.
In this embodiment of the application, the first updating unit, configured to update the second polling table based on the request configuration information corresponding to the first polling table and the header information corresponding to the first polling table, to obtain the updated second polling table, includes: and the first updating unit is used for replacing the request configuration information corresponding to the second polling list with the request configuration information corresponding to the first polling list, and replacing the head information corresponding to the second polling list with the head information corresponding to the first polling list to obtain an updated second polling list.
Based on the same inventive concept, the embodiment of the application provides computer equipment. Fig. 4 is a schematic structural diagram of a computer device in an embodiment of the present application, and referring to fig. 4, the computer device 40 includes: at least one processor 41; and at least one memory 42, a bus 43 connected to the processor 41; wherein, the processor 41 and the memory 42 complete the communication with each other through the bus 43; processor 41 is configured to call program instructions in memory 42 to perform the steps of the polling list processing method in one or more of the embodiments described above.
Accordingly, based on the same inventive concept, embodiments of the present application further provide a processor, where the processor is configured to execute a program, where the program executes the steps of the polling list processing method in one or more embodiments described above.
The Processor may be implemented by a Central Processing Unit (CPU), a MicroProcessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like. The Memory may include volatile Memory in a computer readable medium, Random Access Memory (RAM), and/or nonvolatile Memory such as Read Only Memory (ROM) or Flash Memory (Flash RAM), and the Memory includes at least one Memory chip.
It should be noted that, in the embodiments of the present application, if the polling list processing in one or more embodiments is implemented in the form of a software functional module and sold or used as a stand-alone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof that contribute to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present application.
Accordingly, based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the computer device in which the storage medium is located is controlled to execute the steps of the polling list processing method in one or more embodiments described above.
Here, it should be noted that: the above description of the apparatus, computer device or computer-readable storage medium embodiments is similar to the description of the method embodiments above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus, the computer device or the computer-readable storage medium of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
The present application describes embodiments, but the description is illustrative rather than limiting and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or instead of any other feature or element in any other embodiment, unless expressly limited otherwise.
The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive concept as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive aspects to form yet another unique inventive aspect, as defined by the claims. Thus, it should be understood that any of the features shown and/or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not limited except as by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.
Further, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other orders of steps are possible as will be understood by those of ordinary skill in the art. Therefore, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Further, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Claims (10)
1. A method for polling list processing, the method comprising:
acquiring header information corresponding to a first polling table stored in slave station equipment, wherein the header information corresponding to the first polling table comprises: the updated count value corresponding to the first polling list and the effective request number corresponding to the first polling list;
acquiring head information corresponding to a second polling table stored by the master station device, wherein the head information corresponding to the second polling table comprises: the updated count value corresponding to the second polling list and the effective request number corresponding to the second polling list;
determining whether the header information corresponding to the second polling table is consistent with the header information corresponding to the first polling table;
if the header information corresponding to the second polling table is inconsistent with the header information corresponding to the first polling table, obtaining request configuration information corresponding to the first polling table, where the request configuration information corresponding to the first polling table includes: a request for polling by the master station device;
and updating the second polling list based on the request configuration information corresponding to the first polling list and the head information corresponding to the first polling list to obtain the updated second polling list.
2. The method of claim 1, wherein prior to said obtaining the header information corresponding to the first polling list stored by the secondary station device, the method further comprises:
when the master station device is started, obtaining, from the slave station device, header information corresponding to the second polling table and request configuration information corresponding to the second polling table, where the request configuration information corresponding to the second polling table includes: a request for polling by the master station device;
and storing the head information corresponding to the second polling list and the request configuration information corresponding to the second polling list to obtain the second polling list.
3. The method of claim 1, wherein the obtaining of the header information corresponding to the first polling list stored in the slave device comprises:
and when the communication state between the master station device and the slave station device is detected to be changed from a communication interruption state to a communication connection state, acquiring the header information corresponding to the first polling list from the slave station device.
4. The method of claim 3, wherein the obtaining the header information corresponding to the first polling list from the slave device comprises:
sending a preset request message to the slave station equipment, wherein the content of the preset request message is predetermined between the slave station equipment and the master station equipment;
and receiving a first response message sent by the slave station equipment, wherein the first response message at least carries header information corresponding to the first polling list.
5. The method of claim 1, wherein after the obtaining the updated second polling list, the method further comprises:
acquiring a request to be sent from the updated second polling list;
generating a request message to be sent based on the request to be sent;
sending the request message to be sent to the slave station equipment;
receiving a second response message sent by the slave station equipment;
when the second response message carries the header information corresponding to the third polling table and the request configuration information corresponding to the third polling table, determining whether the header information corresponding to the third polling table is consistent with the header information corresponding to the first polling table, and determining whether the request configuration information corresponding to the third polling table is consistent with the request configuration information corresponding to the first polling table;
and if the head information corresponding to the third polling list is inconsistent with the head information corresponding to the first polling list and the request configuration information corresponding to the third polling list is inconsistent with the request configuration information corresponding to the first polling list, updating the updated second polling list based on the head information corresponding to the third polling list and the request configuration information corresponding to the third polling list.
6. The method according to claim 1, wherein the updating the second polling table based on the request configuration information corresponding to the first polling table and the header information corresponding to the first polling table to obtain the updated second polling table comprises:
and replacing the request configuration information corresponding to the second polling list with the request configuration information corresponding to the first polling list, and replacing the head information corresponding to the second polling list with the head information corresponding to the first polling list to obtain the updated second polling list.
7. A polling list processing apparatus, comprising:
a first obtaining unit, configured to obtain header information corresponding to a first polling table stored in a slave device, where the header information corresponding to the first polling table includes: the updated count value corresponding to the first polling list and the effective request number corresponding to the first polling list;
a second obtaining unit, configured to obtain header information corresponding to a second polling table stored by a master station device, where the header information corresponding to the second polling table includes: the updated count value corresponding to the second polling list and the effective request number corresponding to the second polling list;
a first determining unit, configured to determine whether header information corresponding to the second polling table is consistent with header information corresponding to the first polling table;
a third obtaining unit, configured to obtain request configuration information corresponding to the first polling table if the first determining unit determines that the header information corresponding to the second polling table is inconsistent with the header information corresponding to the first polling table, where the request configuration information corresponding to the first polling table includes: a request for polling by the master station device;
and the first updating unit is used for updating the second polling list based on the request configuration information corresponding to the first polling list and the head information corresponding to the first polling list to obtain the updated second polling list.
8. The apparatus of claim 7, further comprising:
a fourth obtaining unit, configured to obtain, from the slave device, header information corresponding to the second polling table and request configuration information corresponding to the second polling table when the master device is started, where the request configuration information corresponding to the second polling table includes: a request for polling by the master station device;
and the storage unit is used for storing the head information corresponding to the second polling list and the request configuration information corresponding to the second polling list to obtain the second polling list.
9. A computer-readable storage medium, characterized in that the storage medium includes a stored program, wherein the program, when executed, controls a computer device on which the storage medium is located to execute the steps of the polling list processing method according to any one of claims 1 to 6.
10. A computer device, characterized in that the computer device comprises:
at least one processor;
and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus; the processor is configured to invoke program instructions in the memory to perform the steps of the polling list processing method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911389960.0A CN111083016B (en) | 2019-12-30 | 2019-12-30 | Polling table processing method and device, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911389960.0A CN111083016B (en) | 2019-12-30 | 2019-12-30 | Polling table processing method and device, storage medium and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111083016A true CN111083016A (en) | 2020-04-28 |
CN111083016B CN111083016B (en) | 2021-04-20 |
Family
ID=70319300
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911389960.0A Active CN111083016B (en) | 2019-12-30 | 2019-12-30 | Polling table processing method and device, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111083016B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113986803A (en) * | 2021-10-21 | 2022-01-28 | 山东云海国创云计算装备产业创新中心有限公司 | I2C bus control method, device and storage medium |
CN114399274A (en) * | 2021-12-24 | 2022-04-26 | 佛山市德力泰科技有限公司 | Ceramic production parameter management method, system, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07288532A (en) * | 1994-02-25 | 1995-10-31 | Meidensha Corp | Simultaneous multiple address communication method |
CN1433196A (en) * | 2002-01-18 | 2003-07-30 | 富士通株式会社 | Polling communication system and polling control method |
JP3800103B2 (en) * | 2002-02-18 | 2006-07-26 | 株式会社日立製作所 | Communication method and communication apparatus |
CN108009027A (en) * | 2017-11-23 | 2018-05-08 | 北京百度网讯科技有限公司 | Implementation method, device, equipment and the storage medium of queue message uniformity |
-
2019
- 2019-12-30 CN CN201911389960.0A patent/CN111083016B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07288532A (en) * | 1994-02-25 | 1995-10-31 | Meidensha Corp | Simultaneous multiple address communication method |
CN1433196A (en) * | 2002-01-18 | 2003-07-30 | 富士通株式会社 | Polling communication system and polling control method |
JP3800103B2 (en) * | 2002-02-18 | 2006-07-26 | 株式会社日立製作所 | Communication method and communication apparatus |
CN108009027A (en) * | 2017-11-23 | 2018-05-08 | 北京百度网讯科技有限公司 | Implementation method, device, equipment and the storage medium of queue message uniformity |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113986803A (en) * | 2021-10-21 | 2022-01-28 | 山东云海国创云计算装备产业创新中心有限公司 | I2C bus control method, device and storage medium |
CN113986803B (en) * | 2021-10-21 | 2024-05-28 | 山东云海国创云计算装备产业创新中心有限公司 | I2C bus control method, device and storage medium |
CN114399274A (en) * | 2021-12-24 | 2022-04-26 | 佛山市德力泰科技有限公司 | Ceramic production parameter management method, system, equipment and medium |
CN114399274B (en) * | 2021-12-24 | 2024-12-20 | 佛山市德力泰科技有限公司 | Ceramic production parameter management method, system, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN111083016B (en) | 2021-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107295080B (en) | Data storage method applied to distributed server cluster and server | |
CN103155492B (en) | Communication system and communicator | |
CN110649984B (en) | Clock synchronization method and device, computer storage medium and electronic equipment | |
CN110311847B (en) | Batch data transmission method and device | |
CN104462568A (en) | Data reconciliation method, device and system | |
US11271714B2 (en) | Time synchronization system, time master, management master, and time synchronization method | |
CN111083016B (en) | Polling table processing method and device, storage medium and equipment | |
CN110958302A (en) | File uploading method, user terminal, uploading management server and system | |
CN113721966A (en) | Node upgrading method and device, storage medium and electronic device | |
CN111273924B (en) | Software updating method and device | |
CN112565319B (en) | Transmission control method, network management server, base station and storage medium | |
JP6203821B2 (en) | Message processing method and control node between nodes of radio access network | |
CN113452770B (en) | Data synchronization method, device, computer equipment and storage medium | |
CN112491951B (en) | Request processing method, server and storage medium in peer-to-peer network | |
CN107820277B (en) | Parent node device for wireless network, terminal device and data transmission method thereof | |
CN110888892B (en) | Block synchronization method, device and storage medium | |
WO2020037607A1 (en) | Data transmission method and apparatus | |
WO2020094223A1 (en) | Lwm2m client state synchronization | |
CN112954133B (en) | Method, device, electronic device and storage medium for synchronizing node time | |
CN107171915B (en) | Communication protocol changing method and device | |
EP4207637A1 (en) | Time synchronization method and apparatus, device, and storage medium | |
CN116938712A (en) | Device upgrade method, device upgrade apparatus, and computer-readable storage medium | |
CN114143730B (en) | Signaling processing method, communication system, electronic device and storage medium | |
CN117354295A (en) | File distribution method, system equipment and storage medium based on Gossip protocol | |
CN110677356B (en) | Bus communication method, communication basic period determining method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211124 Address after: 100176 room 3412, floor 4, building 3, yard 2, Desheng Middle Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing Patentee after: Beijing Helishi system integration Co.,Ltd. Address before: 100176 courtyard 2, Disheng Middle Road, Daxing Economic and Technological Development Zone, Beijing Patentee before: BEIJING HOLLYSYS Co.,Ltd. |