CN117061587A - Device communication method, device, electronic device and storage medium - Google Patents

Device communication method, device, electronic device and storage medium Download PDF

Info

Publication number
CN117061587A
CN117061587A CN202311196727.7A CN202311196727A CN117061587A CN 117061587 A CN117061587 A CN 117061587A CN 202311196727 A CN202311196727 A CN 202311196727A CN 117061587 A CN117061587 A CN 117061587A
Authority
CN
China
Prior art keywords
virtual
communication interface
communication
virtual device
interface
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
CN202311196727.7A
Other languages
Chinese (zh)
Inventor
曾波
蒋太金
冯海龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Acoinfo Technology Co ltd
Original Assignee
Beijing Acoinfo Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Acoinfo Technology Co ltd filed Critical Beijing Acoinfo Technology Co ltd
Priority to CN202311196727.7A priority Critical patent/CN117061587A/en
Publication of CN117061587A publication Critical patent/CN117061587A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3045Virtual queuing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a device communication method, a device, electronic equipment and a storage medium. The method comprises the following steps: displaying at least one candidate virtual communication interface in response to a communication interface configuration operation input for the first virtual device; determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interface in response to a selection trigger operation input for the candidate virtual communication interface; responding to networking triggering operation input for the first virtual equipment, determining second virtual equipment to be networked with the first virtual equipment, and determining a second virtual communication interface corresponding to the second virtual equipment; a communication connection between the first virtual device and the second virtual device is established based on the first virtual communication interface and the second virtual communication interface. According to the technical scheme provided by the embodiment of the invention, flexible communication among the devices is realized, and the universality of the communication among the devices is improved.

Description

Device communication method, device, electronic device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a device communication method, a device, electronic equipment and a storage medium.
Background
In the related art, communication between devices generally requires communication by means of a hardware line. For different devices, it is often necessary to use specific hardware lines for communication. Once the equipment needing to be communicated is changed, the hardware circuit needs to be replaced again, the replacement efficiency is low, the change cost is high, and the flexibility of the communication between the equipment is poor, so that the universality of the communication between the equipment is poor.
Disclosure of Invention
The invention provides a device communication method, a device, electronic equipment and a storage medium, so as to realize flexible communication among devices and promote the universality of communication among the devices.
According to an aspect of the present invention, there is provided a device communication method, the method comprising:
displaying at least one candidate virtual communication interface in response to a communication interface configuration operation input for the first virtual device;
determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interface in response to a selection trigger operation input for the candidate virtual communication interface;
responding to a networking triggering operation input for the first virtual device, determining a second virtual device to be networked with the first virtual device, and determining a second virtual communication interface corresponding to the second virtual device;
And establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface.
According to another aspect of the present invention, there is provided a device communication apparatus. The device comprises:
an interface configuration triggering module for displaying at least one candidate virtual communication interface in response to a communication interface configuration operation input for the first virtual device;
a communication interface selection module, configured to determine a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interface in response to a selection trigger operation input for the candidate virtual communication interface;
the networking equipment determining module is used for responding to networking triggering operation input for the first virtual equipment, determining second virtual equipment to be networked with the first virtual equipment, and determining a second virtual communication interface corresponding to the second virtual equipment;
and the device communication establishing module is used for establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the device communication method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a device communication method according to any embodiment of the present invention.
According to the technical scheme, at least one candidate virtual communication interface is displayed in response to the communication interface configuration operation input for the first virtual equipment, so that the candidate virtual communication interface is provided for selection by a user, and the universality of communication among the virtual equipment is improved. And responding to the selection triggering operation input for the candidate virtual communication interfaces, determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interfaces, supporting flexible selection of the virtual communication interface of the first virtual device, and realizing configuration of the virtual communication interface of the first virtual device by selecting the triggering operation. And responding to the networking triggering operation input by the first virtual equipment, determining second virtual equipment to be networked with the first virtual equipment, and determining a second virtual communication interface corresponding to the second virtual equipment, so that the second virtual communication interface to be connected with the first communication interface of the first virtual equipment can be accurately acquired. And finally, establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface. The technical problems of low flexibility and poor universality caused by dependence of equipment communication on hardware circuits in the related technology are solved, flexible communication among equipment is realized, and the universality of communication among the equipment is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a device communication method according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of communication between virtual devices suitable for a device communication method according to a first embodiment of the present invention;
fig. 3 is a flow chart of a device communication method according to a second embodiment of the present invention;
fig. 4 is a schematic communication diagram between virtual devices suitable for a device communication method according to a second embodiment of the present invention;
fig. 5 is a schematic diagram of communication between virtual devices suitable for a device communication method according to a second embodiment of the present invention;
Fig. 6 is a flow chart of a device communication method according to a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of a device communication apparatus according to a fourth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to a fifth 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.
It will be appreciated that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
Example 1
Fig. 1 is a schematic flow chart of a device communication method according to a first embodiment of the present invention, where the method may be applied to a case of simulating communication between devices, and the method may be performed by a device communication apparatus, where the device communication apparatus may be implemented in hardware and/or software, and the device communication apparatus may be configured in an electronic device such as a computer or a server.
As shown in fig. 1, the method of the present embodiment includes:
s110, at least one candidate virtual communication interface is displayed in response to a communication interface configuration operation input for the first virtual device.
The first virtual device may be understood as a virtual device that needs to perform device communication. In order to reduce the complexity of communication of hardware devices, in the embodiment of the invention, the hardware devices are subjected to simulation processing to obtain virtual devices corresponding to the hardware devices, and then the communication among the devices is completed by operating the virtual devices, so that the device communication is more intelligent. In the embodiment of the present invention, the determining manner of the first virtual device may include: in response to a selection operation of the virtual device, the selected virtual device may be determined, and the selected virtual device may be used as the first virtual device. Specifically, a virtual device identification list is displayed, wherein the virtual device identification list may include a plurality of virtual device identifications. After the virtual device identifier list receives the selection operation for the virtual device identifier, the selected virtual device identifier can be determined, and the virtual device corresponding to the selected virtual device identifier is used as the first virtual device. Wherein the virtual device identification may be used to distinguish between different virtual devices.
In the embodiment of the present invention, the communication interface configuration operation may be understood as an operation for configuring the communication interface of the first virtual device. The candidate virtual communication interface may be used to determine a virtual communication interface corresponding to the first virtual device. The number of candidate virtual communication interfaces may be one, two or more. In practical applications, the number of candidate virtual communication interfaces is typically a plurality. The advantage of this is that communication between virtual devices is flexible, and the universality of communication between virtual devices is improved. It will be appreciated that different candidate virtual communication interfaces correspond to different communication protocols. For example, the candidate virtual communication interfaces may include a first candidate virtual communication interface and a second candidate virtual communication interface, the first candidate virtual communication interface corresponding to the CAN communication protocol. The second candidate virtual communication interface corresponds to a Universal Asynchronous Receiver Transmitter (UART) serial port communication protocol.
Specifically, after receiving a communication interface configuration operation input for the first virtual device, displaying at least one candidate virtual communication interface, and determining a virtual communication interface corresponding to the communication interface configuration operation, namely, a candidate virtual communication interface, in all the virtual communication interfaces. After determining the candidate virtual communication interfaces, the candidate virtual communication interfaces may be displayed.
It should be noted that in the embodiment of the present invention, the variety of virtual devices is multiple, and different devices can be simulated according to actual requirements, so as to extend and support multiple virtual devices. The various virtual devices can be flexibly configured through configuration files.
S120, responding to a selection triggering operation input for the candidate virtual communication interfaces, and determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interfaces.
The first virtual communication interface may be understood as a virtual communication interface corresponding to the first virtual device selected from the candidate virtual communication interfaces.
Specifically, after receiving a selection trigger operation input for the candidate virtual communication interface, the selected candidate virtual communication interface may be determined according to the selection trigger operation. And further, a first virtual communication interface corresponding to the first virtual device can be determined based on the selected candidate virtual communication interface.
As an optional embodiment of the present invention, the determining, based on the selected candidate virtual communication interface, a first virtual communication interface corresponding to the first virtual device may include: the selected candidate virtual communication interface may be used as a first virtual communication interface corresponding to the first virtual device.
As another optional embodiment of the present invention, the determining, based on the selected candidate virtual communication interface, a first virtual communication interface corresponding to the first virtual device may include: editing the selected candidate virtual communication interfaces, and taking the edited candidate virtual communication interfaces as first virtual communication interfaces corresponding to the first virtual equipment.
In the embodiment of the present invention, the editing the selected candidate virtual communication interface, and taking the edited candidate virtual communication interface as the first virtual communication interface corresponding to the first virtual device may include: responding to interface editing triggering operation input for the selected candidate virtual communication interface, and displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface; and responding to an information editing triggering operation input for the selected configurable interface information, updating the configurable interface information based on editing content, updating the candidate virtual communication interfaces based on the updated configurable interface information, and taking the updated candidate virtual communication interfaces as first virtual communication interfaces corresponding to the first virtual equipment.
The interface editing triggering operation can be understood as a triggering operation for editing the selected candidate virtual communication interface. The configurable interface information may be understood as interface information capable of performing custom configuration on the candidate virtual communication interfaces according to actual requirements. The number of configurable interface information may be one, two or more. In practical applications, the number of configurable interface information is typically a plurality. Alternatively, the configurable interface information may include at least one of an IP address, a communication port number, the number of communication channels, and a communication device name of the virtual device. The information editing trigger operation may be understood as a trigger operation for editing the configurable interface information.
Specifically, after receiving an interface editing trigger operation input for the selected candidate virtual communication interface, at least one item of configurable interface information corresponding to the selected candidate virtual communication interface may be determined. And further the at least one item of configurable interface information may be displayed. Upon receiving a selection trigger operation for the configurable interface information, the selected configurable interface information may be determined. After receiving the information editing triggering operation input for the selected configurable interface information, editing content for the selected configurable interface information can be obtained. Whereby the selected configurable interface information may be updated based on the editing content. So that updated configurable interface information may be obtained. And updating the candidate virtual communication interface based on the updated configurable interface information, thereby obtaining the updated candidate virtual communication interface. And the updated candidate virtual communication interface may be used as a first virtual communication interface corresponding to the first virtual device.
In an embodiment of the present invention, the displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface may include: and acquiring a configuration file corresponding to the candidate virtual communication interface, and displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface based on the configuration file.
The configuration file corresponding to the candidate virtual communication interface may be understood as a file for configuring interface information of the candidate virtual communication interface. The configuration file corresponding to the candidate virtual communication interface may include non-configurable interface information and configurable interface information. In the embodiment of the present invention, the configuration file corresponding to the candidate virtual communication interface is obtained, which may specifically be that a storage space for storing the configuration file corresponding to the candidate virtual communication interface is determined. And acquiring the configuration file from the storage space.
In an embodiment of the present invention, displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface based on the configuration file may include: and analyzing the configuration file to obtain at least one piece of interface information configured for the candidate virtual communication interface in the configuration file and configuration attributes corresponding to the interface information. And further, at least one item of configurable interface information configured for the candidate virtual communication interface can be determined according to the configuration attribute corresponding to each interface information. So that the at least one item of configurable interface information may be displayed.
Wherein the configuration attribute corresponding to the interface information may be used to determine whether the interface information is configurable, and may include a configurable attribute and an unconfigurable attribute. In the implementation of the present invention, the determining, according to the configuration attribute corresponding to each interface information, at least one item of configurable interface information configured for the candidate virtual communication interface may include: and determining configuration attributes corresponding to the interface information according to each piece of interface information. And when the configuration attribute is a configurable attribute, the interface information can be used as the configurable interface information.
S130, responding to networking triggering operation input for the first virtual equipment, determining second virtual equipment to be networked with the first virtual equipment, and determining a second virtual communication interface corresponding to the second virtual equipment.
The networking triggering operation may be understood as determining a second virtual device to be networked with the first virtual device, and determining a second virtual communication interface corresponding to the second virtual device. The second virtual device may be understood as a virtual device that needs to communicate with the first virtual device. Alternatively, the second virtual device may be a virtual device to be in communication with the first virtual device; or may be an upper computer corresponding to the first virtual device. In practical applications, an upper computer corresponding to a first virtual device is generally used to control the first virtual device. The second virtual communication interface may be understood as a virtual communication interface of the second virtual device.
As an optional embodiment of the present invention, the determining, in response to a networking trigger operation input for the first virtual device, a second virtual device to be networked with the first virtual device may include: and responding to networking triggering operation input for the first virtual device and a third virtual device, and determining the triggered third virtual device as a second virtual device to be networked with the first virtual device.
The third virtual device may be understood as a virtual device that needs to be connected to the first virtual device in a networking manner. The number of third virtual devices may be one, two or more. In practical applications, the number of third virtual devices is typically a plurality.
Specifically, after receiving the networking trigger operation input for the first virtual device and the third virtual device, the first virtual device and the third virtual device may be connected in a networking manner, so that the triggered third virtual device may be determined. The triggered third virtual device may thus be determined as a second virtual device to be networked with the first virtual device.
In the implementation of the present invention, the purpose of the networking triggering operation input for the first virtual device and the third virtual device is to connect the first virtual device and the second virtual device, so as to implement peer-to-peer communication between the first virtual device and the third virtual device.
As another optional embodiment of the present invention, the determining, in response to a networking trigger operation input for the first virtual device, a second virtual device to be networked with the first virtual device may include: and responding to a networking triggering operation input for the first virtual device, and determining an upper computer corresponding to the first virtual device as a second virtual device to be networked with the first virtual device.
Specifically, referring to fig. 2, in the case where there is no virtual device other than the first virtual device, the receiving of the networking trigger operation input for the first virtual device (VDEV of SylixOS in fig. 2) may be receiving of the networking trigger operation for the first virtual device and the upper computer (Connector in fig. 2) corresponding to the first virtual device. Based on this, the host computer corresponding to the first virtual device may be determined as a second virtual device to be networked with the first virtual device. Note that SylixOS is a large embedded real-time operating system.
With reference to fig. 2, in the embodiment of the present invention, after the host computer of the first virtual device is connected to the driver of the first virtual device, communication between an application program (APP in fig. 2) on the embedded real-time operating system including the first virtual device and the host computer of the first virtual device may be implemented. Wherein the application program and the virtual device driver realize communication through I/O call, and the first virtual device and the upper computer of the first virtual device communicate by using a network (VSOA in FIG. 2). It should be noted that the operating system of the upper computer of the first virtual device may be a SylixOS operating system, a Linux operating system, or a Windows operating system.
S140, establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface.
Specifically, after the first virtual communication interface and the second virtual communication interface are determined, the data transmission channels for the first virtual device and the second virtual device can be obtained by the first virtual communication interface and the second virtual communication interface. And further, based on the data transmission channel, communication connection between the first virtual device and the second virtual device can be realized, so that the first virtual device and the second virtual device can communicate with each other.
It should be noted that, in the embodiment of the present invention, since the first virtual communication interface corresponds to the first virtual device, the second virtual communication interface corresponds to the second virtual device, and the first virtual device and the second virtual device may be used to emulate different functional modules, the communication protocols corresponding to the first virtual communication interface and the second virtual communication interface may be the same or different.
Under the condition that the communication protocols corresponding to the first virtual communication interface and the second virtual communication interface are the same, the communication connection between the first virtual communication interface and the second virtual communication interface can be directly established. In the case where the communication protocols corresponding to the first virtual communication interface and the second virtual communication interface are different, a communication connection between the first virtual communication interface and the second virtual communication interface may be established based on the virtual communication protocol converter.
In the embodiment of the invention, the first virtual communication interface and the second virtual communication interface are respectively connected to a pre-established communication protocol converter so as to establish communication connection virtualization between the first virtual device and the second virtual device. The virtual communication protocol converter may be configured to perform data format conversion on first communication data transmitted to the second virtual communication interface through the first virtual communication interface to convert the first communication data into communication data conforming to a communication protocol corresponding to the second virtual communication interface in a case where communication protocols corresponding to the first virtual communication interface and the second virtual communication interface are different, and perform data format conversion on second communication data transmitted to the first virtual communication interface through the second virtual communication interface to convert the second communication data into communication data conforming to a communication protocol corresponding to the first virtual communication interface in a case where the communication protocols corresponding to the second virtual communication interface and the first virtual communication interface are different.
By adopting the technical scheme, the data communication is not limited to the virtual equipment with the same data protocol, and the flexibility of the data communication is increased, so that more equipment communication scenes can be matched.
According to the technical scheme, at least one candidate virtual communication interface is displayed in response to the communication interface configuration operation input for the first virtual equipment, so that the candidate virtual communication interface is provided for selection by a user, and the universality of communication among the virtual equipment is improved. And responding to the selection triggering operation input for the candidate virtual communication interfaces, determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interfaces, supporting flexible selection of the virtual communication interface of the first virtual device, and realizing configuration of the virtual communication interface of the first virtual device by selecting the triggering operation. And responding to the networking triggering operation input by the first virtual equipment, determining second virtual equipment to be networked with the first virtual equipment, and determining a second virtual communication interface corresponding to the second virtual equipment, so that the second virtual communication interface to be connected with the first communication interface of the first virtual equipment can be accurately acquired. And finally, establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface. The technical problems of low flexibility and poor universality caused by dependence of equipment communication on hardware circuits in the related technology are solved, flexible communication among equipment is realized, and the universality of communication among the equipment is improved.
Example two
Fig. 3 is a flow chart of a device communication method according to a second embodiment of the present invention, where, based on the foregoing embodiment, optionally, the establishing a communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface includes: a network connection is established between the first virtual communication interface and the second virtual communication interface through a software switch to establish a communication connection between the first virtual device and the second virtual device. The technical features that are the same as or similar to those of the above embodiments are not described herein. As shown in fig. 3, the method in this embodiment specifically includes:
s210, at least one candidate virtual communication interface is displayed in response to a communication interface configuration operation input for the first virtual device.
S220, responding to a selection triggering operation input for the candidate virtual communication interfaces, and determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interfaces.
S230, responding to networking triggering operation input for the first virtual equipment, determining second virtual equipment to be networked with the first virtual equipment, and determining a second virtual communication interface corresponding to the second virtual equipment.
S240, establishing network connection between the first virtual communication interface and the second virtual communication interface through a software switch so as to establish communication connection between the first virtual device and the second virtual device.
Wherein a software interaction machine may be understood as a switch for establishing a network connection between said first virtual communication interface and said second virtual communication interface. Alternatively, the software interactors may be application programs having interactor functionality.
Specifically, in the case where the number of first virtual communication apparatuses is one and the number of second virtual apparatuses is one; alternatively, in the case where the number of first virtual communication apparatuses is one and the number of second virtual apparatuses is plural; alternatively, when the number of the first virtual communication devices is plural and the number of the second virtual devices is one, the first virtual communication interface of the first virtual device may be connected to the communication of the interface of the software switch, and the second virtual interface of the second virtual device may be connected to the communication of the interface of the software switch. After the communication connection is established successfully, a network connection can be established between the first virtual communication interface and the second virtual communication interface through a software switch. Thereby establishing a communication connection between the first virtual device and the second virtual device.
Illustratively, as shown in FIG. 4, the first virtual device VDEV1 and the second virtual device VDEV2 communicate through a software Switch. That is, the first virtual device VDEV1 communicates with the second virtual device VDEV2 through the software Switch; alternatively, the second virtual device VDEV2 communicates with the first virtual device VDEV1 through the software Switch. As shown in fig. 5, the first virtual device VDEV1 communicates with the host computer Connector through the software Switch; the second virtual device VDEV1 communicates with the upper computer Connector through a software Switch; the host computer Connector is a host computer common to the first virtual device VDEV1 and the second virtual device VDEV 1.
According to the technical scheme of the embodiment of the invention, the network connection is established between the first virtual communication interface and the second virtual communication interface through the software switch, so that the communication connection between the first virtual device and the second virtual device is established. According to the technical scheme provided by the embodiment of the invention, the software switch is used for establishing one-to-one or one-to-many communication connection between the first virtual equipment and the second virtual equipment, so that the communication between the equipment has stronger expandability.
Example III
Fig. 6 is a flow chart of a device communication method according to a third embodiment of the present invention, optionally, after the communication connection between the first virtual device and the second virtual device is established based on the first virtual communication interface and the second virtual communication interface, the method further includes: responding to a first test triggering operation, acquiring first communication test data input at the first virtual equipment end, and transmitting the first communication test data from the first virtual communication interface to the second virtual communication interface; responding to a second test triggering operation, acquiring second communication test data input at the second virtual equipment end, and transmitting the first communication test data from the second virtual communication interface to the first virtual communication interface; and determining that a successful communication connection is established between the first virtual device and the second virtual device under the condition that the second virtual device receives the first communication test data and the first virtual device receives the second communication test data. The technical features that are the same as or similar to those of the above embodiments are not described herein.
As shown in fig. 6, the method in this embodiment specifically includes:
s310, at least one candidate virtual communication interface is displayed in response to a communication interface configuration operation input for the first virtual device.
S320, responding to a selection triggering operation input for the candidate virtual communication interfaces, and determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interfaces.
S330, responding to the networking triggering operation input for the first virtual device, determining a second virtual device to be networked with the first virtual device, and determining a second virtual communication interface corresponding to the second virtual device.
S340, establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface.
S350, responding to a first test triggering operation, acquiring first communication test data input at the first virtual equipment end, and sending the first communication test data from the first virtual communication interface to the second virtual communication interface.
The first test triggering operation may be understood as a triggering operation for testing the first virtual device, and may specifically be used to obtain first communication test data input at the first virtual device end, and send the first communication test data to the second virtual communication interface through the first virtual communication interface. The first communication test data may be understood as test data for testing the first virtual device.
In the embodiment of the present invention, there are various ways of acquiring the first communication test data input at the first virtual device end in response to the first test triggering operation, for example, after receiving a control triggering operation acting on a test control for testing the first virtual device, the first communication test data input at the first virtual device end may be generated; or, the method may be that the input first communication test data for testing the first virtual device terminal is received based on the input box; after data is input, a test control for testing the first virtual device can be triggered to acquire first communication test data input at the first virtual device end.
In one embodiment, after receiving the first test trigger operation, the first communication test data input at the first virtual device end may be obtained. After obtaining the first communication test data, the first communication test data may be sent from the first virtual communication interface to the second virtual communication interface.
In another embodiment, after receiving the first test trigger operation, the first communication test data input at the first virtual device end may be obtained. After obtaining the first communication test data, the first communication test data may be sent to a software switch by the first virtual communication interface. Forwarding the first communication test data to the second virtual communication interface through a software switch.
S360, responding to a second test triggering operation, acquiring second communication test data input at the second virtual equipment end, and sending the first communication test data from the second virtual communication interface to the first virtual communication interface.
The second test triggering operation may be understood as a triggering operation for testing the second virtual device, and may specifically be used to obtain second communication test data input at the second virtual device end, and send the first communication test data to the first virtual communication interface through the second virtual communication interface. The second communication test data may be understood as a number for testing the second virtual device.
In the embodiment of the present invention, there are various ways of acquiring the second communication test data input at the second virtual device end in response to the second test triggering operation, for example, after receiving a control triggering operation acting on a test control for testing the second virtual device, the second communication test data input at the second virtual device end may be generated; or, the second communication test data input based on the input box and used for testing the second virtual equipment end can be received; after the data is input, a test control for testing the second virtual device can be triggered to acquire second communication test data input at the second virtual device end.
In one embodiment, after receiving the second test trigger operation, the second communication test data input at the second virtual device may be obtained. After obtaining the second communication test data, the second communication test data may be sent from the first virtual communication interface to the first virtual communication interface.
In another embodiment, after receiving the second test trigger operation, second communication test data input at the second virtual device end may be obtained. After obtaining the second communication test data, the second communication test data may be sent to a software switch by the second virtual communication interface. Forwarding the second communication test data to the first virtual communication interface through a software switch.
And S370, determining that a successful communication connection is established between the first virtual device and the second virtual device under the condition that the second virtual device receives the first communication test data and the first virtual device receives the second communication test data.
Specifically, when the second virtual device receives the first communication test data and the first virtual device receives the second communication test data, it may be determined that a successful communication connection is established between the first virtual device and the second virtual device, and at this time, the first virtual device and the second virtual device may communicate with each other by transmitting data.
According to the technical scheme, after the communication connection between the first virtual device and the second virtual device is established based on the first virtual communication interface and the second virtual communication interface, first communication test data input at the first virtual device end are acquired by responding to a first test triggering operation, and the first communication test data are sent to the second virtual communication interface through the first virtual communication interface; responding to a second test triggering operation, acquiring second communication test data input at the second virtual equipment end, and transmitting the first communication test data from the second virtual communication interface to the first virtual communication interface; and under the condition that the second virtual device receives the first communication test data and the first virtual device receives the second communication test data, determining that successful communication connection is established between the first virtual device and the second virtual device, and testing communication functions between the first virtual device and the second virtual device after the communication connection between the first virtual device and the second virtual device is realized.
Example IV
Fig. 7 is a schematic structural diagram of a device communication apparatus according to a fourth embodiment of the present invention. As shown in fig. 7, the apparatus includes: an interface configuration triggering module 410, a communication interface selection module 420, a networking device determination module 430, and a device communication setup module 440.
Wherein the interface configuration triggering module 410 is configured to display at least one candidate virtual communication interface in response to a communication interface configuration operation input for the first virtual device; a communication interface selection module 420, configured to determine, in response to a selection trigger operation input for the candidate virtual communication interface, a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interface; a networking device determining module 430, configured to determine a second virtual device to be networked with the first virtual device in response to a networking trigger operation input for the first virtual device, and determine a second virtual communication interface corresponding to the second virtual device; a device communication establishment module 440, configured to establish a communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface.
According to the technical scheme provided by the embodiment of the invention, the interface configuration triggering module responds to the communication interface configuration operation input for the first virtual equipment, at least one candidate virtual communication interface is displayed, the candidate virtual communication interface is provided for the user to select, and the universality of communication among the virtual equipment is improved. The communication interface selection module responds to the selection triggering operation input for the candidate virtual communication interfaces, determines the first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interfaces, supports flexible selection of the virtual communication interface of the first virtual device, can realize configuration of the virtual communication interface of the first virtual device by selecting the triggering operation, is simple and convenient to operate, and can intuitively know the configured virtual communication interface. The networking equipment determining module responds to the networking triggering operation input by the first virtual equipment, determines second virtual equipment to be networked with the first virtual equipment, and determines a second virtual communication interface corresponding to the second virtual equipment, so that the second virtual communication interface to be connected with the first communication interface of the first virtual equipment can be accurately acquired. And finally, establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface through a device communication establishment module. The technical problems of low flexibility and poor universality caused by dependence of equipment communication on hardware circuits in the related technology are solved, flexible communication among equipment is realized, and the universality of communication among the equipment is improved.
Optionally, the device communication establishing module 440 is specifically configured to establish a network connection between the first virtual communication interface and the second virtual communication interface through a software switch, so as to establish a communication connection between the first virtual device and the second virtual device.
Optionally, the communication interface selection module 420 is configured to:
taking the selected candidate virtual communication interface as a first virtual communication interface corresponding to the first virtual device; or,
editing the selected candidate virtual communication interfaces, and taking the edited candidate virtual communication interfaces as first virtual communication interfaces corresponding to the first virtual equipment.
Optionally, the communication interface selection module 420 is configured to:
responding to interface editing triggering operation input for the selected candidate virtual communication interface, and displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface;
and responding to an information editing triggering operation input for the selected configurable interface information, updating the configurable interface information based on editing content, updating the candidate virtual communication interfaces based on the updated configurable interface information, and taking the updated candidate virtual communication interfaces as first virtual communication interfaces corresponding to the first virtual equipment.
Optionally, the communication interface selection module 420 is configured to:
and acquiring a configuration file corresponding to the candidate virtual communication interface, and displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface based on the configuration file.
Optionally, the networking device determining module 430 is configured to:
responding to networking triggering operation input for the first virtual device and a third virtual device, and determining the triggered third virtual device as a second virtual device to be networked with the first virtual device; or,
and responding to a networking triggering operation input for the first virtual device, and determining an upper computer corresponding to the first virtual device as a second virtual device to be networked with the first virtual device.
Optionally, the apparatus further comprises: a device communication test module; the device communication test module is used for:
after the communication connection between the first virtual device and the second virtual device is established based on the first virtual communication interface and the second virtual communication interface, responding to a first test triggering operation, acquiring first communication test data input at the first virtual device end, and sending the first communication test data to the second virtual communication interface through the first virtual communication interface;
Responding to a second test triggering operation, acquiring second communication test data input at the second virtual equipment end, and transmitting the first communication test data from the second virtual communication interface to the first virtual communication interface;
and determining that a successful communication connection is established between the first virtual device and the second virtual device under the condition that the second virtual device receives the first communication test data and the first virtual device receives the second communication test data.
The device communication apparatus provided by the embodiment of the invention can execute the device communication method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that each unit and module included in the device communication apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present invention.
Example five
Fig. 8 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 8, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the device communication method.
In some embodiments, the device communication method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the device communication method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the device communication method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of device communication, comprising:
displaying at least one candidate virtual communication interface in response to a communication interface configuration operation input for the first virtual device;
determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interface in response to a selection trigger operation input for the candidate virtual communication interface;
responding to a networking triggering operation input for the first virtual device, determining a second virtual device to be networked with the first virtual device, and determining a second virtual communication interface corresponding to the second virtual device;
And establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface.
2. The method of claim 1, wherein the establishing a communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface comprises:
a network connection is established between the first virtual communication interface and the second virtual communication interface through a software switch to establish a communication connection between the first virtual device and the second virtual device.
3. The method of claim 1, wherein the determining a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interfaces comprises:
taking the selected candidate virtual communication interface as a first virtual communication interface corresponding to the first virtual device; or,
editing the selected candidate virtual communication interfaces, and taking the edited candidate virtual communication interfaces as first virtual communication interfaces corresponding to the first virtual equipment.
4. A method according to claim 3, wherein said editing the selected candidate virtual communication interface, using the edited candidate virtual communication interface as a first virtual communication interface corresponding to the first virtual device, comprises:
responding to interface editing triggering operation input for the selected candidate virtual communication interface, and displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface;
and responding to an information editing triggering operation input for the selected configurable interface information, updating the configurable interface information based on editing content, updating the candidate virtual communication interfaces based on the updated configurable interface information, and taking the updated candidate virtual communication interfaces as first virtual communication interfaces corresponding to the first virtual equipment.
5. The method of claim 4, wherein the displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface comprises:
and acquiring a configuration file corresponding to the candidate virtual communication interface, and displaying at least one item of configurable interface information corresponding to the candidate virtual communication interface based on the configuration file.
6. The method of claim 1, wherein the determining, in response to a networking trigger operation entered for the first virtual device, a second virtual device to be networked with the first virtual device comprises:
responding to networking triggering operation input for the first virtual device and a third virtual device, and determining the triggered third virtual device as a second virtual device to be networked with the first virtual device; or,
and responding to a networking triggering operation input for the first virtual device, and determining an upper computer corresponding to the first virtual device as a second virtual device to be networked with the first virtual device.
7. The method of claim 1, further comprising, after the establishing a communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface:
responding to a first test triggering operation, acquiring first communication test data input at the first virtual equipment end, and transmitting the first communication test data from the first virtual communication interface to the second virtual communication interface;
Responding to a second test triggering operation, acquiring second communication test data input at the second virtual equipment end, and transmitting the first communication test data from the second virtual communication interface to the first virtual communication interface;
and determining that a successful communication connection is established between the first virtual device and the second virtual device under the condition that the second virtual device receives the first communication test data and the first virtual device receives the second communication test data.
8. A device communication apparatus, comprising:
an interface configuration triggering module for displaying at least one candidate virtual communication interface in response to a communication interface configuration operation input for the first virtual device;
a communication interface selection module, configured to determine a first virtual communication interface corresponding to the first virtual device based on the selected candidate virtual communication interface in response to a selection trigger operation input for the candidate virtual communication interface;
the networking equipment determining module is used for responding to networking triggering operation input for the first virtual equipment, determining second virtual equipment to be networked with the first virtual equipment, and determining a second virtual communication interface corresponding to the second virtual equipment;
And the device communication establishing module is used for establishing communication connection between the first virtual device and the second virtual device based on the first virtual communication interface and the second virtual communication interface.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the device communication method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the device communication method of any one of claims 1-7 when executed.
CN202311196727.7A 2023-09-15 2023-09-15 Device communication method, device, electronic device and storage medium Pending CN117061587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311196727.7A CN117061587A (en) 2023-09-15 2023-09-15 Device communication method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311196727.7A CN117061587A (en) 2023-09-15 2023-09-15 Device communication method, device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN117061587A true CN117061587A (en) 2023-11-14

Family

ID=88653717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311196727.7A Pending CN117061587A (en) 2023-09-15 2023-09-15 Device communication method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN117061587A (en)

Similar Documents

Publication Publication Date Title
CN108200170B (en) Message processing method and device and readable storage medium
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN114691780A (en) Data synchronization method and device, electronic equipment and storage medium
CN113420002A (en) Data synchronization method and device, electronic equipment and storage medium
CN110380902B (en) Topological relation generation method and device, electronic equipment and storage medium
CN116301676A (en) Printing equipment connection method, device, equipment and storage medium
CN115658218B (en) Method, device, equipment and storage medium for accessing edge equipment to cloud
CN113326192B (en) Application testing method, device, equipment and storage medium for mobile terminal
CN116582387A (en) Message sending method, device and equipment
CN117061587A (en) Device communication method, device, electronic device and storage medium
CN113743288B (en) Image recognition method, device and equipment of cloud mobile phone and storage medium
CN112667868B (en) Data detection method and device
CN113691937A (en) Method for determining position information, cloud mobile phone and terminal equipment
CN116306407B (en) Verification method, device, equipment and storage medium of Network On Chip (NOC)
CN113992729B (en) Cloud mobile phone control method, related device and computer program product
CN113741937B (en) Application updating method and device for cloud terminal and computer program product
CN114780470B (en) Cloud mobile phone management system, method, device, electronic equipment and readable storage medium
CN115840604B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN114650222B (en) Parameter configuration method, device, electronic equipment and storage medium
CN114116095B (en) Input method, input device, electronic equipment, medium and product
CN114401300B (en) Cloud application control method, device, equipment, medium and program product
CN117651078A (en) Data transmission method and device, electronic equipment and storage medium
CN118041767A (en) Network port configuration method, device, equipment and medium in network card performance test scene
CN116126409A (en) Method, device, equipment and medium for acquiring and modifying system configuration information
CN117827458A (en) Resource matching method and device, electronic equipment and storage medium

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