CN115967754A - Industrial data acquisition method, device, equipment and storage medium - Google Patents
Industrial data acquisition method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115967754A CN115967754A CN202211674993.1A CN202211674993A CN115967754A CN 115967754 A CN115967754 A CN 115967754A CN 202211674993 A CN202211674993 A CN 202211674993A CN 115967754 A CN115967754 A CN 115967754A
- Authority
- CN
- China
- Prior art keywords
- data
- target data
- target
- value
- unique identification
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000004590 computer program Methods 0.000 claims description 15
- 238000004806 packaging method and process Methods 0.000 claims description 9
- 230000004044 response Effects 0.000 claims description 4
- 230000006854 communication Effects 0.000 description 22
- 238000004891 communication Methods 0.000 description 20
- 230000005540 biological transmission Effects 0.000 description 16
- 238000012790 confirmation Methods 0.000 description 6
- 238000007667 floating Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000012856 packing Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Computer And Data Communications (AREA)
Abstract
The application discloses an industrial data acquisition method, an industrial data acquisition device, an industrial data acquisition equipment and a storage medium, which relate to the technical field of computers and comprise the following steps: acquiring a data subscription request aiming at target data sent by a data receiver; responding to the data subscription request to send all data values of the target data and the universal unique identification code of the target data to the data receiver; acquiring a data updating request aiming at the target data, which is transmitted to the data transmitter by the data receiver based on the universal unique identification code; and determining a changed target data value in the target data by using the universal unique identification code in the data updating request, and sending the target data value to the data receiving party so that the data receiving party updates the target data based on the target data value. Thus, the changed data value can be accurately transmitted, and the load of the receiving side and the transmitting side and the load of the network can be reduced.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for acquiring industrial data.
Background
At present, real-time data in the industrial control field are transmitted periodically, in order to ensure data timeliness, the transmission period is generally 0.5 to 1 second, and the data transmission amount of a set of large-scale control system is hundreds of thousands of levels to millions of levels. Because the requirements for data quantity and data timeliness are high, a UDP (User Datagram Protocol) Protocol with high communication efficiency is widely used in the industrial control field, and data is published to a local area network in a broadcast or multicast mode.
In the prior art, after a data sending end packages data point information according to a certain format, the data sending end broadcasts or multicasts the data point information to a local area network once in each period, and the data sending end sends the period information carrying all data points each time. The receiving end is located in the same local area network, monitors the broadcast target port and receives data from the port. Because the real-time data is transmitted in a UDP broadcast or multicast manner, no connection is established during the transmission process, which may cause packet loss although the efficiency is higher. When packet loss occurs, the lost real-time value is filled again when only waiting for the next period of data transmission, and at the moment, the real-time data is lost by one beat, so that the historical data is incomplete, and breakpoints can occur in the historical trend. Moreover, the transmission in a broadcast or multicast mode of UDP causes a large amount of data transmission in the local area network, increases the network coincidence rate, and also causes the probability of UDP packet loss to be increased. Moreover, with the increase of the industrial control scale, the adoption of a complete data transmission mode will cause the loads of the data transmitting end and the data receiving end to gradually increase, and will also increase the network load.
Disclosure of Invention
In view of this, the present invention provides an industrial data acquiring method, an industrial data acquiring apparatus, an industrial data acquiring device, and a storage medium, which are capable of accurately transmitting changed real-time data, so as to reduce loads of a receiver and a transmitter and a network. The specific scheme is as follows:
in a first aspect, the present application discloses an industrial data acquisition method, which is applied to a data sender, and includes:
acquiring a data subscription request aiming at target data sent by a data receiver;
responding to the data subscription request to send all data values of the target data and the universal unique identification code of the target data to the data receiver;
acquiring a data updating request aiming at the target data, which is transmitted to the data transmitter by the data receiver based on the universal unique identification code;
and determining a changed target data value in all the data values of the target data by using the universal unique identification code in the data updating request, and sending the target data value to the data receiving party so that the data receiving party can correspondingly update the local target data based on the target data value.
Optionally, the sending all data values of the target data and the universal unique identifier of the target data to the data receiving side includes:
creating a universal unique identification code corresponding to the target data based on the data subscription request;
and sending all data values of the target data and the universal unique identification code to the data receiving party, and then storing the address characteristics of the target data and the universal unique identification code in a subscription queue.
Optionally, the determining, by using the universal unique identifier in the data update request, a changed target data value among all data values of the target data, and sending the target data value to the data receiving side includes:
judging whether the universal unique identification code in the data updating request exists in the subscription queue or not;
if the target data exists, the target data is searched based on the address characteristics corresponding to the universal unique identification code;
acquiring a changed target data value in all the data values of the target data; and packaging the target data value and then sending the target data value to the data receiver so that the data receiver can correspondingly update the local target data value by using the received target data value.
Optionally, after the target data value is packed and sent to the data receiver, the method further includes:
judging whether the data receiver successfully acquires the target data value;
and if not, skipping to the step of packaging the target data value and then sending the target data value to the data receiving party again until the data receiving party successfully acquires the target data value or the sending frequency of the target data value reaches a preset sending frequency threshold value.
Optionally, the method further includes:
traversing all the universal unique identification codes in the subscription queue based on a preset traversal rule and judging whether the universal unique identification codes meet a preset storage condition;
and if the universal unique identification code does not meet the preset storage condition, deleting the universal unique identification code and the address characteristics of the corresponding target data from the subscription queue.
In a second aspect, the present application discloses an industrial data acquisition method, which is applied to a data receiver, and includes:
sending a data subscription request aiming at target data to a data sender;
acquiring all data values of the target data and corresponding universal unique identification codes sent by the data sender after responding to the data subscription request;
transmitting a data updating request aiming at the target data to the data sending party by using the universal unique identification code so that the data sending party can determine a changed target data value in all the data values of the target data according to the universal unique identification code in the data updating request;
and acquiring the target data value sent by the data sender, and correspondingly updating the local target data based on the target data value.
In a third aspect, the present application discloses an industrial data acquiring apparatus, which is applied to a data sender, and includes:
a subscription request acquisition module, configured to acquire a data subscription request for target data sent by a data receiver;
the request response module is used for responding to the data subscription request so as to send all data values of the target data and the universal unique identification code of the target data to the data receiver;
an update request acquisition module, configured to acquire a data update request for the target data, which is transmitted by the data receiver to the data transmitter based on the universal unique identifier;
and the update data sending module is used for determining a changed target data value in all the data values of the target data by using the universal unique identification code in the data update request, and sending the target data value to the data receiving party so that the data receiving party can correspondingly update the local target data based on the target data value.
In a third aspect, the present application discloses an industrial data acquisition apparatus, which is applied to a data receiving party, and includes:
a subscription request sending module, configured to send a data subscription request for target data to a data sender;
a total data value obtaining module, configured to obtain a total data value of the target data and a corresponding universal unique identifier that are sent by the data sender after responding to the data subscription request;
an update request sending module, configured to transmit a data update request for the target data to the data sender by using the universal unique identifier, so that the data sender determines, according to the universal unique identifier in the data update request, a changed target data value among all data values of the target data;
and the update data acquisition module is used for acquiring the target data value sent by the data sender and correspondingly updating the local target data based on the target data value.
In a fifth aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the aforementioned industrial data acquisition method.
In a sixth aspect, the present application discloses a computer readable storage medium for storing a computer program, which when executed by a processor, implements the aforementioned industrial data acquisition method.
Therefore, in the application, a data subscription request aiming at target data sent by a data receiver is obtained; responding to the data subscription request to send all data values of the target data and the universal unique identification code of the target data to the data receiver; acquiring a data updating request aiming at the target data, which is transmitted to the data transmitter by the data receiver based on the universal unique identification code; and determining a changed target data value in all the data values of the target data by using the universal unique identification code in the data updating request, and sending the target data value to the data receiving party so that the data receiving party can correspondingly update the local target data based on the target data value. Therefore, point-to-point data communication between the data receiver and the data receiver is realized through the data subscription request sent by the data receiver to the data sender, and the data value communication has purposiveness and can ensure the integrity of data. The changed data value is accurately sent by determining the changed target data value in all the data values of the target data and sending the target data value to the data receiving party, so that the load of the data receiving party and the data sending party and the load of a network are reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method of industrial data acquisition as disclosed herein;
FIG. 2 is a flow chart of a particular industrial data acquisition method disclosed herein;
FIG. 3 is a flow chart of a particular industrial data subscription method disclosed herein;
FIG. 4 is a flow chart of a particular industrial data transmission method disclosed herein;
FIG. 5 is a flowchart of a specific subscription queue management method disclosed in the present application;
FIG. 6 is a flow chart of a particular industrial data acquisition method disclosed herein;
FIG. 7 is a flow chart of a particular industrial data acquisition method disclosed herein;
FIG. 8 is a schematic diagram of an industrial data acquisition device according to the present disclosure;
FIG. 9 is a schematic diagram of an industrial data acquisition device according to the present disclosure;
fig. 10 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In the prior art, with the increase of the industrial control scale, the adoption of a complete data transmission mode can cause the loads of a data sending end and a data receiving end to be gradually increased, and also can cause the network load to be increased. The invention specifically introduces an industrial data acquisition method based on a UDP protocol, which can accurately transmit changed real-time data, thereby reducing the loads of a receiving party and a transmitting party and the loads of networks.
Referring to fig. 1, an embodiment of the present application discloses an industrial data obtaining method, which is applied to a data sender, and includes:
step S11: and acquiring a data subscription request aiming at the target data sent by a data receiver.
In this embodiment, in the process of acquiring the industrial data, the real-time data is transmitted in a UDP broadcast or multicast manner, and no connection is established in the transmission process, so that although the efficiency is high, a packet loss phenomenon occurs, and particularly, the probability of packet loss is significantly increased under the condition of high network load. When packet loss occurs, the lost real-time value is filled again when only waiting for the next period of data transmission, and at the moment, the real-time data is lost by one beat, so that the historical data is incomplete, and breakpoints can occur in the historical trend. Therefore, the data sender establishes a starting point-to-point communication mode with the data receiver by acquiring a data subscription request aiming at the target data sent by the data receiver. Therefore, after data are sent subsequently, the purpose can be achieved, and the transmission efficiency cannot be reduced. The data subscription request includes information such as the target data characteristics. In the invention, when the request or the data is sent, if the request or the data packet is too small, a plurality of requests or data packets can be combined into one frame to be sent, thereby improving the sending efficiency; if the request or the data packet is too large, the request or the data packet is automatically segmented and sent in multiple frames.
Step S12: responding to the data subscription request to send all data values of the target data and the universal unique identification code of the target data to the data receiver.
In this embodiment, after receiving the data subscription request, the data sending party responds to the data subscription request, and sends all data values of the target data and the universal unique identification code corresponding to the target data to the data receiving party. Therefore, when the data value of the target data is updated subsequently, only the universal unique identification code can be sent, the characteristic of the target data does not need to be sent, and the load of the network can be reduced.
Step S13: and acquiring a data updating request aiming at the target data, which is transmitted to the data sender by the data receiver based on the universal unique identification code.
In this embodiment, after all data values of the target data are obtained, in order to ensure data timeliness, the current real-time data in the industrial control field is periodically transmitted, and in order to ensure data timeliness, the transmission period is generally 0.5 to 1 second. Therefore, the data receiver transmits a data updating request aiming at the target data to the data transmitter based on the universal unique identification code periodically. In this way, the data sender can find the storage location of the target data through the universal unique identification code.
Step S14: and determining a changed target data value in all the data values of the target data by using the universal unique identification code in the data updating request, and sending the target data value to the data receiving party so that the data receiving party can correspondingly update the local target data based on the target data value.
In this embodiment, the data sending party may determine a target data value that changes among all data values of the target data by using the universal unique identifier in the data updating request, and then send the target data value to the data receiving party, and after the data receiving party takes the target data value, the data receiving party may perform corresponding updating on the local target data based on the target data value. The target data are divided into switching values and analog values based on the characteristics of an industrial control system and a data structure. In the communication process, according to the characteristics of the switching value, only the overturning state is transmitted, and the analog quantity data only transmits the change data, so that the data transmission quantity can be reduced by more than 50%. The analog quantity can be divided into an integer, a floating point number and a character string, the integer and the character string are compared and judged whether to change through a memory, the floating point number needs to determine whether to change a data value by judging whether a variable quantity exceeds a dead zone, and the dead zone of each floating point type data can be independently set.
Therefore, in the application, a data subscription request aiming at target data sent by a data receiver is obtained; responding to the data subscription request so as to send all data values of the target data and the universal unique identification code of the target data to the data receiver; acquiring a data updating request aiming at the target data, which is transmitted to the data transmitter by the data receiver based on the universal unique identification code; and determining a changed target data value in all the data values of the target data by using the universal unique identification code in the data updating request, and sending the target data value to the data receiving party so that the data receiving party can correspondingly update the local target data based on the target data value. Therefore, point-to-point data communication between the data receiver and the data receiver is realized through the data subscription request sent by the data receiver to the data sender, and the data value communication has purposiveness and can ensure the integrity of data. The changed target data value is accurately sent by determining the changed target data value in all the data values of the target data and sending the target data value to the data receiving party, so that the loads of the data receiving party and the data sending party and the load of a network are reduced, high-efficiency safe data communication based on a UDP protocol in the industrial control field is realized, and the real-time performance and the stability of data communication are improved.
In the above embodiment, the industrial data acquisition method is generally described, and in this embodiment, a subscription queue storing a correspondence between the universal unique identification code and the target data is described.
Referring to fig. 2, an embodiment of the present application discloses an industrial data obtaining method, which is applied to a data sender, and includes:
step S21: and acquiring a data subscription request aiming at the target data sent by a data receiver.
Step S22: and creating a universal unique identification code corresponding to the target data based on the data subscription request.
In this embodiment, as shown in fig. 3, after receiving a data subscription request for target data sent by the data receiver, the data sender creates a Universally Unique Identifier (UUID) corresponding to the target data for the data subscription request.
Step S23: and sending all data values of the target data and the universal unique identification code to the data receiving party, and then storing the address characteristics of the target data and the universal unique identification code in a subscription queue.
In this embodiment, the data sending party sends all data values of the target data and the universal unique identification code to the data receiving party. Wherein, each data frame guarantees the data integrity through the check code. The data sending party needs to wait for confirmation after sending data each time, the data receiving party needs to respond to confirmation information after receiving the data, and if the data is incomplete or packet loss occurs, the data sending party cannot receive the confirmation information and can automatically retransmit the data, so that the safety and the integrity of the data are ensured. And after the data sending party judges that the data sending is successful, the address characteristics of the target data and the universal unique identification code are stored in a subscription queue.
Step S24: and acquiring a data updating request aiming at the target data, which is transmitted to the data sender by the data receiver based on the universal unique identification code.
Step S25: and judging whether the universal unique identification code in the data updating request exists in the subscription queue or not.
In this embodiment, as shown in fig. 4, after the data sending party obtains the data update request for the target data, which is transmitted to the data sending party based on the unique universal identification code, it is determined whether the unique universal identification code exists in the subscription queue, and if the unique universal identification code does not exist, it indicates that the unique universal identification code is a failure code, and then the data receiving party cannot perform corresponding update on the data value of the target data by sending the unique universal identification code, that is, the subscription relationship between the data receiving party and the data sending party is released, and the data receiving party needs to send the data subscription request for the target data to the data sending party again.
Step S26: if the target data exists, the target data is found based on the address characteristics corresponding to the universal unique identification code.
In this embodiment, if the data sender finds the unique universal identification code in the subscription queue, the target data is found based on the address characteristics corresponding to the unique universal identification code. In this way, the efficiency of querying the target data can be improved.
Step S27: acquiring a changed target data value in all the data values of the target data; and packaging the target data value and then sending the target data value to the data receiver so that the data receiver can correspondingly update the local target data value by using the received target data value.
In this embodiment, after the target data is queried, a changed target data value among all data values of the target data is obtained. The target data are divided into switching values and analog values based on the characteristics of an industrial control system and a data structure. In the communication process, according to the characteristics of the switching value, only the overturning state is transmitted, and the analog quantity data only transmits the change data, so that the data transmission quantity can be reduced by more than 50%. The analog quantity can be divided into an integer, a floating point number and a character string, the integer and the character string are compared and judged whether to change through a memory, the floating point number needs to determine whether to change a data value by judging whether a variable quantity exceeds a dead zone, and the dead zone of each floating point type data can be independently set. Then, packing the target data value, sending the data packet to the data receiver, and after packing the target data value and sending the packed target data value to the data receiver, the method further includes: judging whether the data receiver successfully acquires the target data value; and if not, skipping to the step of packaging the target data value and then sending the target data value to the data receiving party again until the data receiving party successfully acquires the target data value or the sending frequency of the target data value reaches a preset sending frequency threshold value. And then judging whether the data receiver successfully acquires the data packet. Wherein, each data frame guarantees the data integrity through the check code. The data sender needs to wait for confirmation after sending data each time, the data receiver needs to respond to confirmation information after receiving the data, and if the data is incomplete or has packet loss, the data sender cannot receive the confirmation information and automatically retransmits the data, so that the safety and the integrity of the data are ensured.
In this embodiment, the subscription queue is checked periodically, as shown in fig. 5. The method comprises the following steps: traversing all the universal unique identification codes in the subscription queue based on a preset traversal rule and judging whether the universal unique identification codes meet a preset storage condition; and if the universal unique identification code does not meet the preset storage condition, deleting the universal unique identification code and the address characteristics of the corresponding target data from the subscription queue. That is, it is determined whether the universally unique identifier stored in the subscription queue has not been accessed for a long time, that is, it is determined whether a data update request transmitted based on the universally unique identifier has not been received for a long time. And if the universal unique identification code is not accessed for a long time, deleting the universal unique identification code and the address characteristics of the corresponding target data from the subscription queue. In this way, the data sender maintains all subscriptions periodically, clearing out subscription information that has not been requested for a long time. The load of the data sender and the load of the network can be reduced.
For the specific processes of the steps S21 and S24, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
As can be seen, in this embodiment, a data subscription request for target data sent by a data receiver is first obtained; creating a universal unique identification code corresponding to the target data based on the data subscription request; sending all data values of the target data and the universal unique identification code to the data receiving party, and then storing the address characteristics of the target data and the universal unique identification code in a subscription queue; acquiring a data updating request aiming at the target data, which is transmitted to the data sender by the data receiver based on the universal unique identification code; judging whether the universal unique identification code in the data updating request exists in the subscription queue or not; if the target data exists, the target data is searched based on the address characteristics corresponding to the universal unique identification code; acquiring a changed target data value in all the data values of the target data; and packaging the target data value and then sending the target data value to the data receiver so that the data receiver can correspondingly update the local target data value by using the received target data value. In this way, by storing the address characteristics of the target data and the universally unique identification code in the subscription queue, the efficiency of searching the target data by the data sender can be improved.
In the above embodiments, the industrial data acquisition method is described correspondingly from the perspective of the data sender, and in the present embodiment, the industrial data acquisition method is described correspondingly from the perspective of the data receiver.
Referring to fig. 6, an embodiment of the present application discloses an industrial data obtaining method, which is applied to a data receiving party, and includes:
step S31: sending a data subscription request aiming at target data to a data sender;
step S32: acquiring all data values of the target data and corresponding universal unique identification codes sent by the data sender after responding to the data subscription request;
step S33: transmitting a data updating request aiming at the target data to the data sending party by using the universal unique identification code so that the data sending party can determine a changed target data value in all the data values of the target data according to the universal unique identification code in the data updating request;
step S34: and acquiring the target data value sent by the data sender, and correspondingly updating the local target data based on the target data value.
In this embodiment, after the local target data is updated based on the target data value, a preset time period is waited, and then the step of transmitting a data update request for the target data to the data sender by using the universal unique identification code is skipped, so as to achieve the purpose of periodically updating the data. If the data updating request fails, judging the reason of the failure, if the reason of the failure is that the universal unique identification code fails, skipping to the step of sending a data subscription request aiming at the target data to a data sending party, otherwise, waiting for a preset time and transmitting the data updating request aiming at the target data to the data sending party by reusing the universal unique identification code.
For the specific processes of the steps S31 to S33, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
It can be seen that in this application, this is shown in FIG. 7. Sending a data subscription request aiming at target data to a data sender; acquiring all data values and corresponding universal unique identification codes of the target data sent by the data sender after responding to the data subscription request; transmitting a data updating request aiming at the target data to the data sending party by using the universal unique identification code so that the data sending party can determine a changed target data value in all the data values of the target data according to the universal unique identification code in the data updating request; and acquiring the target data value sent by the data sender, and correspondingly updating the local target data based on the target data value. After the subscription relationship with the data sender is completed, a periodic data updating request can be made to the data sender through the universal unique identification code. Therefore, point-to-point data communication between the data receiver and the data receiver is realized through the data subscription request sent by the data receiver to the data sender, and the data value communication has purposiveness and can ensure the integrity of data. The changed data value is accurately sent by determining the changed target data value in all the data values of the target data and sending the target data value to the data receiving party, so that the load of the data receiving party and the data sending party and the load of a network are reduced.
Referring to fig. 8, an embodiment of the present application further discloses an industrial data obtaining apparatus correspondingly, which is applied to a data sending party, and includes:
a subscription request obtaining module 11, configured to obtain a data subscription request for target data sent by a data receiving party;
a request response module 12, configured to respond to the data subscription request, so as to send all data values of the target data and a universal unique identifier of the target data to the data receiver;
an update request obtaining module 13, configured to obtain a data update request for the target data, where the data receiving side transmits the data update request to the data sending side based on the universally unique identifier;
the update data sending module 14 is configured to determine, by using the universal unique identifier in the data update request, a target data value that changes among all data values of the target data, and send the target data value to the data receiving side, so that the data receiving side performs corresponding update on the local target data based on the target data value.
Therefore, in the application, a data subscription request aiming at target data sent by a data receiver is obtained; responding to the data subscription request to send all data values of the target data and the universal unique identification code of the target data to the data receiver; acquiring a data updating request aiming at the target data, which is transmitted to the data sender by the data receiver based on the universal unique identification code; and determining a changed target data value in all the data values of the target data by using the universal unique identification code in the data updating request, and sending the target data value to the data receiving party so that the data receiving party can correspondingly update the local target data based on the target data value. Therefore, point-to-point data communication between the data receiving party and the data sending party is realized through the data subscription request sent by the data receiving party, and the data value communication has purposiveness and can ensure the integrity of data. The changed data value is accurately sent by determining the changed target data value in all the data values of the target data and sending the target data value to the data receiving party, so that the load of the data receiving party and the data sending party and the load of a network are reduced.
In some specific embodiments, the request response module 12 may specifically include:
an identification code creating unit, configured to create a universal unique identification code corresponding to the target data based on the data subscription request;
and the data value sending unit is used for sending all data values of the target data and the universal unique identification code to the data receiving party and then storing the address characteristics of the target data and the universal unique identification code into a subscription queue.
In some specific embodiments, the update data sending module 14 may specifically include:
an identification code judging unit, configured to judge whether the universal unique identification code in the data update request exists in the subscription queue;
the data searching unit is used for searching the target data based on the address characteristics corresponding to the universal unique identification code when the target data exists;
a target data value transmitting unit, configured to acquire a target data value that changes among all data values of the target data; and packaging the target data value and then sending the target data value to the data receiver so that the data receiver can correspondingly update the local target data value by using the received target data value.
In some specific embodiments, the industrial data acquiring apparatus may further include:
the target data value judging module is used for judging whether the data receiving party successfully obtains the target data value;
and if not, skipping to the step of packaging the target data value and then sending the target data value to the data receiving party again until the data receiving party successfully acquires the target data value or the sending times of the target data value reach a preset sending time threshold value.
In some specific embodiments, the industrial data acquiring apparatus may further include:
the storage condition judgment module is used for traversing all the universal unique identification codes in the subscription queue based on a preset traversal rule and judging whether the universal unique identification codes meet a preset storage condition or not;
and the address deleting module is used for deleting the universal unique identification code and the address characteristics of the corresponding target data from the subscription queue if the universal unique identification code does not meet the preset storage condition.
Referring to fig. 9, an embodiment of the present application further discloses an industrial data acquiring apparatus correspondingly, which is applied to a data receiving party, and includes:
a subscription request sending module 21, configured to send a data subscription request for target data to a data sender;
a total data value obtaining module 22, configured to obtain all data values of the target data and corresponding universal unique identification codes, which are sent by the data sending party after responding to the data subscription request;
an update request sending module 23, configured to transmit a data update request for the target data to the data sender by using the universal unique identifier, so that the data sender determines, according to the universal unique identifier in the data update request, a changed target data value among all data values of the target data;
and the update data acquisition module 24 is configured to acquire the target data value sent by the data sender, and perform corresponding update on the local target data based on the target data value.
Therefore, in the application, a data subscription request aiming at the target data is sent to a data sender; acquiring all data values and corresponding universal unique identification codes of the target data sent by the data sender after responding to the data subscription request; transmitting a data updating request aiming at the target data to the data sending party by using the universal unique identification code so that the data sending party can determine a changed target data value in all the data values of the target data according to the universal unique identification code in the data updating request; and acquiring the target data value sent by the data sender, and correspondingly updating the local target data based on the target data value. Therefore, point-to-point data communication between the data receiver and the data receiver is realized through the data subscription request sent by the data receiver to the data sender, and the data value communication has purposiveness and can ensure the integrity of data. The changed data value is accurately sent by determining the changed target data value in all the data values of the target data and sending the target data value to the data receiving party, so that the load of the data receiving party and the data sending party and the load of a network are reduced.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 10 is a block diagram of an electronic device 30 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 10 is a schematic structural diagram of an electronic device 30 according to an embodiment of the present disclosure. The electronic device 30 may specifically include: at least one processor 31, at least one memory 32, a power supply 33, a communication interface 34, an input output interface 35, and a communication bus 36. The memory 32 is used for storing a computer program, and the computer program is loaded and executed by the processor 31 to implement the relevant steps in the industrial data acquisition method disclosed in any of the foregoing embodiments. In addition, the electronic device 30 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 33 is used to provide operating voltage for each hardware device on the electronic device 30; the communication interface 34 can create a data transmission channel between the electronic device 30 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 35 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 32 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 321, a computer program 322, etc., and the storage may be a transient storage or a permanent storage.
The operating system 321 is used for managing and controlling each hardware device on the electronic device 30 and the computer program 322, and may be Windows Server, netware, unix, linux, or the like. The computer program 322 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the industrial data acquisition method disclosed in any of the foregoing embodiments and executed by the electronic device 30.
Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the industrial data acquisition method disclosed above. For the specific steps of the method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The technical solutions provided by the present application are introduced in detail, and specific examples are applied in the description to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understanding the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. An industrial data acquisition method is applied to a data sender and comprises the following steps:
acquiring a data subscription request aiming at target data sent by a data receiver;
responding to the data subscription request to send all data values of the target data and the universal unique identification code of the target data to the data receiver;
acquiring a data updating request aiming at the target data, which is transmitted to the data transmitter by the data receiver based on the universal unique identification code;
and determining a changed target data value in all the data values of the target data by using the universal unique identification code in the data updating request, and sending the target data value to the data receiving party so that the data receiving party can correspondingly update the local target data based on the target data value.
2. The industrial data acquisition method according to claim 1, wherein the transmitting of all data values of the target data and the universally unique identification code of the target data to the data receiver comprises:
creating a universal unique identification code corresponding to the target data based on the data subscription request;
and sending all data values of the target data and the universal unique identification code to the data receiving party, and then storing the address characteristics of the target data and the universal unique identification code in a subscription queue.
3. The industrial data acquisition method according to claim 2, wherein the determining a target data value that has changed in all the data values of the target data by using the universally unique identifier in the data update request and sending the target data value to the data receiver comprises:
judging whether the universal unique identification code in the data updating request exists in the subscription queue or not;
if the target data exists, the target data is searched based on the address characteristics corresponding to the universal unique identification code;
acquiring a changed target data value in all the data values of the target data; and packaging the target data value and then sending the target data value to the data receiver so that the data receiver can correspondingly update the local target data value by using the received target data value.
4. The industrial data acquisition method according to claim 3, wherein after the target data value is packed and sent to the data receiver, the method further comprises:
judging whether the data receiver successfully acquires the target data value;
and if not, skipping to the step of packaging the target data value and then sending the target data value to the data receiving party again until the data receiving party successfully acquires the target data value or the sending frequency of the target data value reaches a preset sending frequency threshold value.
5. The industrial data acquisition method according to any one of claims 2 to 4, further comprising:
traversing all the universal unique identification codes in the subscription queue based on a preset traversal rule and judging whether the universal unique identification codes meet a preset storage condition;
and if the universal unique identification code does not meet the preset storage condition, deleting the universal unique identification code and the address characteristics of the corresponding target data from the subscription queue.
6. An industrial data acquisition method is applied to a data receiving party and comprises the following steps:
sending a data subscription request aiming at target data to a data sender;
acquiring all data values and corresponding universal unique identification codes of the target data sent by the data sender after responding to the data subscription request;
transmitting a data updating request aiming at the target data to the data sending party by using the universal unique identification code so that the data sending party can determine a changed target data value in all the data values of the target data according to the universal unique identification code in the data updating request;
and acquiring the target data value sent by the data sender, and correspondingly updating the local target data based on the target data value.
7. An industrial data acquisition device, which is applied to a data sending party, comprises:
a subscription request acquisition module, configured to acquire a data subscription request for target data sent by a data receiver;
the request response module is used for responding to the data subscription request so as to send all data values of the target data and the universal unique identification code of the target data to the data receiver;
an update request acquisition module, configured to acquire a data update request for the target data, which is transmitted by the data receiving side to the data sending side based on the universal unique identifier;
and the update data sending module is used for determining a changed target data value in all the data values of the target data by using the universal unique identification code in the data update request, and sending the target data value to the data receiving party so that the data receiving party can correspondingly update the local target data based on the target data value.
8. An industrial data acquisition device, applied to a data receiving party, comprising:
a subscription request sending module, configured to send a data subscription request for target data to a data sender;
a total data value obtaining module, configured to obtain a total data value of the target data and a corresponding universal unique identification code, which are sent by the data sender after responding to the data subscription request;
an update request sending module, configured to transmit a data update request for the target data to the data sender by using the universal unique identifier, so that the data sender determines, according to the universal unique identifier in the data update request, a changed target data value among all data values of the target data;
and the update data acquisition module is used for acquiring the target data value sent by the data sender and correspondingly updating the local target data based on the target data value.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the industrial data acquisition method according to any one of claims 1 to 6.
10. A computer-readable storage medium for storing a computer program which, when executed by a processor, implements the industrial data acquisition method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211674993.1A CN115967754A (en) | 2022-12-26 | 2022-12-26 | Industrial data acquisition method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211674993.1A CN115967754A (en) | 2022-12-26 | 2022-12-26 | Industrial data acquisition method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115967754A true CN115967754A (en) | 2023-04-14 |
Family
ID=87354507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211674993.1A Pending CN115967754A (en) | 2022-12-26 | 2022-12-26 | Industrial data acquisition method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115967754A (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9253244B1 (en) * | 2013-06-20 | 2016-02-02 | Amazon Technologies, Inc. | Subscription based polling for resource updates |
CN106612301A (en) * | 2015-10-22 | 2017-05-03 | 招商局国际信息技术有限公司 | Updated data pushing method and updated data pushing device |
CN107301196A (en) * | 2017-05-03 | 2017-10-27 | 北京小度信息科技有限公司 | Method of data synchronization, device, equipment and monitoring server |
CN109032747A (en) * | 2018-08-10 | 2018-12-18 | 江苏奇异点网络有限公司 | Data-updating method and device |
CN110727736A (en) * | 2019-10-24 | 2020-01-24 | 中国建设银行股份有限公司 | Data synchronization method and device, electronic equipment and storage medium |
CN111614750A (en) * | 2020-05-19 | 2020-09-01 | 深圳市网心科技有限公司 | Data updating method, system, equipment and storage medium |
CN111654397A (en) * | 2020-06-03 | 2020-09-11 | 中国科学院自动化研究所 | Data subscription method and device, electronic equipment and storage medium |
WO2020237548A1 (en) * | 2019-05-29 | 2020-12-03 | Oppo广东移动通信有限公司 | Resource subscription method, device and server, and computer storage medium |
CN112084258A (en) * | 2020-08-18 | 2020-12-15 | 腾讯科技(深圳)有限公司 | Data synchronization method and device |
CN113067853A (en) * | 2021-03-12 | 2021-07-02 | 北京金山云网络技术有限公司 | Data pushing method and device, electronic equipment and storage medium |
CN115329007A (en) * | 2022-09-01 | 2022-11-11 | 广域铭岛数字科技有限公司 | Method and system for synchronizing data among databases, electronic equipment and storage medium |
-
2022
- 2022-12-26 CN CN202211674993.1A patent/CN115967754A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9253244B1 (en) * | 2013-06-20 | 2016-02-02 | Amazon Technologies, Inc. | Subscription based polling for resource updates |
CN106612301A (en) * | 2015-10-22 | 2017-05-03 | 招商局国际信息技术有限公司 | Updated data pushing method and updated data pushing device |
CN107301196A (en) * | 2017-05-03 | 2017-10-27 | 北京小度信息科技有限公司 | Method of data synchronization, device, equipment and monitoring server |
CN109032747A (en) * | 2018-08-10 | 2018-12-18 | 江苏奇异点网络有限公司 | Data-updating method and device |
WO2020237548A1 (en) * | 2019-05-29 | 2020-12-03 | Oppo广东移动通信有限公司 | Resource subscription method, device and server, and computer storage medium |
CN110727736A (en) * | 2019-10-24 | 2020-01-24 | 中国建设银行股份有限公司 | Data synchronization method and device, electronic equipment and storage medium |
CN111614750A (en) * | 2020-05-19 | 2020-09-01 | 深圳市网心科技有限公司 | Data updating method, system, equipment and storage medium |
CN111654397A (en) * | 2020-06-03 | 2020-09-11 | 中国科学院自动化研究所 | Data subscription method and device, electronic equipment and storage medium |
CN112084258A (en) * | 2020-08-18 | 2020-12-15 | 腾讯科技(深圳)有限公司 | Data synchronization method and device |
CN113067853A (en) * | 2021-03-12 | 2021-07-02 | 北京金山云网络技术有限公司 | Data pushing method and device, electronic equipment and storage medium |
CN115329007A (en) * | 2022-09-01 | 2022-11-11 | 广域铭岛数字科技有限公司 | Method and system for synchronizing data among databases, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107071826B (en) | Method and device for transmitting data resources | |
US7139569B2 (en) | Service searching system | |
EP2930899B1 (en) | Tcp link configuration method and apparatus | |
WO2015180339A1 (en) | Message push processing method and device, push server, and application server | |
CN109451032B (en) | Message transmission system | |
KR102128356B1 (en) | Resource acquisition method and device | |
CN113572835B (en) | Data processing method, network element equipment and readable storage medium | |
CN115001897B (en) | Communication method and device, electronic equipment and automatic driving vehicle | |
CN109257335B (en) | Method for maintaining back source link, back source method, related device and storage medium | |
CN113572864B (en) | Data processing method, network element equipment and readable storage medium | |
CN105262836A (en) | Information push method of server and push information reception method of client | |
US10136375B2 (en) | Method for service data management, apparatus, and system | |
CN103763206A (en) | Network scheduling method and gateway | |
US10645184B2 (en) | Information transmission method, gateway, and controller | |
CN113055193B (en) | Data multicast transmission method, device, equipment and storage medium | |
CN109756464B (en) | Communication method, server and client | |
CN115967754A (en) | Industrial data acquisition method, device, equipment and storage medium | |
CN116389454A (en) | Data downloading system | |
CN102143208A (en) | Remote control method and system for intelligent terminal | |
CN112055083B (en) | Request processing method and device, electronic equipment and medium | |
CN110971535B (en) | Communication congestion control method, device, equipment and storage medium | |
CN112104763A (en) | Method for realizing butt joint of different network platforms in warehouse | |
CN113114558A (en) | Communication message transmission method, device, communication server and computer storage medium | |
CN110798542A (en) | Method and system for acquiring IP address | |
WO2004071027A1 (en) | Methods and systems for non-disruptive physical address resolution |
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 |