CN112187408B - Data processing method, system, device, storage medium and processor - Google Patents

Data processing method, system, device, storage medium and processor Download PDF

Info

Publication number
CN112187408B
CN112187408B CN202011043037.4A CN202011043037A CN112187408B CN 112187408 B CN112187408 B CN 112187408B CN 202011043037 A CN202011043037 A CN 202011043037A CN 112187408 B CN112187408 B CN 112187408B
Authority
CN
China
Prior art keywords
state
event data
station
target
target event
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.)
Active
Application number
CN202011043037.4A
Other languages
Chinese (zh)
Other versions
CN112187408A (en
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 Ltd
Original Assignee
Beijing Dragon Resources 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 Ltd filed Critical Beijing Dragon Resources Ltd
Priority to CN202011043037.4A priority Critical patent/CN112187408B/en
Publication of CN112187408A publication Critical patent/CN112187408A/en
Application granted granted Critical
Publication of CN112187408B publication Critical patent/CN112187408B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal

Abstract

The invention discloses a data processing method, a system, a device, a storage medium and a processor. Wherein the method comprises the following steps: generating target event data by the secondary station; the slave station determines the current transmission state of the target event data; the slave station determines a first target state corresponding to the current transmission state based on a slave station state machine; the slave station sets the state of the target event data from the current transmission state to a first target state, and determines a first processing task corresponding to the target event data based on the first target state; the secondary station processes the target event data based on the first processing task and communicates the secondary station after processing the target event data with the primary station. The invention solves the technical problem of low data processing efficiency.

Description

Data processing method, system, device, storage medium and processor
Technical Field
The present invention relates to the field of data processing, and in particular, to a data processing method, system, device, storage medium, and processor.
Background
At present, in the communication process of a master station and a slave station, when a certain accident occurs to cause communication interruption, events generated by the slave station are stored according to the occurrence sequence, if the communication interruption time is long, the slave station can store more event data, and after the communication is normal, the event data stored by the slave station are transmitted to the master station through multiple sub-packets.
However, when some unknown error occurs in the process of transmitting data from the slave station to the master station, the master station can not successfully receive event data transmitted by the slave station, or the master station can successfully receive the data of the slave station and successfully transmit an acknowledgement packet to the slave station, but the acknowledgement packet is lost in the transmission process, so that logic confusion of event data transmission of the slave station is caused, the event data is lost, and the problem of low efficiency of processing the event data is caused; in the data returning process, new event data still exists in the secondary station, and the new event data is lost due to logic confusion of event data transmission of the secondary station, so that the new event data cannot be returned, and the problem of low processing efficiency of the new event data is caused; in addition, the data feedback process is easily affected by the network state, and when the network state is poor, the feedback time of the event data is long, even the feedback fails, so that the problem of low efficiency of processing the event data is also caused.
For the above-mentioned problem of inefficiency of data processing, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a system, a device, a storage medium and a processor, which are used for at least solving the technical problem of low data processing efficiency.
According to an aspect of an embodiment of the present invention, there is provided a data processing method including: generating target event data by the secondary station; the slave station determines the current transmission state of the target event data; the slave station determines a first target state corresponding to the current transmission state based on a slave station state machine; the slave station sets the state of the target event data from the current transmission state to a first target state, and determines a first processing task corresponding to the target event data based on the first target state; the secondary station processes the target event data based on the first processing task and communicates the secondary station after processing the target event data with the primary station.
Optionally, the master station has a second target state corresponding to the first target state, and the slave station after processing the target event data communicates with the master station, including: communication is performed between the secondary station and the primary station based on the first target state and the second target state.
Optionally, the secondary station determines a current transmission status of the target event data, including at least one of: the slave station determines the current transmission state as the state of the target event data in the data transmission process; the slave station determines that the current transmission state is the successful state of the target event data transmission; the secondary station determines that the current transmission state is a state in which the transmission of the target event data fails.
Optionally, the secondary station determines a first target state corresponding to the current transmission state based on the secondary station state machine, including at least one of: under the condition that the current transmission state is the state of target event data in the data transmission process, the secondary station determines a first storage state corresponding to the current transmission state based on a secondary station state machine, wherein the first target state comprises a first storage state, and the first storage state is used for indicating the secondary station to store the target event data; under the condition that the current transmission state is a state that the target event data is successfully transmitted, the slave station determines a waiting state corresponding to the current transmission state based on a slave station state machine, wherein the first target state comprises the waiting state, the waiting state is used for indicating the slave station to wait for receiving a confirmation packet, the confirmation packet is used for indicating that the target event data is successfully transmitted, and the master station successfully receives the target event data; in the case that the current transmission state is a state of failure in transmission of the target event data, the secondary station determines a transmission state corresponding to the current transmission state based on a secondary station state machine, wherein the first target state includes a transmission state for indicating the secondary station to transmit the target event data.
Optionally, the secondary station sets the state of the target event data from the current transmission state to a first target state, and determines a first processing task corresponding to the target event data based on the first target state, including at least one of the following: the slave station sets the state of the target event data from the current transmission state to a first storage state, and determines that the target event data is successfully stored based on the first storage state, wherein the first processing task comprises determining that the target event data is successfully stored; the method comprises the steps that a slave station sets the state of target event data to a waiting state from a current transmission state, determines a confirmation packet used for indicating that the target event data is successfully transmitted and a master station successfully receives the target event data based on the waiting state, wherein a first processing task comprises determining the confirmation packet used for indicating that the target event data is successfully transmitted and the master station successfully receives the target event data; the secondary station sets the state of the target event data from the current transmission state to a transmission state and determines to retransmit the failed-to-transmit target event data based on the transmission state, wherein the first processing task includes retransmitting the failed-to-transmit target event data.
Optionally, after the secondary station determines the waiting state corresponding to the current transmission state based on the secondary station state machine, the method further comprises: the secondary station sets a time interval; in the case that the time for waiting for receiving the acknowledgement packet by the slave station in the waiting state does not exceed the time interval, the slave station determines that the acknowledgement packet is successfully received; in the case where the time for which the slave station waits to receive the acknowledgement packet in the waiting state exceeds the time interval, the slave station determines that the acknowledgement packet was not successfully received.
Optionally, after the secondary station determines that the acknowledgement packet was successfully received, the method further comprises: the slave station jumps the wait state to a delete state based on the slave station state machine, wherein the delete state is used to indicate that the slave station deletes the successfully transmitted target event data.
According to another aspect of the embodiment of the present invention, there is also provided another data processing method, including: the method comprises the steps that a master station determines a second target state corresponding to a current transmission state of target event data based on a master station state machine, wherein the target event data is generated by a slave station, the current transmission state of the target event data is determined by the slave station, a first target state corresponding to the current transmission state is determined by the slave station based on a slave station state machine, the state of the target event data is determined by the slave station by setting the current transmission state to the first target state, the first target state is used for determining a first processing task corresponding to the target event data, and the first processing task is used for processing the target event data by the slave station; the master station sets the state of the target event data from the current transmission state to a second target state, and determines a second processing task corresponding to the target event data based on the second target state; the master station processes the target event data based on a second processing task and communicates the master station after processing the target event data with the slave station after processing the target event data.
Optionally, the master station determines a second target state corresponding to the current transmission state of the target event data based on the master station state machine, including at least one of: when the current transmission state of the target event data is in the state of the sending process of the target event data or the state of failure in sending the target event data, the master station determines an idle state corresponding to the current transmission state of the target event data based on a master station state machine, wherein the second target state comprises the idle state, the idle state is used for indicating the master station to wait for receiving data, and the data comprise the target event data; and under the condition that the current transmission state of the target event data is the state that the target event data is successfully transmitted, the master station determines a receiving state corresponding to the current transmission state of the target event data based on a master station state machine, wherein the second target state comprises the receiving state, and the receiving state is used for indicating the master station to receive the data.
Optionally, after the master station determines the receiving state corresponding to the current transmission state of the target event data based on the master station state machine, the method further comprises: under the condition that the data is the target event data, the master station jumps the receiving state to a second saving state based on a master station state machine, wherein the second saving state is used for indicating the master station to save the data; in the event that the data is not targeted event data, the master station jumps the receive state to the idle state based on the master station state machine.
Optionally, after the master station jumps the receiving state to the second save state based on the master station state machine, the method further comprises: under the condition that the data is the target event data, the master station jumps the second storage state to a confirmation state based on a master station state machine, wherein the confirmation state is used for indicating the master station to send a confirmation packet; in the event that the data is not targeted event data, the master discards the data and jumps the second save state to an idle state based on the master state machine.
According to another aspect of an embodiment of the present invention, there is also provided a data processing system including: a slave station provided with a slave station state machine, wherein the slave station is used for generating target event data and transmitting the target event data based on the slave station state machine; and the master station is connected with the slave station and is provided with a master station state machine, wherein the master station is used for receiving and processing target event data sent by the slave station based on the master station state machine.
According to another aspect of the embodiment of the present invention, there is also provided a data processing apparatus including: a generation unit for generating target event data from the station; a first determining unit for determining a current transmission state of the target event data from the station; a second determining unit for determining a first target state corresponding to the current transmission state based on the slave state machine; a first setting unit, configured to set a state of the target event data from a current transmission state to a first target state, and determine a processing task corresponding to the target event data based on the first target state; and the first processing unit is used for processing the target event data based on the processing task by the secondary station and communicating the secondary station after processing the target event data with the primary station.
According to another aspect of an embodiment of the present invention, there is provided another data processing apparatus including: a third determining unit, configured to determine, by the master station, a second target state corresponding to a current transmission state of target event data based on the master station state machine, where the target event data is generated by the slave station, the current transmission state of the target event data is determined by the slave station, where a first target state corresponding to the current transmission state is determined by the slave station based on the slave station state machine, the state of the target event data is determined by the slave station setting the current transmission state to the first target state, the first target state is used to determine a first processing task corresponding to the target event data, and the first processing task is used to process the target event data by the slave station; the second setting unit is used for setting the state of the target event data from the current transmission state to a second target state by the master station and determining a second processing task corresponding to the target event data based on the second target state; and the second processing unit is used for processing the target event data based on the second processing task by the master station and communicating the master station after processing the target event data with the slave station after processing the target event data.
According to another aspect of the embodiment of the present invention, there is also provided a computer readable storage medium, where the computer readable storage medium includes a stored program, and when the program runs, controls a device where the storage medium is located to execute the data processing method in the embodiment of the present invention.
According to another aspect of the embodiment of the present invention, there is also provided a processor, where the processor is configured to execute a program, and when the program runs, the data processing method in the embodiment of the present invention is executed.
In the embodiment of the invention, the secondary station is adopted to generate target event data; the slave station determines the current transmission state of the target event data; the slave station determines a first target state corresponding to the current transmission state based on a slave station state machine; the slave station sets the state of the target event data from the current transmission state to a first target state, and determines a first processing task corresponding to the target event data based on the first target state; and the secondary station processes the target event data based on the first processing task and communicates the secondary station after processing the target event data with the primary station. That is, the target event data is generated in the slave station, and the slave station determines the corresponding state based on the slave station state machine according to different transmission states of the target event data, so that the slave station can execute corresponding processing operation on the target event data to achieve the purpose of processing the event data, thereby avoiding the problem that the event data cannot be effectively processed due to the loss of the event data or the confusion of event data transfer logic, avoiding the problem that the event data is low in processing efficiency and even fails to be processed due to the influence of the network state in the data processing process, further solving the technical problem of low data processing efficiency and achieving the technical effect of improving the data processing efficiency.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the invention;
FIG. 3 is a flow chart of another data processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a slave station state machine model according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a master station state machine model according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a secondary station state machine versus a primary station state machine according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention; and
fig. 8 is a schematic diagram of another data processing apparatus according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, there is provided a data processing system.
FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present invention. As shown in fig. 1, the data processing system 10 includes: a secondary station 11 and a primary station 12.
The slave station 11 is provided with a slave station state machine, wherein the slave station 11 is configured to generate target event data and transmit the target event data based on the slave station state machine.
In this embodiment, the slave state machine is a data model, and the slave state machine may include 5 states, namely idle, transmit, wait, delete and save states.
In the above embodiment, the secondary station 11 transmits the target event data to the primary station 12, and if the primary station 12 successfully receives the target event data, it transmits an acknowledgement packet to the secondary station 11, so that the secondary station 11 determines whether the data transmission is successful. In this embodiment, if the slave station 11 successfully receives the acknowledgement packet sent by the master station 12, the slave station 11 skips the state to the delete state based on the state machine of the slave station to delete the target event data successfully sent, and if the slave station 11 does not successfully receive the acknowledgement packet sent by the master station 12, the slave station 11 skips the state to the send state based on the state machine of the slave station to retransmit the target event data unsuccessfully sent, so that the stability of the state machine of the slave station can be increased, which is beneficial to successful return of the event data to the master station.
Optionally, in this embodiment, since the time of generating the event data is relatively random, the event data may occur in the data returning process, so as to ensure that the data is not lost, the priority of the save state is set to be higher, and each state may jump to the save state, and jump back to the original state after the event data is saved successfully.
A master station 12 connected to the slave stations 11 and provided with a master station state machine, wherein the master station is adapted to receive and process target event data transmitted by the slave stations 11 based on the master station state machine.
In this embodiment, the master state machine is a data model, which may include 4 states, namely idle, receive, save and acknowledge states.
In the above embodiment, when the master station state machine is in the idle state, the master station 12 receives data sent to the master station 12, the data includes target event data sent by the slave station 11, when the data is sent to the master station 12, the master station state machine skips the state to the receiving state, after receiving the data, the master station 12 will perform a preliminary check on the received data, if the received data is the target event data sent by the slave station 11, the master station state machine skips the state to the save state to save the target event data, otherwise, the master station state machine skips the state to the idle state to wait for the data sent next time, after the master station 12 saves the target event data, the master station 12 skips the state to the confirmation state to enable the master station 12 to send a confirmation packet to the slave station 11 to help the slave station 11 complete the subsequent operation, if the saved data is wrong, the master station 12 will discard the data, and meanwhile, the master station state machine skips the state to the idle state to wait for the data sent next time, so that the master station can realize clear processing efficiency of the data between the slave station and the implementation of the program.
According to the data processing system, the secondary station state machine model and the primary station state machine model are added, the secondary station is used for generating target event data in the secondary station, and according to different transmission states of the target event data, the secondary station can determine corresponding states based on the secondary station state machine, so that the secondary station can execute corresponding processing operation on the target event data to achieve the purpose of processing the event data, the problem that event data cannot be effectively processed due to loss of the event data or confusion of event data transfer logic is avoided, the problem that the event data cannot be effectively processed due to influence of network states in the data processing process is also avoided, the problem that the processing efficiency of the event data is low or even the processing fails is solved, and the technical problem of low data processing efficiency is further solved, and the technical effect of improving the data processing efficiency is achieved.
Example 2
According to an embodiment of the present invention, there is provided an embodiment of a data processing method, and it should be noted that the data processing method of this embodiment may be performed by the data processing system of embodiment 1 of the present invention, the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
The application provides a data processing method from a slave station side.
Fig. 2 is a flow chart of a data processing method according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
step S202, the slave station generates target event data.
In the technical solution provided in step S202 of the present application, the secondary station may generate event data and store the event data according to the time sequence of the generation of the event data.
Step S204, the secondary station determines the current transmission state of the target event data.
In the technical solution provided in step S204 of the present application, after the secondary station generates the target event data, the secondary station may determine the current transmission state of the target event data, so that the secondary station may execute the corresponding operation according to the current transmission state of the target event data.
In step S206, the secondary station determines a first target state corresponding to the current transmission state based on the secondary station state machine.
In the solution provided in step S206 of the present application, after the secondary station determines the current transmission state of the target event data, the secondary station may determine the first target state corresponding to the current transmission state based on the secondary station state machine. The slave station state machine may include 5 states, which are idle, transmit, wait, delete, and save states, respectively, and after determining the current transmission state of the target event data, the first target state corresponding to the current transmission state may be one or more states of the 5 states, and if the first target state is a plurality of states in the slave station state machine, the slave station performs a skip state according to a logical order in the plurality of states based on the slave station state machine.
Optionally, in this embodiment, since the time generated by the event data in the slave station is relatively random, it may occur in the data backhaul process, so as to ensure that the data is not lost, the priority of the save state in the slave station state machine is set to be higher, and each state may jump to the save state, and jump back to the original state after the event data is saved successfully, where the state of the slave station state machine is determined to be the state before the save state.
Optionally, the slave state machine in this embodiment is a data model.
In step S208, the slave station sets the state of the target event data from the current transmission state to a first target state, and determines a first processing task corresponding to the target event data based on the first target state.
In the technical solution provided in step S208 of the present application, after the slave station determines the first target state corresponding to the current transmission state based on the slave station state machine, the slave station may set the state of the target event data from the current transmission state to the first target state, that is, the current transmission state of the target event data may correspond to one or more states of the slave station state machine, and when the current transmission state of the target event data corresponds to the states of the slave station state machine, the slave station may set the state of the target event data from the current transmission state to the states of the slave station state machine in a logical order, so that the slave station may determine the first processing task corresponding to the target event data according to the indication of the first target state.
Step S210, the slave station processes the target event data based on the first processing task, and communicates the slave station after processing the target event data with the master station.
In the technical solution provided in step S210 of the present application, after the slave station determines the first processing task corresponding to the target event data, the slave station may process the target event data according to the content of the first processing task, and after processing the target event data, the slave station may communicate with the master station.
Optionally, communication between the secondary station and the primary station in this embodiment may include the secondary station transmitting or transmitting back to the primary station historical event data stored in the secondary station.
Generating target event data by the secondary station through the above-described steps S202 to S210 of the present application; the slave station determines the current transmission state of the target event data; the slave station determines a first target state corresponding to the current transmission state based on a slave station state machine; the slave station sets the state of the target event data from the current transmission state to a first target state, and determines a first processing task corresponding to the target event data based on the first target state; the secondary station processes the target event data based on the first processing task and communicates the secondary station after processing the target event data with the primary station. That is, the target event data is generated in the slave station, and the slave station determines the corresponding state based on the slave station state machine according to different transmission states of the target event data, so that the slave station can execute corresponding processing operation on the target event data to achieve the purpose of processing the event data, thereby avoiding the problem that the event data cannot be effectively processed due to the loss of the event data or the confusion of event data transfer logic, avoiding the problem that the event data is low in processing efficiency and even fails to be processed due to the influence of the network state in the data processing process, further solving the technical problem of low data processing efficiency and achieving the technical effect of improving the data processing efficiency.
The above-described method of this embodiment is further described below.
As an alternative embodiment, the master station has a second target state corresponding to the first target state, and step S210, communicating the slave station after processing the target event data with the master station includes: communication is performed between the secondary station and the primary station based on the first target state and the second target state.
In this embodiment, the states of the master station and the slave station change with the transmission and reception of event data, when the slave station is to transmit event data, the slave station jumps the state to a first target state based on the slave station state machine, at this time, the master station starts to prepare to receive event data transmitted by the slave station, and therefore, the master station jumps the state to a second target state corresponding to the first target state based on the master station state machine, so that the master station can receive event data transmitted by the slave station, thereby enabling communication between the master station and the slave station according to the interrelated states.
As an optional implementation manner, step S204, the secondary station determines the current transmission state of the target event data, including at least one of the following: the slave station determines the current transmission state as the state of the target event data in the data transmission process; the slave station determines that the current transmission state is the successful state of the target event data transmission; the secondary station determines that the current transmission state is a state in which the transmission of the target event data fails.
In this embodiment, when processing the target event data after the target event data is generated by the secondary station, the target event data may have three transmission states, a state in which the target event data is transmitted, a state in which the target event data is successfully transmitted, and a state in which the target event data is failed to be transmitted.
As an optional implementation manner, step S206, the secondary station determines, based on the secondary station state machine, a first target state corresponding to the current transmission state, including at least one of the following: under the condition that the current transmission state is the state of target event data in the data transmission process, the secondary station determines a first storage state corresponding to the current transmission state based on a secondary station state machine, wherein the first target state comprises a first storage state, and the first storage state is used for indicating the secondary station to store the target event data; under the condition that the current transmission state is a state that the target event data is successfully transmitted, the slave station determines a waiting state corresponding to the current transmission state based on a slave station state machine, wherein the first target state comprises the waiting state, the waiting state is used for indicating the slave station to wait for receiving a confirmation packet, the confirmation packet is used for indicating that the target event data is successfully transmitted, and the master station successfully receives the target event data; in the case that the current transmission state is a state of failure in transmission of the target event data, the secondary station determines a transmission state corresponding to the current transmission state based on a secondary station state machine, wherein the first target state includes a transmission state for indicating the secondary station to transmit the target event data.
In this embodiment, after determining the current transmission state of the target event data, for each transmission state of the target event data, the secondary station determines a first target state corresponding to the current transmission state based on the secondary station state machine, that is, when the current transmission state is a state of the target event data in the data transmission process, the secondary station determines the first target state to be a first save state based on the secondary station state machine, in which the secondary station can save the generated target event data; when the current transmission state is a state that the target event data is successfully transmitted, the slave station successfully transmits the target event data to the master station, and at the moment, the slave station determines the first target state to be a waiting state based on a slave station state machine, and in the waiting state, the slave station can wait for receiving an acknowledgement packet transmitted from the master station; when the current transmission state is the state that the target event data transmission fails, the slave station does not successfully transmit the target event data to the master station, at this time, the slave station determines that the first target state is the transmission state based on the slave station state machine, and in the transmission state, the slave station can retransmit the unsuccessfully transmitted target event data to the master station.
As an optional implementation manner, step S208, the secondary station sets the state of the target event data from the current transmission state to the first target state, and determines, based on the first target state, a first processing task corresponding to the target event data, where the first processing task includes at least one of the following: the slave station sets the state of the target event data from the current transmission state to a first storage state, and determines that the target event data is successfully stored based on the first storage state, wherein the first processing task comprises determining that the target event data is successfully stored; the method comprises the steps that a slave station sets the state of target event data to a waiting state from a current transmission state, determines a confirmation packet used for indicating that the target event data is successfully transmitted and a master station successfully receives the target event data based on the waiting state, wherein a first processing task comprises determining the confirmation packet used for indicating that the target event data is successfully transmitted and the master station successfully receives the target event data; the secondary station sets the state of the target event data from the current transmission state to a transmission state and determines to retransmit the failed-to-transmit target event data based on the transmission state, wherein the first processing task includes retransmitting the failed-to-transmit target event data.
In this embodiment, after the slave station determines the first target state corresponding to the current transmission state based on the slave station state machine, the slave station may set the state of the target event data from the current transmission state to the first target state, and determine the first processing task corresponding to the target event data according to the indication of the first target state, that is, when the slave station determines that the first target state is the first save state based on the slave station state machine, the slave station may set the state of the target event data to the first save state at this time, and then determine that the first processing task corresponding to the target event data is to successfully save the target event data according to the indication of the first save state; when the slave station determines that the first target state is a waiting state based on the slave station state machine, at the moment, the slave station can set the state of the target event data as the waiting state, then according to the indication of the waiting state, the first processing task corresponding to the target event data is determined to be waiting for receiving a confirmation packet for determining that the slave station successfully transmits the target event data, and the master station successfully receives the target event data; when the slave station determines that the first target state is the sending state based on the slave station state machine, at this time, the slave station can set the state of the target event data to be the sending state, and then determine that the first processing task corresponding to the target event data is to resend the failed target event data according to the indication of the sending state, so that missing processing of the failed target event data can be avoided, and the slave station is beneficial to successfully returning the target event data to the master station.
As an alternative embodiment, after the secondary station determines the waiting state corresponding to the current transmission state based on the secondary station state machine in step S206, the method further includes: the secondary station sets a time interval; in the case that the time for waiting for receiving the acknowledgement packet by the slave station in the waiting state does not exceed the time interval, the slave station determines that the acknowledgement packet is successfully received; in the case where the time for which the slave station waits to receive the acknowledgement packet in the waiting state exceeds the time interval, the slave station determines that the acknowledgement packet was not successfully received.
In this embodiment, the secondary station may set a time interval for the secondary station to determine the time of receiving the acknowledgement packet transmitted by the primary station in the waiting state, and if the secondary station successfully receives the acknowledgement packet transmitted by the primary station in this time interval, it indicates that the secondary station successfully transmits the target event data to the primary station, and the primary station successfully receives the target event data, and if the secondary station does not receive the acknowledgement packet transmitted by the primary station in this following time interval, it indicates that the secondary station fails to transmit the target event data, or the secondary station successfully transmits the target event data, but the primary station does not successfully receive the target event data.
As an alternative embodiment, after the secondary station determines that the acknowledgement packet was successfully received, the method further comprises: the slave station jumps the wait state to a delete state based on the slave station state machine, wherein the delete state is used to indicate that the slave station deletes the successfully transmitted target event data.
In this embodiment, if the slave station successfully receives the acknowledgement packet sent by the master station within the set time interval, it is stated that the slave station successfully sends the target event data to the master station, and the master station successfully receives the target event data, at this time, the slave station may skip the waiting state to the deleting state based on the slave station state machine, so as to delete the target event data that has been sent and successfully received by the master station, thereby avoiding the slave station from repeatedly sending the event data that has been sent and successfully received by the master station, and improving the efficiency of sending the target event data by the slave station.
The application also provides another data processing method from the side of the main station.
Fig. 3 is a flow chart of another data processing method according to an embodiment of the present invention. As shown in fig. 3, the method may include the steps of:
in step S302, the master station determines a second target state corresponding to a current transmission state of target event data based on the master station state machine, wherein the target event data is generated by the slave station and the current transmission state of the target event data is determined by the slave station.
In the technical solution provided in step S302 of the present application, after the slave station determines the current transmission state of the target event data, the master station may determine, based on the master station state machine, a second target state corresponding to the current transmission state of the target event data. The master station state machine may include 4 states, which are idle, receiving, storing and confirming states, and the second target state corresponding to the target event data may be one or more states of the 4 states, and if the second target state is a plurality of states in the master station state machine, the master station may perform the jump states according to the logic sequence in the plurality of states based on the master station state machine.
Optionally, the second target state in this embodiment corresponds to the first target state in the secondary station.
Alternatively, the current transmission state of this embodiment may correspond to a first target state in the secondary station, the first target state corresponding to the current transmission state may be determined by the secondary station based on the secondary station state machine, the state of the target event data may be determined by the secondary station setting the current transmission state to the first target state, the first target state may be used to determine a first processing task corresponding to the target event data, and the first processing task may be used for the secondary station to process the target event data.
Optionally, the master state machine in this embodiment is a data model.
In step S304, the master station sets the state of the target event data from the current transmission state to a second target state, and determines a second processing task corresponding to the target event data based on the second target state.
In the technical solution provided in the above step S304 of the present application, after the master station determines the second target state corresponding to the current transmission state of the target event data based on the master station state machine, the master station may set the state of the target event data from the current transmission state to the second target state, that is, the current transmission state of the target event data may correspond to one or more states of the master station state machine, and when the current transmission state of the target event data corresponds to the states of the master station state machine, the master station may sequentially set the state of the target event data from the current transmission state to the states of the master station state machine according to the logic sequence, so that the master station may determine the second processing task corresponding to the target event data according to the indication of the second target state.
Step S306, the master station processes the target event data based on the second processing task, and communicates the master station after processing the target event data with the slave station after processing the target event data.
In the technical solution provided in step S306 of the present application, after the master station determines the second processing task corresponding to the target event data, the master station may process the target event data according to the content of the second processing task, and after processing the target event data, the master station may communicate with the slave station after processing the target event data.
Optionally, in this embodiment, the master station communicates with the slave station, and may include the master station receiving and storing the target event data sent by the slave station, and sending an acknowledgement packet to the slave station indicating that the master station successfully received the target event data, so as to assist the slave station in completing subsequent operations.
The above-described method of this embodiment is further described below.
As an optional implementation manner, step S302, the master station determines, based on the master station state machine, a second target state corresponding to the current transmission state of the target event data, including at least one of the following: when the current transmission state of the target event data is in the state of the sending process of the target event data or the state of failure in sending the target event data, the master station determines an idle state corresponding to the current transmission state of the target event data based on a master station state machine, wherein the second target state comprises the idle state, the idle state is used for indicating the master station to wait for receiving data, and the data comprise the target event data; and under the condition that the current transmission state of the target event data is the state that the target event data is successfully transmitted, the master station determines a receiving state corresponding to the current transmission state of the target event data based on a master station state machine, wherein the second target state comprises the receiving state, and the receiving state is used for indicating the master station to receive the data.
In this embodiment, after the slave station determines the current transmission state of the target event data, for each transmission state of the target event data, the master station determines a second target state corresponding to the current transmission state based on the master station state machine, that is, when the current transmission state is a state in which the target event data is in the process of being transmitted, or the transmission of the target event data fails, at this time, since the master station does not receive the target event data transmitted by the slave station, the master station determines the second target state to be an idle state based on the master station state machine, in which the master station can wait for the reception of the target event data transmitted by the slave station; when the current transmission state is the state that the target event data is successfully transmitted, at this time, since the target event data is successfully transmitted from the slave station to the master station, the master station determines the second target state as a receiving state based on the master station state machine, and in the receiving state, the master station can receive the target event data transmitted from the slave station.
Alternatively, the master station of this embodiment may receive other data in addition to the target event data transmitted by the slave station when receiving the data.
As an alternative embodiment, after the master station determines the receiving state corresponding to the current transmission state of the target event data based on the master station state machine, the method further comprises: under the condition that the data is the target event data, the master station jumps the receiving state to a second saving state based on a master station state machine, wherein the second saving state is used for indicating the master station to save the data; in the event that the data is not targeted event data, the master station jumps the receive state to the idle state based on the master station state machine.
In this embodiment, after the master station determines that the second target state is the receiving state based on the master station state machine, and receives data in the receiving state, the master station checks the received data, and in the case that the received data is the target event data, the master station jumps the receiving state to the second save state based on the master station state machine, and in the second save state, the master station can save the received target event data; in the case where the received data is not the target event data, the master station will jump the receiving state to an idle state based on the master station state machine, in which the master station can continue waiting for the next arrival of data.
As an alternative embodiment, after the master station jumps the receiving state to the second saving state based on the master station state machine, the method further comprises: under the condition that the data is the target event data, the master station jumps the second storage state to a confirmation state based on a master station state machine, wherein the confirmation state is used for indicating the master station to send a confirmation packet; in the event that the data is not targeted event data, the master discards the data and jumps the second save state to an idle state based on the master state machine.
In this embodiment, after the master station receives the data and saves the data, in the second save state, the master station continues to check the saved event data again, if the saved data is the target event data, the master station jumps the second save state to a confirmation state based on the master station state machine, and in the confirmation state, the master station can send a confirmation packet to the slave station, so that the slave station can determine that the sent target event data is successfully sent and is successfully received by the master station, thereby helping the slave station complete the subsequent operation; if the stored data is not the target event data, the master station discards the stored data, and then jumps the second stored state to an idle state based on the master station state machine, and in the idle state, the master station can continue waiting for the next arrival of data.
In the related art, when some unknown error occurs in the process of transmitting data from the secondary station to the primary station, the primary station does not successfully receive the event data transmitted by the secondary station, or the primary station successfully receives the data of the secondary station and successfully transmits an acknowledgement packet to the secondary station, but the acknowledgement packet is lost in the transmission process, so that logic confusion of event data transmission of the secondary station is caused, the event data is lost, in the data back transmission process, new event data is still generated in the secondary station, and the new event data is lost due to the logic confusion of event data transmission of the secondary station, in addition, the back transmission process of the data is easily influenced by the network state, and when the network state is poor, the back transmission time of the event data is long, even the back transmission fails, so that the problem of low processing efficiency of the event data is caused.
According to the data processing method, the target event data are generated in the slave station, and the slave station can determine the corresponding state based on the slave station state machine according to different transmission states of the target event data, so that the slave station can execute corresponding processing operation on the target event data to achieve the purpose of processing the event data, meanwhile, the master station receives the target event data sent by the slave station and responds to whether the target event data are received or not based on the master station state machine, communication between the master station and the slave station is achieved, the problem that the event data cannot be effectively processed due to the fact that the event data are lost or the event data transfer logic is disordered is solved, the problem that the event data processing efficiency is low or even the event data are failed due to the fact that the influence of the network state is caused in the data processing process is avoided, the technical problem of low data processing efficiency is solved, and the technical effect of improving the data processing efficiency is achieved.
Example 3
The data processing method of the embodiment of the application is specifically described below through a slave state machine model and a master state machine model.
Fig. 4 is a schematic diagram of a slave station state machine model according to an embodiment of the invention. As shown in fig. 4, the slave state machine model shows five states, namely an idle state 41, a transmit state 42, a wait state 43, a delete state 44, and a save state 45.
In this embodiment, in the slave station state machine model, since the time generated by the Event data in the slave station is relatively random and may occur in the data backhaul process, in order to ensure that the Event data is not lost, the priority of the save state 45 is set to be high, and each state may jump to the save state 45, where the save state 45 is used to save the Event data, and in the case where the Event data (Event) is successfully saved, the slave station may jump the save state 45 back to the original state based on the slave station state machine.
In this embodiment, in the slave station state machine model, the idle state 41 is used to instruct the slave station to wait to transmit the generated Event data, and in the case that there is a time (time) for generating the Event data in the slave station and there is Event data (Event) that can be transmitted, the slave station can jump the idle state 41 to the transmitting state 42 or the save state 45 based on the slave station state machine; the transmitting state 42 is used for indicating that the slave station can transmit the generated event data, and in the case that the slave station transmits the event data, the slave station can jump the transmitting state 42 to the waiting state 43 or the saving state 45 based on the slave station state machine; the waiting state 43 is used for indicating the slave station to wait for receiving the acknowledgement packet sent by the master station, and when the slave station receives the acknowledgement packet (Confirm) in a set Time interval, the slave station can skip the waiting state 43 to the deleting state 44 based on the slave station state machine, and when the slave station does not receive the acknowledgement packet in the set Time interval (Time), the slave station can skip the waiting state 43 to the sending state 42 based on the slave station state machine, and the slave station can send event data which is not successfully received by the master station again; the deletion state 44 is used to instruct the secondary station to delete the event data that has been transmitted and successfully received by the primary station, and after the event data that has been transmitted and successfully received has been deleted, the secondary station can skip the deletion state 44 to the idle state 41 or the save state 45 based on the secondary station state machine, and perform the processing of the next event data.
According to the secondary station state machine model in the embodiment of the application, the flow of processing the event data in the secondary station can be logically and clearly realized, communication between the secondary station and the primary station is realized, the problem that the event data cannot be effectively processed due to loss of the event data or confusion of event data transmission logic is avoided, the problem that the event data cannot be successfully transmitted or received due to influence of a network state in the data processing process is also avoided, the stability of the secondary station state machine model is improved, and the secondary station is facilitated to successfully transmit the historical event data and the newly generated event data back to the primary station.
Fig. 5 is a schematic diagram of a master station state machine model according to an embodiment of the invention. As shown in fig. 5, four states are shown in the master state machine model, namely an idle state 51, a receive state 52, a save state 53 and an acknowledge state 54.
In this embodiment, in the master state machine model, the idle state 51 is used to instruct the master to wait to receive Data sent to the master, in which case the master can jump the idle state 51 to the receive state 52 based on the master state machine; the receiving state 52 is used for indicating the master station to receive the data sent to the master station, in the case that the data received by the master station is Not the Event data (Not Event) sent by the slave station, the master station can skip the receiving state 52 back to the idle state 51 based on the master station state machine to continue waiting to receive the data sent to the master station, and in the case that the data received by the master station is the Event data (Event) sent by the slave station, the master station can skip the receiving state 52 to the storing state 53 based on the master station state machine; the save state 53 is used to instruct the master station to save the received event data, where the master station can jump the save state 53 back to the idle state 51 based on the master station state machine when the event data saved by the master station is not event data (Error) sent by the slave station, and continue to wait to receive the data sent to the master station, and the master station can jump the save state 53 to the confirm state 54 based on the master station state machine when the event data saved by the master station is event data sent by the slave station; the acknowledgement state 54 is used to instruct the master station to send an acknowledgement packet to the slave station, where the acknowledgement packet is used to instruct the slave station to successfully send event data to the master station, and the master station successfully receives the event data, and when the master station sends an acknowledgement packet to the slave station, the master station can skip the acknowledgement state 54 to the idle state 51 based on the master station state machine, and process the next event data.
Through the master station state machine model in the embodiment of the application, the flow for processing the event data in the master station can be logically and clearly realized, communication between the master station and the slave station is realized, the problem that the event data cannot be effectively processed due to loss of the event data or confusion of event data transfer logic is avoided, the problem that the event data cannot be successfully transmitted or received due to influence of a network state in the data processing process is also avoided, the stability of the master station state machine model is improved, and the master station successfully returns the historical event data in the slave station and the newly generated event data.
Fig. 6 is a schematic diagram of a correspondence between a slave state machine and a master state machine according to an embodiment of the present invention. As shown in fig. 6, the state of the master station 62 and the state of the slave station 61 change with transmission and reception of data packets of event data, and the state of the master station 62 and the state of the slave station 61 are correlated with each other. When the event data in the slave station 61 is transmitted or the master station 62 receives the event data, the state in the slave station 61 and the state in the master station 62 can perform logic clear operation and jump so as to better realize the transmission of the event data by the slave station 61 or the reception of the event data by the master station 62, thereby better realizing the transmission of the event data in the slave station 61 back to the master station 62 and also facilitating better reading and programming of a user.
In this embodiment, when the data packet of the event data is lost in the transmission process, the retransmission of the data packet of the event data can be performed according to the time interval (timeout time) set by the slave station 61, so that the link state can be quickly recovered, the event data can be ensured to be accurately and quickly transmitted back to the master station 62, the transmission of the historical event data and the newly generated event data in the slave station 61 is facilitated, and the influence of the network environment on the transmission of the event data can be reduced.
Through the mutual correspondence between the states of the slave station state machine and the master station state machine in the embodiment of the application, the task to be completed in each state can be clarified, the logic is clear, the program operation error can be effectively controlled, the packet loss rate of the data packet of the event data can be reduced, the problem that the event data cannot be effectively processed due to the loss of the event data or the confusion of the event data transfer logic is avoided, the problem that the event data is low in processing efficiency and even fails to be avoided due to the influence of the network state in the data processing process is also avoided, the technical problem of low data processing efficiency is further solved, and the technical effect of improving the data processing efficiency is achieved.
Example 4
According to an embodiment of the present invention, there is also provided a data processing apparatus for implementing the above data processing method. It should be noted that the data processing apparatus of this embodiment may be used to perform the data processing method shown in fig. 2 according to the embodiment of the present invention.
Fig. 7 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention. As shown in fig. 7, the data processing apparatus 70 may include: a generating unit 71, a first determining unit 72, a second determining unit 73, a first setting unit 74, and a first processing unit 75.
A generation unit 71 for generating target event data from the station;
a first determining unit 72 for determining a current transmission state of the target event data from the station;
a second determining unit 73 for the secondary station determining a first target state corresponding to the current transmission state based on the secondary station state machine;
a first setting unit 74 for setting the state of the target event data from the current transmission state to a first target state by the secondary station, and determining a processing task corresponding to the target event data based on the first target state;
the first processing unit 75 is configured to process the target event data based on the processing task by the slave station, and communicate the slave station after processing the target event data with the master station.
According to an embodiment of the present invention, there is also provided another data processing apparatus for implementing the above data processing method. It should be noted that the data processing apparatus of this embodiment may be used to perform the data processing method shown in fig. 3 according to the embodiment of the present invention.
Fig. 8 is a schematic diagram of another data processing apparatus according to an embodiment of the present invention. As shown in fig. 8, the data processing apparatus 80 may include: a third determination unit 81, a second setting unit 82, and a second processing unit 83.
A third determining unit 81, configured to determine, by the master station, a second target state corresponding to a current transmission state of target event data based on the master station state machine, where the target event data is generated by the slave station, the current transmission state of the target event data is determined by the slave station, where a first target state corresponding to the current transmission state is determined by the slave station based on the slave station state machine, the state of the target event data is determined by the slave station setting the current transmission state to the first target state, the first target state is used for determining a first processing task corresponding to the target event data, and the first processing task is used for processing the target event data by the slave station;
a second setting unit 82, configured to set, by the master station, a state of the target event data from the current transmission state to a second target state, and determine a second processing task corresponding to the target event data based on the second target state;
The second processing unit 83 is configured to process the target event data by the master station based on the second processing task, and communicate the master station after processing the target event data with the slave station after processing the target event data.
According to the data processing device, the target event data are generated in the slave station, and the slave station can determine the corresponding state based on the state machine of the slave station according to different transmission states of the target event data, so that the slave station can execute corresponding processing operation on the target event data to achieve the purpose of processing the event data, meanwhile, the master station receives the target event data sent by the slave station and responds to whether the target event data are received or not based on the state machine of the master station, communication between the master station and the slave station is achieved, the problem that the event data cannot be effectively processed due to loss of the event data or confusion of event data transfer logic is solved, the problem that the event data processing efficiency is low or even processing fails due to the influence of the network state in the data processing process is solved, and the technical effect of improving the data processing efficiency is achieved.
Example 4
According to an embodiment of the present invention, there is also provided a computer-readable storage medium including a stored program, wherein the program performs the data processing method described in embodiment 2.
Example 5
According to an embodiment of the present invention, there is also provided a processor for running a program, wherein the program when run performs the data processing method described in embodiment 2.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (16)

1. A method of data processing, comprising:
generating target event data by the secondary station;
the secondary station determining a current transmission state of the target event data;
the secondary station determining a first target state corresponding to the current transmission state based on a secondary station state machine;
the slave station sets the state of the target event data from the current transmission state to the first target state, and determines a first processing task corresponding to the target event data based on the first target state;
the secondary station processes the target event data based on the first processing task and communicates the secondary station after processing the target event data with the primary station;
the secondary station setting the state of the target event data from the current transmission state to the first target state, comprising: setting the priority of the state in the slave station state machine; in response to the first target state comprising a plurality of the states in the slave state machine, the slave station sets the current transmission state to a plurality of the states based on a logical order.
2. The method of claim 1, wherein the master station has a second target state corresponding to the first target state, wherein communicating the slave station after processing the target event data with the master station comprises:
the secondary station communicates with the primary station based on the first target state and the second target state.
3. The method of claim 1, wherein the secondary station determining a current transmission status of the target event data comprises at least one of:
the secondary station determines the current transmission state as the state of the target event data in the data transmission process;
the secondary station determines that the current transmission state is the state of successful transmission of the target event data;
the secondary station determines that the current transmission state is the state of failure in sending the target event data.
4. A method according to claim 3, wherein the secondary station determining a first target state corresponding to the current transmission state based on a secondary station state machine comprises at least one of:
in the case that the current transmission state is a state of the target event data in a data transmission process, the secondary station determines a first storage state corresponding to the current transmission state based on the secondary station state machine, wherein the first target state comprises the first storage state, and the first storage state is used for indicating the secondary station to store the target event data;
In the case that the current transmission state is a state that the target event data is successfully transmitted, the secondary station determines a waiting state corresponding to the current transmission state based on the secondary station state machine, wherein the first target state comprises the waiting state, the waiting state is used for indicating the secondary station to wait for receiving an acknowledgement packet, the acknowledgement packet is used for indicating that the target event data is successfully transmitted, and the primary station successfully receives the target event data;
and under the condition that the current transmission state is the state of failure in transmitting the target event data, the secondary station determines a transmission state corresponding to the current transmission state based on the secondary station state machine, wherein the first target state comprises the transmission state, and the transmission state is used for indicating the secondary station to transmit the target event data.
5. The method of claim 4, wherein the secondary station sets the state of the target event data from the current transmission state to the first target state, and determines a first processing task corresponding to the target event data based on the first target state, comprising at least one of:
The secondary station sets the state of the target event data from the current transmission state to the first storage state, and determines that the target event data is successfully stored based on the first storage state, wherein the first processing task comprises determining that the target event data is successfully stored;
the secondary station sets the state of the target event data to the waiting state from the current transmission state, and determines the acknowledgement packet used for indicating that the target event data is successfully transmitted and the primary station successfully receives the target event data based on the waiting state, wherein the first processing task comprises determining the acknowledgement packet used for indicating that the target event data is successfully transmitted and the primary station successfully receives the target event data;
the secondary station sets the state of the target event data from the current transmission state to the transmission state, and determines to retransmit the target event data that has failed to be transmitted based on the transmission state, wherein the first processing task includes retransmitting the target event data that has failed to be transmitted.
6. The method of claim 4, wherein after the secondary station determines a wait state corresponding to the current transmission state based on a secondary station state machine, the method further comprises:
The secondary station sets a time interval;
in the case that the time for the secondary station to wait for receiving the acknowledgement packet in the wait state does not exceed the time interval, the secondary station determines that the acknowledgement packet is successfully received;
in the case where the time for which the secondary station waits to receive the acknowledgement packet in the waiting state exceeds the time interval, the secondary station determines that the acknowledgement packet is not successfully received.
7. The method of claim 6, wherein after the secondary station determines that the acknowledgement packet was successfully received, the method further comprises:
the slave station jumps the waiting state to a deleting state based on the slave station state machine, wherein the deleting state is used for indicating the slave station to delete the target event data successfully transmitted.
8. A method of data processing, comprising:
the master station determines a second target state corresponding to a current transmission state of target event data based on a master station state machine, wherein the target event data is generated by a slave station, the current transmission state of the target event data is determined by the slave station, a first target state corresponding to the current transmission state is determined by the slave station based on a slave station state machine, the state of the target event data is determined by the slave station setting the current transmission state to the first target state, the first target state is used for determining a first processing task corresponding to the target event data, and the first processing task is used for processing the target event data by the slave station;
The master station sets the state of the target event data from the current transmission state to the second target state, and determines a second processing task corresponding to the target event data based on the second target state;
the master station processes the target event data based on the second processing task and communicates the master station after processing the target event data with the slave station after processing the target event data;
the state of the target event data is determined by the secondary station setting the current transmission state to the first target state, comprising: setting the priority of the state in the slave station state machine; in response to the first target state comprising a plurality of the states in the slave state machine, the state of the target event data is determined by the slave setting the current transmission state to a plurality of the states based on a logical order.
9. The method of claim 8, wherein the master station determining a second target state corresponding to a current transmission state of the target event data based on the master station state machine comprises at least one of:
in a case that the current transmission state of the target event data is a state of the target event data in the transmission process or a state of the target event data failed to be transmitted, the master station determines an idle state corresponding to the current transmission state of the target event data based on the master station state machine, wherein the second target state comprises the idle state, the idle state is used for indicating the master station to wait for receiving data, and the data comprises the target event data;
And under the condition that the current transmission state of the target event data is the state that the target event data is successfully transmitted, the master station determines a receiving state corresponding to the current transmission state of the target event data based on the master station state machine, wherein the second target state comprises the receiving state, and the receiving state is used for indicating the master station to receive the data.
10. The method of claim 9, wherein after the master station determines a reception state corresponding to the current transmission state of the target event data based on the master station state machine, the method further comprises:
the master station jumps the receiving state to a second saving state based on the master station state machine, wherein the second saving state is used for indicating the master station to save the data;
the master station jumps the receive state to the idle state based on the master station state machine in the event that the data is not the target event data.
11. The method of claim 10, wherein after the master station jumps the receive state to a second save state based on the master station state machine, the method further comprises:
The master station jumps the second save state to an acknowledge state based on the master station state machine, wherein the acknowledge state is used for indicating the master station to send an acknowledge packet;
and discarding the data by the master station and jumping the second save state to the idle state based on the master station state machine in the case that the data is not the target event data.
12. A data processing system, comprising:
a slave station provided with a slave station state machine, wherein the slave station is used for generating target event data and transmitting the target event data based on the slave station state machine, and the slave station is further used for setting the state of the target event data from the current transmission state to a first target state;
a master station connected with the slave station and provided with a master station state machine, wherein the master station is used for receiving and processing the target event data sent by the slave station based on the master station state machine;
wherein the secondary station is further configured to set the state of the target event data from the current transmission state to the first target state, including: setting the priority of the state in the slave station state machine; in response to the first target state comprising a plurality of the states in the slave state machine, the slave station sets the current transmission state to a plurality of the states based on a logical order.
13. A data processing apparatus, comprising:
a generation unit for generating target event data from the station;
a first determining unit configured to determine a current transmission state of the target event data by the secondary station;
a second determining unit, configured to determine, by the secondary station, a first target state corresponding to the current transmission state based on a secondary station state machine;
a first setting unit, configured to set, by the secondary station, a state of the target event data from the current transmission state to the first target state, and determine a processing task corresponding to the target event data based on the first target state;
the first processing unit is used for processing the target event data based on the processing task by the secondary station and communicating the secondary station after processing the target event data with the primary station;
the first setting unit is further configured to set a priority of the state in the slave station state machine; in response to the first target state comprising a plurality of the states in the slave state machine, the slave station sets the current transmission state to a plurality of the states based on a logical order.
14. A data processing apparatus, comprising:
A third determining unit, configured to determine, by a master station, a second target state corresponding to a current transmission state of target event data based on a master station state machine, where the target event data is generated by a slave station, the current transmission state of the target event data is determined by the slave station, a first target state corresponding to the current transmission state is determined by the slave station based on a slave station state machine, the state of the target event data is determined by the slave station setting the current transmission state to the first target state, the first target state is used to determine a first processing task corresponding to the target event data, and the first processing task is used for the slave station to process the target event data;
the second setting unit is used for setting the state of the target event data from the current transmission state to the second target state by the master station, and determining a second processing task corresponding to the target event data based on the second target state;
the second processing unit is used for processing the target event data based on the second processing task by the master station and communicating the master station after processing the target event data with the slave station after processing the target event data;
Wherein the state of the target event data is determined by the secondary station setting the current transmission state to the first target state, comprising: setting the priority of the state in the slave station state machine; in response to the first target state comprising a plurality of the states in the slave state machine, the state of the target event data is determined by the slave setting the current transmission state to a plurality of the states based on a logical order.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when run, controls a device in which the storage medium is located to perform the data processing method of any one of claims 1 to 11.
16. A processor for executing a program, wherein the program when executed performs the data processing method of any one of claims 1 to 11.
CN202011043037.4A 2020-09-28 2020-09-28 Data processing method, system, device, storage medium and processor Active CN112187408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011043037.4A CN112187408B (en) 2020-09-28 2020-09-28 Data processing method, system, device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011043037.4A CN112187408B (en) 2020-09-28 2020-09-28 Data processing method, system, device, storage medium and processor

Publications (2)

Publication Number Publication Date
CN112187408A CN112187408A (en) 2021-01-05
CN112187408B true CN112187408B (en) 2024-04-12

Family

ID=73946656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011043037.4A Active CN112187408B (en) 2020-09-28 2020-09-28 Data processing method, system, device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN112187408B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113746896B (en) * 2021-07-23 2023-07-21 深圳供电局有限公司 Data transmission method, device, system and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101553046A (en) * 2008-04-01 2009-10-07 英华达(南京)科技有限公司 3G mobile communication device and method thereof capable of realizing multi-channel protocol
JP2011024238A (en) * 2003-12-29 2011-02-03 Electronics & Telecommunications Research Inst Packet retransmission method in mobile communication system, and computer readable recording medium recording program of the same
CN102025717A (en) * 2010-09-10 2011-04-20 香港城市大学深圳研究院 Method for transmitting multimedia data
CN104883335A (en) * 2014-02-27 2015-09-02 王磊 Full-hardware TCP protocol stack realizing method
CN109218156A (en) * 2018-11-02 2019-01-15 合肥保得工业自动化有限公司 A kind of management method of Dynamic link library data
CN111628919A (en) * 2020-05-12 2020-09-04 中电科航空电子有限公司 Method for realizing Arinc485 protocol state machine

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011024238A (en) * 2003-12-29 2011-02-03 Electronics & Telecommunications Research Inst Packet retransmission method in mobile communication system, and computer readable recording medium recording program of the same
CN101553046A (en) * 2008-04-01 2009-10-07 英华达(南京)科技有限公司 3G mobile communication device and method thereof capable of realizing multi-channel protocol
CN102025717A (en) * 2010-09-10 2011-04-20 香港城市大学深圳研究院 Method for transmitting multimedia data
CN104883335A (en) * 2014-02-27 2015-09-02 王磊 Full-hardware TCP protocol stack realizing method
CN109218156A (en) * 2018-11-02 2019-01-15 合肥保得工业自动化有限公司 A kind of management method of Dynamic link library data
CN111628919A (en) * 2020-05-12 2020-09-04 中电科航空电子有限公司 Method for realizing Arinc485 protocol state machine

Also Published As

Publication number Publication date
CN112187408A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
US5459725A (en) Reliable multicasting over spanning trees in packet communications networks
AU644800B2 (en) Data communication method and system
US8284669B2 (en) Data acknowledgement apparatus and method
CN102368700B (en) Transmission method of massages in distributed system
US20020054570A1 (en) Data communication system, data communication method, and recording medium with data communication program recorded thereon
JP3349926B2 (en) Receiving control device, communication control system, and communication control method
US9031076B2 (en) Processing requests
US9037935B2 (en) Apparatus and method for retransmitting message in message transmission system
KR20050042198A (en) System for efficient recovery of node-b buffered data following mac layer reset
CN101009536B (en) Status report method of automatic retransfer request
CN109981385B (en) Method, device and system for realizing packet loss detection
CN112187408B (en) Data processing method, system, device, storage medium and processor
CN112395237B (en) Method and system for communication between at least two controllers
CN105634894B (en) A kind of enhanced CAN bus data re-transmitting method and device
WO2015031120A1 (en) Wireless networking with flexibly-ordered relayers
JPH1070523A (en) Method and equipment for packet transmission
CN101094241B (en) Transmission method and device of hybrid automatic requesting retransmission
CN111417116B (en) Communication method and system adapted through ATT, read-write and exception handling
CN111464514A (en) TCP hot backup method and system
CN101626287A (en) Method and device for delivering status reports
JPH11252134A (en) Broadcast communication system
EP1032177B1 (en) Signal processing apparatus with three layer processing sections
CN116743324B (en) Data transmission method, device, receiving end, storage medium, system and server
WO2022056791A1 (en) Packet retransmission method and apparatus
JP2776274B2 (en) Virtual buffer control system in relay computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant