CN109884972A - Processing method and processing device, storage medium and the electronic device of data - Google Patents

Processing method and processing device, storage medium and the electronic device of data Download PDF

Info

Publication number
CN109884972A
CN109884972A CN201910141426.1A CN201910141426A CN109884972A CN 109884972 A CN109884972 A CN 109884972A CN 201910141426 A CN201910141426 A CN 201910141426A CN 109884972 A CN109884972 A CN 109884972A
Authority
CN
China
Prior art keywords
data
case
transmission
module
present
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
Application number
CN201910141426.1A
Other languages
Chinese (zh)
Inventor
宋晋泉
杨昊佐
赵伟雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING DRAGON RESOURCES TECHNOLOGY Co Ltd
Original Assignee
BEIJING DRAGON RESOURCES TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING DRAGON RESOURCES TECHNOLOGY Co Ltd filed Critical BEIJING DRAGON RESOURCES TECHNOLOGY Co Ltd
Priority to CN201910141426.1A priority Critical patent/CN109884972A/en
Publication of CN109884972A publication Critical patent/CN109884972A/en
Pending legal-status Critical Current

Links

Abstract

The present invention provides a kind of processing method and processing device of data, storage medium and electronic devices;Wherein, this method comprises: the sequence number SN for the data for transmitting the both sides of data is added 1 respectively in the case where determination gets correct data;Whether the SN difference of the SN and local current data that judge the data received next time are 1;In the case where the judgment result is yes, determine that the data received are required data.Through the invention, solve the problems, such as that data transmission procedure integrality is insufficient in the related technology.

Description

Processing method and processing device, storage medium and the electronic device of data
Technical field
The present invention relates to computer field, in particular to a kind of processing method and processing device of data, storage medium and Electronic device.
Background technique
In the application of safety PLC (Programmable Logic Controller, programmable logic controller (PLC)) system, peace The operating status of full PLC system needs to carry out IOBUS with other I O board cards to communicate interaction data, in order to ensure IOBUS data biography Defeated correctness is to guarantee data using CRC (Cyclic Redundancy Check, cyclic redundancy check code) mostly at present The correctness of transmission, still, which is often insufficient for the integrality and real-time of data.
In view of the above problems in the related art, not yet there is effective solution at present.
Summary of the invention
The embodiment of the invention provides a kind of processing method and processing device of data, storage medium and electronic devices, at least Solve the problems, such as that data transmission procedure integrality is insufficient in the related technology.
According to one embodiment of present invention, a kind of processing method of data is provided, comprising: get correctly determining In the case where data, the sequence number SN for the data for transmitting the both sides of data is added 1 respectively;Judge the data received next time Whether the SN difference of SN and local current data is 1;In the case where the judgment result is yes, determine that the data received are required Data.
Optionally, the acquisition correct data, comprising: calculate the cyclic redundancy check crc value of the data of transmission;In number According to crc value be preset value in the case where, determine the transmission data be correct data.
Optionally, the method also includes: obtain receive data waiting time;When the waiting time is more than default In the case where length, retransmission request is sent.
Optionally, the method also includes: the retransmission request number be more than preset times after, send data pass Defeated false request.
According to one embodiment of present invention, a kind of processing unit of data is provided, comprising: processing module is used for It determines in the case where getting correct data, the sequence number SN for the data for transmitting the both sides of data is added 1 respectively;Judgment module, For judging whether SN and the SN difference of local current data of the data received are 1 next time;First determining module, is used for In the case where the judgment result is yes, determine that the data received are required data.
Optionally, described device further include: computing module, the cyclic redundancy check CRC of the data for calculating transmission Value;Second determining module, in the case where the crc value of data is preset value, determining that the data of the transmission are correctly to count According to.
Optionally, described device further include: module is obtained, for obtaining the waiting time for receiving data;First sends mould Block, for sending retransmission request in the case where the waiting time being more than preset duration.
Optionally, described device further include: the second sending module is more than default time for the number in the retransmission request After number, data transmission fault request is sent.
According to still another embodiment of the invention, a kind of storage medium is additionally provided, meter is stored in the storage medium Calculation machine program, wherein the computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
According to still another embodiment of the invention, a kind of electronic device, including memory and processor are additionally provided, it is described Computer program is stored in memory, the processor is arranged to run the computer program to execute any of the above-described Step in embodiment of the method.
Through the invention, in the case where determination gets correct data, the sequence of the data of the both sides of data will be transmitted Number SN adds 1 respectively, and then judges whether the SN of the data received next time and the SN difference of local current data are 1, are being sentenced Disconnected result is to determine that the data received are required data in the case where being.That is, the side of the SN by setting data Formula can ensure the integrality of data receiver, to solve the problems, such as that data transmission procedure integrality is insufficient in the related technology.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of hardware block diagram of the terminal of the processing method of data of the embodiment of the present invention;
Fig. 2 is the flow chart of the processing method of data according to an embodiment of the present invention;
Fig. 3 is the structural block diagram of the processing unit of data according to an embodiment of the present invention;
Fig. 4 is the alternative construction block diagram one of the processing unit of data according to an embodiment of the present invention;
Fig. 5 is the alternative construction block diagram two of the processing unit of data according to an embodiment of the present invention.
Specific embodiment
Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and in combination with Examples.It should be noted that not conflicting In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.
Embodiment 1
Embodiment of the method provided by the embodiment of the present application one can be filled in terminal, terminal or similar operation Set middle execution.For running at the terminal, Fig. 1 is a kind of hardware of the terminal of the processing method of data of the embodiment of the present invention Structural block diagram.As shown in Figure 1, terminal 10 may include 102 (processor of one or more (only showing one in Fig. 1) processors 102 can include but is not limited to the processing unit of Micro-processor MCV or programmable logic device FPGA etc.) and for storing data Memory 104, optionally, above-mentioned terminal can also include setting for the transmission device 106 of communication function and input and output Standby 108.It will appreciated by the skilled person that structure shown in FIG. 1 is only to illustrate, not to the structure of above-mentioned terminal It causes to limit.For example, terminal 10 may also include than shown in Fig. 1 more perhaps less component or have with shown in Fig. 1 not Same configuration.
Memory 104 can be used for storing computer program, for example, the software program and module of application software, such as this hair The corresponding computer program of the processing method of data in bright embodiment, processor 102 are stored in memory 104 by operation Computer program realize above-mentioned method thereby executing various function application and data processing.Memory 104 can wrap Include high speed random access memory, may also include nonvolatile memory, as one or more magnetic storage device, flash memory or Other non-volatile solid state memories.In some instances, memory 104 can further comprise long-range relative to processor 102 The memory of setting, these remote memories can pass through network connection to terminal 10.The example of above-mentioned network includes but unlimited In internet, intranet, local area network, mobile radio communication and combinations thereof.
Transmitting device 106 is used to that data to be received or sent via a network.Above-mentioned network specific example may include The wireless network that the communication providers of terminal 10 provide.In an example, transmitting device 106 includes a network adapter (Network Interface Controller, referred to as NIC), can be connected by base station with other network equipments so as to It is communicated with internet.In an example, transmitting device 106 can be radio frequency (Radio Frequency, referred to as RF) Module is used to wirelessly be communicated with internet.
A kind of processing method of data for running on above-mentioned terminal is provided in the present embodiment, and Fig. 2 is according to the present invention The flow chart of the processing method of the data of embodiment, as shown in Fig. 2, the process includes the following steps:
Step S202 will transmit the sequence number of the data of the both sides of data in the case where determination gets correct data SN adds 1 respectively;
Whether the SN difference of step S204, the SN and local current data that judge the data received next time are 1;
Step S206 determines that the data received are required data in the case where the judgment result is yes.
S202 to step S206 through the above steps will transmit data in the case where determination gets correct data The sequence number SN of the data of both sides adds 1 respectively, and then judges the SN of the data received next time and the SN of local current data Whether difference is 1, in the case where the judgment result is yes, determines that the data received are required data.That is, passing through The mode that the SN of data is arranged can ensure the integrality of data receiver, so that it is complete to solve data transmission procedure in the related technology The problem of whole property deficiency.
It, can for the mode for the acquisition correct data being related in the present embodiment in the optional embodiment of the present embodiment To be: calculating the cyclic redundancy check crc value of the data of transmission;In the case where the crc value of data is preset value, determining should The data of transmission are correct data.
In another optional embodiment of the present embodiment, the method for the present embodiment can also include:
Step S208 obtains the waiting time for receiving data;
Step S210 sends retransmission request in the case where waiting time being more than preset duration.
Step S212 is more than transmission data transmission fault request after preset times in the number of retransmission request.
It should be noted that above-mentioned preset duration and preset times can be arranged accordingly according to the actual situation, example If preset duration is 10s, and preset times are 3 times;Certainly above-mentioned to be merely illustrative, do not constitute the restriction to this case.
In addition, S208 to step S212 through the above steps, by the way that waiting time is compared with preset duration, and Determine that the number of retransmission request is no more than preset times to guarantee the real-time of data transmission.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing The part that technology contributes can be embodied in the form of software products, which is stored in a storage In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Embodiment 2
A kind of processing unit of data is additionally provided in the present embodiment, and the device is for realizing above-described embodiment and preferably Embodiment, the descriptions that have already been made will not be repeated.As used below, predetermined function may be implemented in term " module " The combination of software and/or hardware.Although device described in following embodiment is preferably realized with software, hardware, or The realization of the combination of person's software and hardware is also that may and be contemplated.
Fig. 3 is the structural block diagram of the processing unit of data according to an embodiment of the present invention, as shown in figure 3, the device includes: Processing module 32, for the sequence number SN of the data of the both sides of data will to be transmitted in the case where determination gets correct data Respectively plus 1;Judgment module 34 is of coupled connections with processing module 32, the SN of the data for judging to receive next time and local Whether the SN difference of current data is 1;First determining module 36, is of coupled connections with judgment module 34, for being in judging result In the case where being, determine that the data received are required data.
Fig. 4 is the alternative construction block diagram one of the processing unit of data according to an embodiment of the present invention, as shown in figure 4, the dress It sets further include: computing module 42 is of coupled connections with the second determining module 44, the Cyclic Redundancy Code school of the data for calculating transmission Test crc value;Second determining module 44, is of coupled connections with processing module 32, for the crc value in data be preset value the case where Under, determine that the data of the transmission are correct data.
Fig. 5 is the alternative construction block diagram two of the processing unit of data according to an embodiment of the present invention, as shown in figure 5, the dress It sets further include: obtain module 52, be of coupled connections with the first determining module 36, for obtaining the waiting time for receiving data;First Sending module 54 is of coupled connections with module 52 is obtained, and asks in the case where waiting time being more than preset duration, sending to retransmit It asks;Second sending module 56 is of coupled connections with the first sending module 54, for sending out after retransmission request is more than preset times Data transmission fault is sent to request.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong Following manner realization is crossed, but not limited to this: above-mentioned module is respectively positioned in same processor;Alternatively, above-mentioned modules are with any Combined form is located in different processors.
Embodiment 3
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps Calculation machine program:
S1 will transmit the sequence number SN difference of the data of the both sides of data in the case where determination gets correct data Add 1;
Whether the SN difference of S2, the SN and local current data that judge the data received next time are 1;
S3 determines that the data received are required data in the case where the judgment result is yes.
Optionally, in the present embodiment, above-mentioned storage medium can include but is not limited to: USB flash disk, read-only memory (Read- Only Memory, referred to as ROM), it is random access memory (Random Access Memory, referred to as RAM), mobile hard The various media that can store computer program such as disk, magnetic or disk.
The embodiments of the present invention also provide a kind of electronic device, including memory and processor, stored in the memory There is computer program, which is arranged to run computer program to execute the step in any of the above-described embodiment of the method Suddenly.
Optionally, above-mentioned electronic device can also include transmission device and input-output equipment, wherein the transmission device It is connected with above-mentioned processor, which connects with above-mentioned processor.
Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:
S1 will transmit the sequence number SN difference of the data of the both sides of data in the case where determination gets correct data Add 1;
Whether the SN difference of S2, the SN and local current data that judge the data received next time are 1;
S3 determines that the data received are required data in the case where the judgment result is yes.
Optionally, the specific example in the present embodiment can be with reference to described in above-described embodiment and optional embodiment Example, details are not described herein for the present embodiment.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored It is performed by computing device in the storage device, and in some cases, it can be to be different from shown in sequence execution herein Out or description the step of, perhaps they are fabricated to each integrated circuit modules or by them multiple modules or Step is fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and softwares to combine.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.It is all within principle of the invention, it is made it is any modification, etc. With replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of processing method of data characterized by comprising
In the case where determination gets correct data, the sequence number SN for the data for transmitting the both sides of data is added 1 respectively;
Whether the SN difference of the SN and local current data that judge the data received next time are 1;
In the case where the judgment result is yes, determine that the data received are required data.
2. the method according to claim 1, wherein the acquisition correct data, comprising:
Calculate the cyclic redundancy check crc value of the data of transmission;
In the case where the crc value of data is preset value, determine that the data of the transmission are correct data.
3. the method according to claim 1, wherein the method also includes:
Obtain the waiting time for receiving data;
In the case where the waiting time being more than preset duration, retransmission request is sent.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
It is more than transmission data transmission fault request after preset times in the number of the retransmission request.
5. a kind of processing unit of data characterized by comprising
Processing module, for the sequence number of the data of the both sides of data will to be transmitted in the case where determination gets correct data SN adds 1 respectively;
Judgment module, for judging whether SN and the SN difference of local current data of the data received are 1 next time;
First determining module, in the case where the judgment result is yes, determining that the data received are required data.
6. device according to claim 5, which is characterized in that described device further include:
Computing module, the cyclic redundancy check crc value of the data for calculating transmission;
Second determining module, in the case where the crc value of data is preset value, determining that the data of the transmission are correctly to count According to.
7. device according to claim 5, which is characterized in that described device further include:
Module is obtained, for obtaining the waiting time for receiving data;
First sending module, for sending retransmission request in the case where the waiting time being more than preset duration.
8. device according to claim 7, which is characterized in that described device further include:
Second sending module, for the number in the retransmission request more than after preset times, transmission data transmission fault is asked It asks.
9. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer Program is arranged to execute method described in any one of Claims 1-4 when operation.
10. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory Sequence, the processor are arranged to run the computer program to execute side described in any one of Claims 1-4 Method.
CN201910141426.1A 2019-02-26 2019-02-26 Processing method and processing device, storage medium and the electronic device of data Pending CN109884972A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910141426.1A CN109884972A (en) 2019-02-26 2019-02-26 Processing method and processing device, storage medium and the electronic device of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910141426.1A CN109884972A (en) 2019-02-26 2019-02-26 Processing method and processing device, storage medium and the electronic device of data

Publications (1)

Publication Number Publication Date
CN109884972A true CN109884972A (en) 2019-06-14

Family

ID=66929459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910141426.1A Pending CN109884972A (en) 2019-02-26 2019-02-26 Processing method and processing device, storage medium and the electronic device of data

Country Status (1)

Country Link
CN (1) CN109884972A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037666A (en) * 2019-12-24 2021-06-25 中兴通讯股份有限公司 Data processing method and device, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1175144A (en) * 1996-06-27 1998-03-04 大宇电子株式会社 Method of detecting lost or incorrect inserted packed based on sequence number
CN101043301A (en) * 2006-03-22 2007-09-26 华为技术有限公司 Data rearrangement and recombination method in wireless communication system and its base station
US20080065943A1 (en) * 2006-09-13 2008-03-13 Louis Botha Method and system for using data from a failed CRC block to determine retransmission of data packets
CN102143073A (en) * 2011-03-23 2011-08-03 深圳创维数字技术股份有限公司 Data transmission method and system
CN102377678A (en) * 2011-11-28 2012-03-14 瑞斯康达科技发展股份有限公司 Data transmission and processing method and device
CN104967504A (en) * 2015-07-08 2015-10-07 北京麓柏科技有限公司 Method and apparatus for link data protection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1175144A (en) * 1996-06-27 1998-03-04 大宇电子株式会社 Method of detecting lost or incorrect inserted packed based on sequence number
CN101043301A (en) * 2006-03-22 2007-09-26 华为技术有限公司 Data rearrangement and recombination method in wireless communication system and its base station
US20080065943A1 (en) * 2006-09-13 2008-03-13 Louis Botha Method and system for using data from a failed CRC block to determine retransmission of data packets
CN102143073A (en) * 2011-03-23 2011-08-03 深圳创维数字技术股份有限公司 Data transmission method and system
CN102377678A (en) * 2011-11-28 2012-03-14 瑞斯康达科技发展股份有限公司 Data transmission and processing method and device
CN104967504A (en) * 2015-07-08 2015-10-07 北京麓柏科技有限公司 Method and apparatus for link data protection

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113037666A (en) * 2019-12-24 2021-06-25 中兴通讯股份有限公司 Data processing method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN105813115B (en) WIFI network configuration method and device
CN111885594B (en) Equipment binding method and device
CN104702468B (en) Determine the method, apparatus and system of transmission path
CN111885115B (en) Device binding changing method and device
CN106850402A (en) The transmission method and device of message
CN107770786B (en) Method, equipment and system for testing network performance
CN112817617A (en) Software upgrading method, device and system
CN107463476A (en) The acquisition methods and device of information
CN108833443A (en) A kind of method for message transmission and system, computer equipment
CN111884875A (en) Offline device determination method and device
CN109656129A (en) A kind of input/output module redundancy approach, apparatus and system
CN109884972A (en) Processing method and processing device, storage medium and the electronic device of data
CN110472216A (en) Determination method, apparatus, storage medium and the electronic device of field
CN113259918A (en) Equipment binding method and system
CN114979148B (en) Data transmission method, device and computer readable storage medium
CN109743746A (en) A kind of two-way converting detection BFD parameter consultation method, device and chip
CN114071547B (en) QoE measurement configuration method, qoE measurement configuration device and storage medium
CN113691520B (en) Method and device for acquiring streaming media information, storage medium and electronic device
CN110162455A (en) Joint debugging method and device, storage medium, the electronic device of software
CN109243437A (en) Reminding method, device, storage medium and the electronic device of information
CN105323093A (en) Fault information collection method, device and system
CN110580172B (en) Configuration rule verification method and device, storage medium and electronic device
CN109388436A (en) Control method, device and the storage medium of starting procedure
CN109151826A (en) The processing method and the network equipment of Data Radio Bearer integrity checking failure
CN107466018A (en) The data transferring method and terminal device of a kind of terminal 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190614

RJ01 Rejection of invention patent application after publication