CN110933059A - Data communication method and device, electronic equipment, upper computer and storage medium - Google Patents

Data communication method and device, electronic equipment, upper computer and storage medium Download PDF

Info

Publication number
CN110933059A
CN110933059A CN201911154581.3A CN201911154581A CN110933059A CN 110933059 A CN110933059 A CN 110933059A CN 201911154581 A CN201911154581 A CN 201911154581A CN 110933059 A CN110933059 A CN 110933059A
Authority
CN
China
Prior art keywords
entity
receiver
input entity
lower computer
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911154581.3A
Other languages
Chinese (zh)
Inventor
邓春风
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Kun Electronic Technology Co Ltd
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shikun Electronic Technology Co Ltd
Original Assignee
Guangzhou Kun Electronic Technology Co Ltd
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Kun Electronic Technology Co Ltd, Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Kun Electronic Technology Co Ltd
Priority to CN201911154581.3A priority Critical patent/CN110933059A/en
Publication of CN110933059A publication Critical patent/CN110933059A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Abstract

The present disclosure provides a data communication method and apparatus, an electronic device, an upper computer, and a storage medium, including: responding to the received operation command sent by the object, determining at least one input entity corresponding to the operation command, sending the at least one input entity to the lower computer, receiving feedback information sent by the lower computer aiming at the at least one input entity, analyzing the feedback information, determining a target receiver adopting the same communication protocol with the lower computer, setting the target receiver as a default receiver, realizing data communication between the upper computer and the lower computer by the default receiver, determining a target receiver identical to the communication protocol of the lower computer through the feedback information by parsing the feedback information, determining the target receiver as a default receiver, therefore, data communication between the upper computer and the lower computer is realized, a serial port communication system does not need to be reset, the cost is saved, and the technical effect of safe and reliable data communication between the upper computer and the lower computer is ensured.

Description

Data communication method and device, electronic equipment, upper computer and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a data communication method and apparatus, an electronic device, an upper computer, and a storage medium.
Background
With the increasing degree of industrial modernization, modern industrial control systems have developed a control network with a complex structure composed of various sensors, controllers, actuators, and various subsystems with specific functions. And different communication protocols are generally adopted for communication between different devices or different components of the same device, such as kitchen electrical products with display panels (including cigarette machines, steam boxes, ovens, steam ovens, washing machines, refrigerators and the like).
In the prior art, when the communication protocols of different devices are different, the serial communication system needs to be redesigned.
However, in the process of implementing the present disclosure, the inventors found that at least the following problems exist: the workload caused by redesigning the serial communication system is large, and the cost consumption is high.
Disclosure of Invention
The present disclosure provides a data communication method and apparatus, an electronic device, an upper computer, and a storage medium, which are used to solve the problems of large workload and high cost consumption caused by redesigning a serial communication system in the prior art.
In one aspect, an embodiment of the present disclosure provides a data communication method, where the method includes:
in response to receiving an operation command sent by an object, determining at least one input entity corresponding to the operation command;
sending the at least one input entity to a lower computer;
receiving feedback information sent by the lower computer aiming at the at least one input entity;
analyzing the feedback information, and determining a target receiver which adopts the same communication protocol with the lower computer;
and setting the target receiver as a default receiver so as to realize data communication between the upper computer and the lower computer based on the default receiver.
In some embodiments, the sending the at least one input entity to the lower computer comprises:
converting data within the at least one input entity into a first byte array sequence;
and the analyzing the feedback information and determining the target receiver adopting the same communication protocol with the lower computer comprises:
and converting the second byte array sequence in the feedback information into a feedback entity, and determining a target receiver according to the feedback entity.
In some embodiments, the determining at least one input entity to which the operation command corresponds includes:
determining the type of the operation command;
in response to the type of the operation command being a general test, determining a preset general test entity as the at least one input entity;
in response to the type of the operation instruction being a switching test, determining each entity in a preset input entity set corresponding to a plurality of receivers as the at least one input entity.
In some embodiments, in response to the type of the operation instruction being a handover test, the sending the at least one input entity to the lower computer includes:
sequentially sending the input entity corresponding to one of the receivers to the lower computer according to the receiver;
and the receiving of the feedback information sent by the lower computer aiming at the at least one input entity comprises:
and until receiving the feedback information sent by the lower computer aiming at the input entity of one receiver in the plurality of receivers.
In some embodiments, the determining at least one input entity to which the operation command corresponds includes:
extracting data corresponding to the operation command;
and intercepting and modifying the data in response to the data corresponding to the delay control.
On the other hand, the embodiment of the present disclosure further provides a data communication apparatus, where the apparatus includes: a first controller and a plurality of receivers respectively connected with the first controller, each receiver respectively corresponding to a communication protocol, wherein,
the first controller is used for determining at least one input entity corresponding to the received operation instruction, sending the at least one input entity to a second controller of a lower computer, receiving feedback information sent by the second controller based on the at least one input entity, analyzing the feedback, determining a target receiver which adopts the same communication protocol as the lower computer from the plurality of receivers, and setting the target receiver as a default receiver;
the default receiver is for data communication with the second controller.
In some embodiments, the first controller is configured to convert data within the at least one input entity into a first byte array sequence and convert a second byte array sequence within the feedback information into a feedback entity, and determine the target receiver based on the feedback entity.
In some embodiments, the first controller is configured to determine a type of the operation command, determine a preset general test entity as the at least one input entity in response to the type of the operation command being a general test, and determine each entity in a preset input entity set corresponding to the plurality of receivers as the at least one input entity in response to the type of the operation command being a handover test.
In some embodiments, the first controller is configured to, in response to the type of the operation instruction being a handover test, sequentially select one receiver from the plurality of receivers;
the selected receiver is used for selecting an entity corresponding to the selected receiver from the input entity set and sending the entity corresponding to the selected receiver to the second controller;
the first controller is configured to receive the feedback information sent by the second controller for one of the selected receivers.
In some embodiments, the apparatus further comprises:
the controller is used for extracting data corresponding to the operation command;
the interceptor is used for intercepting and modifying the data in response to the data corresponding to the delay control.
In another aspect, an embodiment of the present disclosure further provides a data communication apparatus, where the apparatus includes:
the entity determining module is used for responding to an operation command sent by a received object and determining at least one input entity corresponding to the operation command;
the sending module is used for sending the at least one input entity to the lower computer;
the receiving module is used for receiving feedback information sent by the lower computer aiming at the at least one input entity;
the analysis module is used for analyzing the feedback information and determining a target receiver which adopts the same communication protocol with the lower computer;
and the setting module is used for setting the target receiver as a default receiver so as to realize data communication between the upper computer and the lower computer based on the default receiver.
In some embodiments, the sending module is configured to convert data within the at least one input entity into a first byte array sequence;
and the analysis module is used for converting the second byte array sequence in the feedback information into a feedback entity and determining a target receiver according to the feedback entity.
In some embodiments, the entity determining module is configured to determine a type of the operation command, determine a preset general test entity as the at least one input entity in response to the type of the operation command being a general test, and determine each entity in a preset input entity set corresponding to the plurality of receivers as the at least one input entity in response to the type of the operation command being a handover test.
In some embodiments, in response to the type of the operation instruction being a switching test, the sending module is configured to send the input entity corresponding to the receiver to the lower computer in sequence according to the receiver;
and the receiving module is used for receiving the feedback information sent by the lower computer aiming at the input entity of one receiver in the plurality of receivers.
In some embodiments, the entity determining module is further configured to extract data corresponding to the operation command, and intercept and modify the data in response to the data corresponding to the delay control.
In another aspect, an embodiment of the present disclosure further provides an electronic device, including: a memory, a processor;
a memory for storing the processor-executable instructions;
wherein the processor, when executing the instructions in the memory, is configured to implement a method as in any of the embodiments above.
In another aspect, an embodiment of the present disclosure further provides an upper computer, where the upper computer includes the data communication apparatus according to any of the above embodiments, or the electronic device according to the above embodiment.
In another aspect, the disclosed embodiments also provide a computer-readable storage medium, in which computer-executable instructions are stored, and when executed by a processor, the computer-executable instructions are used to implement the method according to any one of the above embodiments.
The present disclosure provides a data communication method and apparatus, an electronic device, an upper computer, and a storage medium, including: responding to the received operation command sent by the object, determining at least one input entity corresponding to the operation command, sending the at least one input entity to the lower computer, receiving feedback information sent by the lower computer aiming at the at least one input entity, analyzing the feedback information, determining a target receiver adopting the same communication protocol with the lower computer, setting the target receiver as a default receiver so as to realize data communication between the upper computer and the lower computer based on the default receiver, determining a target receiver identical to the communication protocol of the lower computer through the feedback information by parsing the feedback information, determining the target receiver as a default receiver, therefore, data communication between the upper computer and the lower computer is realized, a serial port communication system does not need to be reset, the cost is saved, and the technical effect of safe and reliable data communication between the upper computer and the lower computer is ensured.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a scene schematic diagram of a data communication method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart diagram of a data communication method according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a method for determining at least one input entity corresponding to the operation command according to an embodiment of the disclosure;
FIG. 4 is a schematic diagram of a data communication device according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a data communication device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the prior art, data communication between different devices is realized mainly by redesigning a serial communication system, and the redesign causes the problems of large workload and high consumption cost. In order to solve the above problems caused by redesign in the prior art, the inventor obtains the technical solution implemented by the present disclosure through creative efforts. In the embodiment of the present disclosure, the controller sends at least one input entity to the lower computer, the lower computer generates and sends feedback information for the at least one input entity to the controller, and the controller analyzes the feedback information to determine a communication protocol applicable to the lower computer, and selects a target receiver from a plurality of receivers that communicate using different communication protocols, where the communication protocol used by the target receiver is the communication protocol applicable to the lower computer, and the target receiver is set as a default receiver, so that data communication is performed between the target receiver and the lower computer in the following process, thereby implementing data communication between the upper computer and the lower computer. Therefore, through the technical scheme of the embodiment of the disclosure, redesign is not needed, and the technical effect of saving cost is achieved.
The data communication method provided by the embodiment of the disclosure can be applied to the application scenario shown in fig. 1.
In the application scenario shown in fig. 1, the upper computer 100 and the lower computer 200 communicate with each other via a serial port.
The data communication method provided by the embodiment of the disclosure is suitable for household appliances, such as a range hood, a steam box, an oven, a steam oven, a washing machine, a refrigerator and the like. Therefore, the upper computer 100 may be a display panel of a home appliance, and the lower computer 200 may be a control panel of the home appliance.
It is understood that the communication protocol for the upper computer 100 may be different from the communication protocol for the lower computer 200. If the upper computer 100 is a display panel of a range hood, when the lower computer 200 is a control panel of a variable frequency range hood, the communication protocol suitable for the lower computer 200 is a variable frequency protocol; when the lower computer 200 is a control panel of the fixed-frequency range hood, a communication protocol suitable for the lower computer 200 is a fixed-frequency protocol.
Through the data communication method of the embodiment of the disclosure, data communication can be realized when the display panel is connected to the control panel of the variable frequency range hood, and data communication can also be realized when the display panel is connected to the control panel of the fixed frequency range hood, so that data communication between the same display panel and control panels with different communication protocols can be realized.
For example, if the display panel is connected to a control panel of a fixed-frequency range hood, the display panel sends at least one input entity to the control panel, the control panel feeds back the at least one input entity, the display panel analyzes feedback information fed back by the control panel, and determines that a communication protocol corresponding to the feedback information is a fixed-frequency communication protocol, a receiver with the communication protocol being the fixed-frequency communication protocol is selected from a plurality of preset receivers, the receiver with the fixed-frequency communication protocol is set as a default receiver, and the default receiver communicates with the control panel, so that data communication between the upper computer 100 and the lower computer 200 is realized.
Similarly, if the display panel is connected to the control panel of the variable frequency range hood, the display panel sends at least one input entity to the control panel, the control panel feeds back the at least one input entity, the display panel analyzes the feedback information fed back by the control panel, and determines that the communication protocol corresponding to the feedback information is the variable frequency communication protocol, a receiver with the communication protocol being the variable frequency communication protocol is selected from a plurality of receivers which are preset, the receiver with the variable frequency communication protocol is set as a default receiver, and the default receiver communicates with the control panel, so that data communication between the upper computer 100 and the lower computer 200 is realized.
It should be noted that the above application scenarios and examples are merely illustrative and are not to be construed as limiting the embodiments of the present disclosure.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
In one aspect, the embodiment of the present disclosure provides a method suitable for the above scenario.
Referring to fig. 2, fig. 2 is a flow chart illustrating a data communication method according to an embodiment of the disclosure.
As shown in fig. 2, the method includes:
s101: in response to receiving an operation command sent by an object, determining at least one input entity corresponding to the operation command.
The main body for executing the data communication method of the embodiment of the present disclosure may be a data communication device, and the device may be an upper computer, such as a display panel, described in the above example. In the embodiments of the disclosure, a frequency conversion range hood is taken as an example for detailed explanation.
The operation instruction comprises triggering information for indicating to start corresponding functions of the variable frequency range hood, such as starting, turning on a lamp, alarming and the like. The object for triggering the operation instruction may be a user, a tester, a computer, or the like.
The input entity refers to byte data corresponding to the operation instruction, and the length of the byte data corresponding to different communication protocols is different. For example, the communication protocol of the variable frequency cigarette making machine is a variable frequency communication protocol, and the communication protocol of the fixed frequency cigarette making machine is a fixed frequency communication protocol, so that the length of the byte data of the input entity of the variable frequency cigarette making machine is different from the length of the byte data of the input entity of the fixed frequency cigarette making machine.
S102: and sending at least one input entity to the lower computer.
Wherein, the lower computer is a control panel of the variable frequency cigarette machine. In this step, a display panel of the variable frequency cigarette machine sends at least one input entity to a control panel of the variable frequency cigarette machine.
S103: and receiving feedback information sent by the lower computer aiming at the at least one input entity.
When the control panel receives at least one input entity sent by the display panel, feedback information is generated according to the at least one input entity, and the feedback information is sent to the display panel.
S104: and analyzing the feedback information, and determining a target receiver which adopts the same communication protocol with the lower computer.
In this step, when the display panel receives the feedback information sent by the control panel, the feedback information is analyzed, the communication protocol corresponding to the feedback information is determined to be the frequency conversion communication protocol, and the receiver adopting the frequency conversion communication protocol is determined to be the target receiver.
S105: and setting the target receiver as a default receiver so as to realize data communication between the upper computer and the lower computer based on the default receiver.
In order to ensure data communication between the display panel and the control panel, the display panel sets the target receiver as a default receiver of the display panel, and when data communication between the display panel and the control panel is required, the target receiver performs data communication with the control panel by using a frequency conversion communication protocol.
The embodiment of the present disclosure provides a new data communication method, including: responding to the received operation command sent by the object, determining at least one input entity corresponding to the operation command, sending the at least one input entity to the lower computer, receiving feedback information sent by the lower computer aiming at the at least one input entity, analyzing the feedback information, determining a target receiver adopting the same communication protocol with the lower computer, setting the target receiver as a default receiver so as to realize data communication between the upper computer and the lower computer based on the default receiver, determining a target receiver identical to the communication protocol of the lower computer through the feedback information by parsing the feedback information, determining the target receiver as a default receiver, therefore, data communication between the upper computer and the lower computer is realized, a serial port communication system does not need to be reset, the cost is saved, and the technical effect of safe and reliable data communication between the upper computer and the lower computer is ensured.
In some embodiments, S102 comprises: data within at least one input entity is converted into a first byte array sequence.
And, S104 includes: and converting the second byte array sequence in the feedback information into a feedback entity, and determining a target receiver according to the feedback entity.
In the embodiment of the disclosure, when the display panel determines the at least one input entity, the data in the at least one input entity is converted into the first byte array sequence.
Similarly, after the display panel receives the feedback information sent by the control panel, the data in the feedback information is converted to obtain a second byte array sequence, and the second byte array sequence is converted into a feedback entity so as to determine the target receiver according to the feedback entity.
As can be seen in fig. 3 (fig. 3 is a flowchart illustrating a method for determining at least one input entity corresponding to the operation command according to an embodiment of the disclosure), in some embodiments, determining the at least one input entity corresponding to the operation command includes:
s11: the type of the operation command is determined.
The types of the operation instructions comprise a type of a general test and a type of a switching test.
S12: and in response to the type of the operation command being the universal test, determining a preset universal test entity as the at least one input entity.
S13: in response to the type of the operation instruction being a switching test, each entity in a preset input entity set corresponding to the plurality of receivers is determined as at least one input entity.
In the embodiment of the disclosure, the display panel judges the type of the received operation instruction, and if the type of the operation instruction is a general test, a preset general test entity is obtained, and the general test entity is determined as at least one input entity; and if the type of the operation command is the switching test, determining each entity in the input entity set as at least one input entity.
For example, if the display panel determines that the type of the operation instruction is a general test, the general test entity is sent to the control panel, the control panel generates feedback information corresponding to the general test entity, the feedback information carries information of a communication protocol applicable to the control panel, and the display panel determines a receiver corresponding to the communication protocol applicable to the control panel as a target receiver.
For another example, if the display panel determines that the type of the operation instruction is the handover test, each entity in the input entity set may be sent to the control panel, the control panel generates feedback information according to the entity corresponding to the receiver adopting the frequency conversion communication protocol, and sends the feedback information to the display panel, and the display panel determines the receiver adopting the frequency conversion communication protocol as the target receiver according to the feedback information.
In some embodiments, if the display panel determines that the type of the operation instruction is the handover test, one of the plurality of receivers may be selected to send an entity corresponding to the receiver to the control panel, if no feedback information sent by the control panel is received within a preset time period, it is determined that the communication protocol of the receiver is not the fixed-frequency communication protocol, another receiver is continuously selected to send the entity corresponding to the receiver to the control panel, and if the feedback information sent by the control panel is received, it is determined that the communication protocol of the receiver is the fixed-frequency communication protocol, and the receiver is determined to be the target receiver.
In some embodiments, determining the at least one input entity to which the operation command corresponds includes:
s011: and extracting data corresponding to the operation command.
S012: and intercepting and modifying the data in response to the data corresponding to the delay control.
It should be noted that for data such as latency control class, the data needs to be adapted and then packaged as an input entity.
For example, if the operation command is to turn on a buzzer to make the buzzer sound, sometimes it is not necessary to actually control the sounding of the buzzer (when the buzzer sounds last time and this time is within 300ms, the operation sound is not allowed to be sent, otherwise, the buzzer of the control panel is always in a sounding state), and thus the data of the buzzer is intercepted and modified. In some embodiments, the buzzer data is reset after a preset time period.
The embodiment of the disclosure provides a data communication device.
Referring to fig. 4, fig. 4 is a schematic diagram of a data communication device according to an embodiment of the disclosure.
As shown in fig. 4, the communication apparatus includes: a first controller 10 and a plurality of receivers 20 respectively connected to the first controller 10, each receiver 20 respectively corresponding to a communication protocol, wherein,
the first controller 10 is configured to determine at least one input entity corresponding to the received operation instruction, send the at least one input entity to a second controller of the lower computer, receive feedback information sent by the second controller based on the at least one input entity, analyze the feedback, determine a destination receiver that uses the same communication protocol as the lower computer from the plurality of receivers 20, and set the destination receiver as a default receiver.
The default receiver is for data communication with the second controller.
For example, there are n receivers, each receiver is connected to the controller, and each receiver is adapted to one communication protocol, for example, n receivers correspond to n communication protocols. If there is an addition or a deletion of the communication protocol, the corresponding receiver may be adaptively added or deleted. The first controller sends at least one input entity to the second controller, the second controller sends feedback information to the first controller, the first controller analyzes the feedback information, a communication protocol applicable to the lower computer is determined to be a communication protocol a, the controller selects a receiver which adopts the communication protocol a to carry out data communication from the n receivers, the receiver is set as a default receiver, and when an operation instruction is received again, the default receiver carries out data communication with the lower computer, so that the upper computer can automatically switch according to the communication protocol applicable to the lower computer, and the flexibility and the reliability of data communication are realized.
In some embodiments, the first controller 10 is configured to convert data in at least one input entity into a first byte array sequence and convert a second byte array sequence in the feedback information into a feedback entity, and determine the target receiver according to the feedback entity.
In some embodiments, the first controller 10 is configured to determine a type of the operation command, determine a preset general test entity as the at least one input entity in response to the type of the operation command being a general test, and determine each entity in a preset input entity set corresponding to the plurality of receivers 20 as the at least one input entity in response to the type of the operation command being a handover test.
In some embodiments, the first controller 10 is configured to select one receiver from the plurality of receivers in sequence in response to the type of the operation instruction being a handover test.
The selected receiver is used for selecting the entity corresponding to the selected receiver from the input entity set and sending the entity corresponding to the selected receiver to the second controller.
The first controller is used for receiving the feedback information sent by the second controller aiming at one receiver in the selected receivers.
For example, if the type of the operation instruction is a handover test, the first controller selects one receiver a from the n receivers, the receiver a selects an entity B corresponding to the receiver a from the input entity set, the receiver a sends the entity B to the second controller, if the first controller does not receive feedback information sent by the second controller based on the entity B within a preset time period, another receiver C is selected from the n receivers, similarly, the receiver C selects an entity D corresponding to the receiver C from the input entity set, the receiver C sends the entity D to the second controller, and so on until the first controller receives the feedback information sent by the second controller. If the selected receiver is the receiver M, the second controller sends feedback information to the first controller, and the first controller analyzes the feedback information and sets the receiver M as a default receiver.
In some embodiments, the apparatus further comprises:
the controller is used for extracting data corresponding to the operation command.
The interceptor is used for intercepting and modifying the data in response to the data corresponding to the delay control.
The interceptor may be set inside the receiver and may be added or deleted.
According to another aspect of the embodiments of the present disclosure, there is also provided a data communication apparatus.
Referring to fig. 5, fig. 5 is a schematic diagram of a data communication device according to an embodiment of the disclosure.
As shown in fig. 5, the apparatus includes:
the entity determining module 1 is configured to determine, in response to receiving an operation command sent by an object, at least one input entity corresponding to the operation command;
the sending module 2 is used for sending the at least one input entity to a lower computer;
the receiving module 3 is used for receiving feedback information sent by the lower computer aiming at the at least one input entity;
the analysis module 4 is used for analyzing the feedback information and determining a target receiver which adopts the same communication protocol with the lower computer;
and the setting module 5 is used for setting the target receiver as a default receiver so as to realize data communication between the upper computer and the lower computer based on the default receiver.
In some embodiments, the sending module 2 is configured to convert the data in the at least one input entity into a first byte array sequence;
and the parsing module 4 is configured to convert the second byte array sequence in the feedback information into a feedback entity, and determine a target receiver according to the feedback entity.
In some embodiments, the entity determining module 1 is configured to determine the type of the operation command, determine a preset general test entity as the at least one input entity in response to the type of the operation command being a general test, and determine each entity in a preset input entity set corresponding to the plurality of receivers as the at least one input entity in response to the type of the operation command being a handover test.
In some embodiments, in response to the type of the operation instruction being a switching test, the sending module 2 is configured to send the input entity corresponding to one of the plurality of receivers to the lower computer in sequence according to the receiver;
and the receiving module 3 is used for receiving the feedback information sent by the lower computer aiming at the input entity of one receiver in the plurality of receivers.
In some embodiments, the entity determining module 1 is further configured to extract data corresponding to the operation command, and intercept and modify the data in response to the data corresponding to the delay control.
According to another aspect of the embodiments of the present disclosure, there is also provided an electronic device, including: a memory, a processor;
a memory for storing processor-executable instructions;
wherein, when executing the instructions in the memory, the processor is configured to implement the method of any of the embodiments above.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
As shown in fig. 6, the electronic device includes a memory and a processor, and the electronic device may further include a communication interface and a bus, wherein the processor, the communication interface, and the memory are connected by the bus; the processor is used to execute executable modules, such as computer programs, stored in the memory.
The Memory may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Via at least one communication interface, which may be wired or wireless), the communication connection between the network element of the system and at least one other network element may be implemented using the internet, a wide area network, a local network, a metropolitan area network, etc.
The bus may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
The memory is used for storing a program, and the processor executes the program after receiving an execution instruction.
The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The steps of the method disclosed in connection with the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
According to another aspect of the embodiments of the present disclosure, there is also provided an upper computer, where the upper computer includes the data communication apparatus according to any of the embodiments above, or the electronic device according to the embodiments above.
According to another aspect of the embodiments of the present disclosure, there is also provided a computer-readable storage medium having stored therein computer-executable instructions, which when executed by a processor, are configured to implement the method according to any one of the embodiments.
The reader should understand that in the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
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 network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present disclosure.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be substantially or partially contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should also be understood that, in the embodiments of the present disclosure, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
While the present disclosure has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (14)

1. A method of data communication, the method comprising:
in response to receiving an operation command sent by an object, determining at least one input entity corresponding to the operation command;
sending the at least one input entity to a lower computer;
receiving feedback information sent by the lower computer aiming at the at least one input entity;
analyzing the feedback information, and determining a target receiver which adopts the same communication protocol with the lower computer;
and setting the target receiver as a default receiver so as to realize data communication between the upper computer and the lower computer based on the default receiver.
2. The method of claim 1, wherein sending the at least one input entity to a lower computer comprises:
converting data within the at least one input entity into a first byte array sequence;
and the analyzing the feedback information and determining the target receiver adopting the same communication protocol with the lower computer comprises:
and converting the second byte array sequence in the feedback information into a feedback entity, and determining a target receiver according to the feedback entity.
3. The method of claim 1, wherein the determining at least one input entity to which the operation command corresponds comprises:
determining the type of the operation command;
in response to the type of the operation command being a general test, determining a preset general test entity as the at least one input entity;
in response to the type of the operation instruction being a switching test, determining each entity in a preset input entity set corresponding to a plurality of receivers as the at least one input entity.
4. The method of claim 3, wherein in response to the type of the operation instruction being a toggle test, the sending the at least one input entity to a lower computer comprises:
sequentially sending the input entity corresponding to one of the receivers to the lower computer according to the receiver;
and the receiving of the feedback information sent by the lower computer aiming at the at least one input entity comprises:
and until receiving the feedback information sent by the lower computer aiming at the input entity of one receiver in the plurality of receivers.
5. The method according to any one of claims 1 to 4, wherein the determining at least one input entity corresponding to the operation command comprises:
extracting data corresponding to the operation command;
and intercepting and modifying the data in response to the data corresponding to the delay control.
6. A data communication apparatus, characterized in that the apparatus comprises: a first controller and a plurality of receivers respectively connected with the first controller, each receiver respectively corresponding to a communication protocol, wherein,
the first controller is used for determining at least one input entity corresponding to the received operation instruction, sending the at least one input entity to a second controller of a lower computer, receiving feedback information sent by the second controller based on the at least one input entity, analyzing the feedback, determining a target receiver which adopts the same communication protocol as the lower computer from the plurality of receivers, and setting the target receiver as a default receiver;
the default receiver is for data communication with the second controller.
7. The apparatus of claim 6, wherein the first controller is configured to convert data in the at least one input entity into a first byte array sequence and convert a second byte array sequence in the feedback information into a feedback entity, and determine the target receiver according to the feedback entity.
8. The apparatus of claim 6, wherein the first controller is configured to determine a type of the operation command, determine a preset general test entity as the at least one input entity in response to the type of the operation command being a general test, and determine each entity in a preset input entity set corresponding to the plurality of receivers as the at least one input entity in response to the type of the operation command being a handover test.
9. The apparatus of claim 8, wherein the first controller is configured to, in response to the type of the operation instruction being a handover test, sequentially select one of the plurality of receivers;
the selected receiver is used for selecting an entity corresponding to the selected receiver from the input entity set and sending the entity corresponding to the selected receiver to the second controller;
the first controller is configured to receive the feedback information sent by the second controller for one of the selected receivers.
10. The apparatus of any one of claims 6 to 9, further comprising:
the controller is used for extracting data corresponding to the operation command;
the interceptor is used for intercepting and modifying the data in response to the data corresponding to the delay control.
11. A data communication apparatus, characterized in that the apparatus comprises:
the entity determining module is used for responding to an operation command sent by a received object and determining at least one input entity corresponding to the operation command;
the sending module is used for sending the at least one input entity to the lower computer;
the receiving module is used for receiving feedback information sent by the lower computer aiming at the at least one input entity;
the analysis module is used for analyzing the feedback information and determining a target receiver which adopts the same communication protocol with the lower computer;
and the setting module is used for setting the target receiver as a default receiver so as to realize data communication between the upper computer and the lower computer based on the default receiver.
12. An electronic device, comprising: a memory, a processor;
a memory for storing the processor-executable instructions;
wherein the processor, when executing the instructions in the memory, is configured to implement the method of any of claims 1 to 5.
13. A host computer, characterized in that the host computer comprises an apparatus according to any one of claims 6 to 10, or an electronic device according to claim 12.
14. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the method of any one of claims 1 to 5.
CN201911154581.3A 2019-11-22 2019-11-22 Data communication method and device, electronic equipment, upper computer and storage medium Pending CN110933059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911154581.3A CN110933059A (en) 2019-11-22 2019-11-22 Data communication method and device, electronic equipment, upper computer and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911154581.3A CN110933059A (en) 2019-11-22 2019-11-22 Data communication method and device, electronic equipment, upper computer and storage medium

Publications (1)

Publication Number Publication Date
CN110933059A true CN110933059A (en) 2020-03-27

Family

ID=69851628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911154581.3A Pending CN110933059A (en) 2019-11-22 2019-11-22 Data communication method and device, electronic equipment, upper computer and storage medium

Country Status (1)

Country Link
CN (1) CN110933059A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111556114A (en) * 2020-04-26 2020-08-18 天津中新智冠信息技术有限公司 Information interaction method and device and server
CN113515461A (en) * 2021-08-02 2021-10-19 京东数科海益信息科技有限公司 Communication test method, device, electronic equipment and storage medium
CN114614912A (en) * 2022-03-04 2022-06-10 卧龙电气驱动集团股份有限公司 Motor information identification method, upper computer, system, equipment and medium
CN114697404A (en) * 2022-02-25 2022-07-01 中国航发控制系统研究所 Upper and lower computer communication protocol generation method, system and storage medium of numerical control system
CN115952128A (en) * 2023-02-22 2023-04-11 南京芯驰半导体科技有限公司 Communication method, related device, chip and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080013569A1 (en) * 2006-07-14 2008-01-17 Boren Gary W Universal controller and signal monitor
US20080200115A1 (en) * 2002-11-19 2008-08-21 Murata Kikai Kabushiki Kaisha Communication terminal device, communication method and electronic mail server
CN103605359A (en) * 2013-11-25 2014-02-26 深圳市道通科技有限公司 Automobile diagnostic system and method
CN104572530A (en) * 2013-10-09 2015-04-29 上海市计算技术研究所 Lower computer, upper computer and data transmission method
CN106790206A (en) * 2017-01-05 2017-05-31 厦门中控生物识别信息技术有限公司 The protocol analysis method and device of operation system
CN107196936A (en) * 2017-05-19 2017-09-22 广东万丈金数信息技术股份有限公司 Interface retransmission method, system, computer equipment and storage medium
CN107888677A (en) * 2017-11-08 2018-04-06 绵阳美菱软件技术有限公司 A kind of Realization Method of Communication, control terminal, smart machine and system
CN108200077A (en) * 2018-01-18 2018-06-22 北京网信云服信息科技有限公司 A kind of method and device of calling interface
CN108259512A (en) * 2018-03-01 2018-07-06 深圳前海有电物联科技有限公司 Communication protocol recognition methods, electronic device and computer storage media
CN109597779A (en) * 2018-11-21 2019-04-09 Oppo(重庆)智能科技有限公司 A kind of serial-port inquiring method and equipment and computer storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080200115A1 (en) * 2002-11-19 2008-08-21 Murata Kikai Kabushiki Kaisha Communication terminal device, communication method and electronic mail server
US20080013569A1 (en) * 2006-07-14 2008-01-17 Boren Gary W Universal controller and signal monitor
CN104572530A (en) * 2013-10-09 2015-04-29 上海市计算技术研究所 Lower computer, upper computer and data transmission method
CN103605359A (en) * 2013-11-25 2014-02-26 深圳市道通科技有限公司 Automobile diagnostic system and method
CN106790206A (en) * 2017-01-05 2017-05-31 厦门中控生物识别信息技术有限公司 The protocol analysis method and device of operation system
CN107196936A (en) * 2017-05-19 2017-09-22 广东万丈金数信息技术股份有限公司 Interface retransmission method, system, computer equipment and storage medium
CN107888677A (en) * 2017-11-08 2018-04-06 绵阳美菱软件技术有限公司 A kind of Realization Method of Communication, control terminal, smart machine and system
CN108200077A (en) * 2018-01-18 2018-06-22 北京网信云服信息科技有限公司 A kind of method and device of calling interface
CN108259512A (en) * 2018-03-01 2018-07-06 深圳前海有电物联科技有限公司 Communication protocol recognition methods, electronic device and computer storage media
CN109597779A (en) * 2018-11-21 2019-04-09 Oppo(重庆)智能科技有限公司 A kind of serial-port inquiring method and equipment and computer storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111556114A (en) * 2020-04-26 2020-08-18 天津中新智冠信息技术有限公司 Information interaction method and device and server
CN113515461A (en) * 2021-08-02 2021-10-19 京东数科海益信息科技有限公司 Communication test method, device, electronic equipment and storage medium
CN114697404A (en) * 2022-02-25 2022-07-01 中国航发控制系统研究所 Upper and lower computer communication protocol generation method, system and storage medium of numerical control system
CN114614912A (en) * 2022-03-04 2022-06-10 卧龙电气驱动集团股份有限公司 Motor information identification method, upper computer, system, equipment and medium
CN115952128A (en) * 2023-02-22 2023-04-11 南京芯驰半导体科技有限公司 Communication method, related device, chip and storage medium

Similar Documents

Publication Publication Date Title
CN110933059A (en) Data communication method and device, electronic equipment, upper computer and storage medium
CN100483966C (en) Control device and method for automatic household system
CN107991891B (en) Method and system for adjusting environmental parameters and user equipment
CN110061896B (en) MODBUS-RTU bus address conflict detection method
CN111083180B (en) Internet of things system and Internet of things equipment linkage method and device
CN104317764A (en) Real-time control method for asynchronous messages of 1553B bus
CN110597393A (en) Motor vibration control method and device and computer readable storage medium
CN109067734B (en) Dynamic configuration method of communication protocol, wireless communication device and household appliance
CN110831049B (en) Network performance testing method and device
CN108885435B (en) Control method, host, slave, mobile terminal and control system
US20130238871A1 (en) Data processing method and apparatus, pci-e bus system, and server
US20230198648A1 (en) Time synchronization method, device and apparatus, and storage medium
CN105373005A (en) Universal control method, apparatus and system of Internet of things
CN112583617B (en) Fault determination method, server, control terminal and storage medium
CN109460379B (en) Serial port selection method and switching device
KR101593835B1 (en) PLC system
CN107528898B (en) Method and device for realizing Internet of things module
CN114237928A (en) Inter-container communication method and device, electronic equipment and computer-readable storage medium
JP7205088B2 (en) Terminal device and air conditioner control method
CN107273328B (en) Interface management method and system
CN112134771B (en) Half-duplex communication method for refrigerator and refrigerator
CN113840353A (en) Network distribution method of IOT (input/output) equipment, intelligent household appliance, system and storage medium
CN113835353B (en) Linkage method, device and equipment for working modes between kitchen appliances
CN114995553B (en) Menu processing method and device, storage medium and computer equipment
US20180052805A1 (en) Microcontroller with a diagnosis module and method for accessing said module of said microcontroller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200327