CN111694778A - Data conversion method, device and storage medium - Google Patents

Data conversion method, device and storage medium Download PDF

Info

Publication number
CN111694778A
CN111694778A CN202010466043.4A CN202010466043A CN111694778A CN 111694778 A CN111694778 A CN 111694778A CN 202010466043 A CN202010466043 A CN 202010466043A CN 111694778 A CN111694778 A CN 111694778A
Authority
CN
China
Prior art keywords
data
equipment
usb
serial port
acquired
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.)
Granted
Application number
CN202010466043.4A
Other languages
Chinese (zh)
Other versions
CN111694778B (en
Inventor
修惠文
王晓明
杨黎明
钟木灶
宋菲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hylink Information Technology Co ltd
Original Assignee
Shenzhen Hylink Information 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 Shenzhen Hylink Information Technology Co ltd filed Critical Shenzhen Hylink Information Technology Co ltd
Priority to CN202010466043.4A priority Critical patent/CN111694778B/en
Publication of CN111694778A publication Critical patent/CN111694778A/en
Application granted granted Critical
Publication of CN111694778B publication Critical patent/CN111694778B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03547Touch pads, in which fingers can move on a surface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Abstract

The invention discloses a data conversion method, which comprises the following steps: acquiring data received by a wired serial port and a network port; if the acquired data is touch data, converting the acquired data into USB mouse data and sending the USB mouse data to the second equipment so that the second equipment can respond to the USB mouse data, and feeding back a display signal after response to the first equipment for display; and if the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment. The invention also discloses a data conversion device and a computer readable storage medium. The touch data are converted into USB mouse data and sent to the second equipment, so that the second equipment can be controlled through touch operation on the first equipment; by converting the network data into the USB communication data, the data directional transmission from the first equipment to the second equipment is realized.

Description

Data conversion method, device and storage medium
Technical Field
The present invention relates to the field of data conversion technologies, and in particular, to a data conversion method, a data conversion apparatus, and a computer-readable storage medium.
Background
In a vehicle-mounted environment, the display screens of the vehicle-mounted computers are usually installed in the center console in a centralized manner, however, the installation space of the center console is limited, and when a plurality of vehicle-mounted computers need to be installed, the plurality of vehicle-mounted computers are required to display the display screens installed on the center console in a manner of sharing display signals. Especially in the scene of police vehicle-mounted service, besides the display screen installed on the central control platform, data information of different networks, such as internet navigation and voice service, needs to be used; supporting a service system of a public security intranet; for safety reasons, the collected information of the video private network needs to be isolated and the connection between the special vehicle-mounted computer and each network cannot be directly established.
At present, the industry mostly adopts a network link mode (through software such as a remote desktop) to realize the function of sharing a touch screen by two computers, but in some scenes that a network protocol is forbidden to directly interconnect the two computers, bidirectional flow of sensitive data is forbidden, and at the moment, the data can only be allowed to directionally flow according to a preset strategy rule.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a data conversion method, a data conversion device and a computer readable storage medium, and aims to solve the problems of data transmission when two devices cannot be interconnected through a network and display screen sharing when one device is not provided with a display screen in the prior art.
To achieve the above object, the present invention provides a data conversion method, comprising the steps of:
acquiring data received by a wired serial port and a network port;
if the acquired data is touch data, converting the acquired data into USB mouse data and sending the USB mouse data to the second equipment so that the second equipment can respond to the USB mouse data, and feeding back a display signal after response to the first equipment for display;
and if the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment.
Optionally, the step of converting the acquired data into USB mouse data and sending the USB mouse data to the second device includes:
converting the acquired data into mouse data calculated in absolute coordinates;
and triggering a USB mouse event based on the converted mouse data and sending the mouse data to the second equipment so that the second equipment can trigger operation response at the position corresponding to the mouse data.
Optionally, the step of converting the acquired data into USB communication data and sending the USB communication data to the second device includes:
converting the acquired data into USB communication data;
and triggering the USB communication equipment to transmit the USB communication data to the second equipment based on the converted USB communication data so that the second equipment can use the received USB communication data for corresponding service software.
Optionally, after the step of obtaining the data received by the wired serial port and the network port, the method includes:
and determining the data type of the acquired data according to the identification information of the acquired data, and performing corresponding data conversion on the acquired data of different types according to the determined data type.
Optionally, after the step of determining the data type of the acquired data according to the identification information of the acquired data, the method further includes:
if the data type is control command data, converting the acquired data into a control command;
and transmitting the control command to the second equipment through the USB virtual serial port so as to control the second equipment to make a corresponding response to the received control command.
Optionally, before the step of converting the touch data into USB mouse data and sending the USB mouse data to the second device if the obtained data is touch data, the method includes:
judging whether the wired serial port or the network port receives signal synchronization command data or not;
and if the touch control data is received, converting the signal synchronization command data into a signal synchronization command, and sending the signal synchronization command to the second equipment through the USB virtual serial port, so that after the second equipment synchronizes the display signal to the first equipment, the second equipment is controlled to make a corresponding response based on the touch control data received by the wired serial port or the network port.
Optionally, the method further comprises:
acquiring USB virtual serial port data received by the USB virtual serial port;
and if the USB virtual serial port data is control command data, converting the USB virtual serial port data into a control command, and transmitting the control command to the first equipment through the wired serial port or the network port so as to control the first equipment to make a corresponding response to the received control command.
Optionally, after the step of obtaining the USB virtual serial port data received by the USB virtual serial port, the method further includes:
and if the USB virtual serial port data is configuration command data, converting the USB virtual serial port data into a configuration command so as to execute corresponding configuration operation according to the converted configuration command.
In addition, in order to achieve the above object, the present invention further provides a data conversion apparatus, which includes a memory, a processor and a data conversion program stored on the processor and operable on the processor, wherein the processor implements the steps of the data conversion method as described above when executing the data conversion program.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a data conversion program which, when executed by a processor, implements the steps of the data conversion method as described above.
In the embodiment of the invention, the data received by the wired serial port and the network port is acquired, and when the acquired data is touch data, the acquired data is converted into USB mouse data and is sent to the second equipment, so that the second equipment responds to the USB mouse data, and a display signal after response is fed back to the first equipment for display; and when the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment. The touch data are converted into the USB mouse data, so that the second equipment can output the display signal on the display screen of the first equipment, the display signal cannot be output to the display screen to be displayed when the second equipment does not have the display screen, the second equipment is not convenient to operate and control visually, and the convenience of equipment control is improved; and the network data is converted into USB communication data, so that the data directional transmission from the first equipment to the second equipment is realized, the situation that the second equipment is used for a private network and the network interconnection between the first equipment and the second equipment is not allowed is avoided, and the data directional transmission is realized.
Drawings
FIG. 1 is a schematic structural diagram of a data conversion apparatus in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram of a first embodiment of the data conversion method of the present invention;
FIG. 3 is a schematic diagram of a data conversion system according to an embodiment of the data conversion method of the present invention;
FIG. 4 is a flowchart illustrating a data conversion method according to a second embodiment of the present invention;
FIG. 5 is a flowchart illustrating a data conversion method according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the invention is that the data received by the wired serial port and the network port is obtained; if the acquired data is touch data, converting the acquired data into USB mouse data and sending the USB mouse data to the second equipment so that the second equipment can respond to the USB mouse data, and feeding back a display signal after response to the first equipment for display; and if the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment.
The conventional vehicle-mounted system cannot realize data transmission among the vehicle-mounted computers under the condition that a plurality of vehicle-mounted computers cannot be interconnected with each other and need to share the same display screen, and the plurality of vehicle-mounted computers can share the same display screen. Therefore, the invention provides a data conversion method, a data conversion device and a computer readable storage medium, by acquiring data received by a wired serial port and a network port, when the acquired data is touch data, the acquired data is converted into USB mouse data and sent to a second device, so that the second device responds to the USB mouse data, and a display signal after response is fed back to the first device for display, thereby avoiding that the display signal cannot be displayed when the second device is a display screen, being inconvenient for visually operating and controlling the second device and improving the convenience of device control; and when the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to complete network data transmission from the first equipment to the second equipment, so that the situation that the second equipment is used for a private network and network interconnection between the first equipment and the second equipment is not allowed is avoided, the network data cannot be transmitted from the first equipment to the second equipment, and the directional data transmission from the first equipment to the second equipment is realized.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a data conversion apparatus in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the data conversion apparatus may include: a communication bus 1002, a processor 1001, such as a CPU, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the data conversion device configuration shown in fig. 1 does not constitute a limitation of the data conversion device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
In the data conversion apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the data conversion program stored in the memory 1005 and perform the following operations:
acquiring data received by a wired serial port and a network port;
if the acquired data is touch data, converting the acquired data into USB mouse data and sending the USB mouse data to the second equipment so that the second equipment can respond to the USB mouse data, and feeding back a display signal after response to the first equipment for display;
and if the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment.
Alternatively, the processor 1001 may call a data conversion program stored in the memory 1005, and further perform the following operations:
converting the acquired data into mouse data calculated in absolute coordinates;
and triggering a USB mouse event based on the converted mouse data and sending the mouse data to the second equipment so that the second equipment can trigger operation response at the position corresponding to the mouse data.
Alternatively, the processor 1001 may call a data conversion program stored in the memory 1005, and further perform the following operations:
converting the acquired data into USB communication data;
and triggering the USB communication equipment based on the converted USB communication data, and transmitting the USB communication data to the second equipment so that the second equipment can use the received USB communication data for corresponding service software.
Optionally, after the step of acquiring the data received by the wired serial port and the network port, the processor 1001 calls a data conversion program stored in the memory 1005, and performs the following operations:
and determining the data type of the acquired data according to the identification information of the acquired data, and performing corresponding data conversion on the acquired data of different types according to the determined data type.
Alternatively, after the step of determining the data type of the acquired data according to the identification information of the acquired data, the processor 1001 may call a data conversion program stored in the memory 1005, and further perform the following operations:
if the data type is control command data, converting the acquired data into a control command;
and transmitting the control command to the second equipment through the USB virtual serial port so as to control the second equipment to make a corresponding response to the received control command.
Optionally, before the step of converting the acquired data into USB mouse data and sending the USB mouse data to the second device if the acquired data is touch data, the processor 1001 may call a data conversion program stored in the memory 1005, and further perform the following operations:
judging whether the wired serial port or the network port receives signal synchronization command data or not;
and if the touch control data is received, converting the signal synchronization command data into a signal synchronization command, and sending the signal synchronization command to the second equipment through the USB virtual serial port, so that after the second equipment synchronizes the display signal to the first equipment, the second equipment is controlled to make a corresponding response based on the touch control data received by the wired serial port or the network port.
Alternatively, the processor 1001 may call a data conversion program stored in the memory 1005, and further perform the following operations:
acquiring USB virtual serial port data received by the USB virtual serial port;
and if the USB virtual serial port data is control command data, converting the USB virtual serial port data into a control command, and transmitting the control command to the first equipment through the wired serial port or the network port so as to control the first equipment to make a corresponding response to the received control command.
Optionally, after the step of acquiring the USB virtual serial port data received by the USB virtual serial port, the processor 1001 may call the data conversion program stored in the memory 1005, and further perform the following operations:
and if the USB virtual serial port data is configuration command data, converting the USB virtual serial port data into a configuration command so as to execute corresponding configuration operation according to the converted configuration command.
Referring to fig. 2, fig. 2 is a flowchart of a data conversion method according to a first embodiment of the present invention, in this embodiment, the data conversion method includes the following steps:
step S10: acquiring data received by a wired serial port and a network port;
in some specific application scenarios, such as police vehicles, besides accessing the data of the public security private network, resource information of other networks, such as navigation of the internet, voice service, acquisition information of a video private network, and the like, sometimes needs to be used. In such a scenario, in order to improve security of data access and transmission, the vehicle-mounted device for the private network cannot directly download or access network data from other networks. At this time, at least two vehicle-mounted devices that can be used for network data access may be installed on the vehicle, one of which is used for accessing the public network to download the public network data from the public network, and the other is used for accessing a private network (e.g., a public security private network). If the special vehicle-mounted equipment for accessing the special network wants to access the network data of other networks, the network data can be acquired from other vehicle-mounted equipment after being downloaded by other vehicle-mounted equipment. In order to ensure data security of the dedicated vehicle-mounted device and prevent risks such as data leakage and system intrusion, it is generally permitted to transmit only network data downloaded from another vehicle-mounted device to the dedicated vehicle-mounted device, and not permitted to transmit data from the dedicated vehicle-mounted device to another vehicle-mounted device. However, when network data downloaded by other vehicle-mounted devices is transmitted to a vehicle-mounted device for accessing a dedicated network, in some special application occasions, to prevent bidirectional flow of sensitive data, direct network interconnection of two vehicle-mounted devices is prohibited, and since a plurality of displays of the vehicle-mounted devices in a vehicle-mounted system are mostly installed in a center console and the installation position of the center console is limited, only one display is usually installed, so that a plurality of vehicle-mounted devices need to share the same display screen.
On the premise of not directly interconnecting the vehicle-mounted devices, in order to enable at least two vehicle-mounted devices to share the same display screen and to enable data directional transmission from other vehicle-mounted devices to the special vehicle-mounted device, the present embodiment provides a solution, in which a USB mouse with absolute coordinates, a USB virtual serial port, and a USB special communication device are simulated by a data conversion device to enable the special vehicle-mounted device and other vehicle-mounted devices to share the display screen and to enable data directional transmission from other vehicle-mounted devices to the special vehicle-mounted device. Specifically, as shown in fig. 3, if the vehicle-mounted system applied in this embodiment includes a first device and a second device, and the first device is a vehicle-mounted device that can be used to access network resources through a public network, the second device is a vehicle-mounted device that can be used to access network resources through a private network, and the first device is configured with a touch display screen, and the second device is not configured with a touch display screen, the USB mouse with absolute coordinates is used to transmit mouse data calculated with absolute coordinates to the second device after the touch data transmitted by the first device is converted by the data conversion device to obtain the mouse data calculated with absolute coordinates; the USB special communication equipment is used for converting network data sent by the first equipment into USB communication data through the data conversion device and then sending the USB communication data to the second equipment; the USB virtual serial port is used for sending the converted mouse data, USB communication data or control command to the second equipment and receiving the control command data sent by the second equipment; in addition, the data conversion device further comprises a wired serial port and a network port, and the wired serial port and the network port are used for receiving touch data, network data and control command data sent by the first equipment. Therefore, to output a display signal of the second device on the touch display screen of the first device, to realize directional data transmission from the first device to the second device, data received by the wired serial port and the network port needs to be monitored to obtain the data received by the wired serial port and the network port, where the received data may include: touch data, network data, control command data and the like sent by the first device.
In addition, the vehicle-mounted system applied in this embodiment at least includes the first device and the second device, but is not limited to the first device and the second device, and the number of the devices applied is not limited herein, and only the first device and the second device are taken as examples. The first device and the second device may be vehicle-mounted devices such as a vehicle-mounted computer and the like which can access network resources and can output display signals; the communication mode between the first device and the data conversion device is not limited to the wired serial port and the network port, but may also include WIFI, bluetooth, and the like, and the wired serial port and the network port are only used as an example for explanation, and are not specifically limited.
Step S20: if the acquired data is touch data, converting the acquired data into USB mouse data and sending the USB mouse data to the second equipment so that the second equipment can respond to the USB mouse data, and feeding back a display signal after response to the first equipment for display;
assuming that the first device and the second device are both vehicle-mounted computers, the first device is denoted as a vehicle-mounted computer a, and the second device is denoted as a vehicle-mounted computer B, after the data received by the wired serial port and the network port is acquired, if the acquired data is touch data, because the vehicle-mounted computer B is not directly connected to the display of the vehicle-mounted computer a, the actual display resolution (the resolution corresponding to the USB mouse) of the vehicle-mounted computer B is not necessarily consistent with the resolution of the touch display screen of the vehicle-mounted computer a, that is, if a user clicks the point (0, 0) on the touch display screen of the vehicle-mounted computer, the position of the point corresponding to the actual display resolution (0, 0) of the vehicle-mounted computer B is not necessarily the same as the position of the point (0, 0) on the touch display screen. Therefore, when receiving the touch data sent by the on-board computer a, the data conversion device is required to further convert the touch data into mouse data calculated by absolute coordinates, so that the on-board computer B can accurately respond to the touch data sent by the on-board computer a according to the converted mouse data.
Specifically, when the acquired data is touch data, the data conversion device converts the acquired touch data into mouse data calculated by absolute coordinates according to the absolute coordinates, triggers a USB mouse event based on the converted mouse data (particularly, mouse coordinates) and sends the mouse data to the on-board computer B, and after receiving the mouse data, the on-board computer B triggers a response operation at a coordinate position corresponding to the mouse data and synchronizes a display screen after the response to the on-board computer a in real time. In this embodiment, the process of triggering the USB mouse event is similar to the process of triggering the mouse event through a touch pad (touch panel) on the notebook computer, and specifically, the touch data corresponding to the touch display screen may be converted into the mouse data calculated by the absolute coordinate through the data conversion device, and then the USB mouse sends the mouse data calculated by the absolute coordinate to the in-vehicle computer B. The vehicle-mounted computer B can control the focus to directly jump to the coordinate position corresponding to the mouse data calculated by the absolute coordinates on the actual display interface (the display interface corresponding to the USB mouse) of the vehicle-mounted computer B according to the received mouse data calculated by the absolute coordinates. The touch data can comprise the resolution of a touch display screen, the position information of a touch point clicked on the touch display screen by a user in the touch display screen, and the like; the mouse data is the position information of the focus on the actual display interface of the vehicle-mounted computer B obtained by conversion according to the position information of the touch point in the touch display screen.
The conversion process between the touch data and the absolute coordinate data may be: firstly, acquiring the resolution (such as 1280 x 800) of a touch display screen of a vehicle-mounted computer A and the display resolution (such as 500 x 600) corresponding to an actual display interface of a vehicle-mounted computer B, directly taking a touch coordinate corresponding to the touch display screen as a mouse coordinate when the resolution of the touch display screen is consistent with the actual display resolution of the vehicle-mounted computer B, reporting the touch coordinate to the vehicle-mounted computer B through a USB mouse, triggering a mouse event at the position of the mouse coordinate on the actual display interface of the vehicle-mounted computer B, and responding to touch data sent by the vehicle-mounted computer A; if the resolution of the touch display screen is not consistent with the resolution corresponding to the actual display interface of the vehicle-mounted computer B, the coordinates of the touch points are calculated according to the absolute coordinates according to the correspondence between the resolution of the touch display screen and the resolution of the actual display interface of the vehicle-mounted computer B and the coordinates of the touch points, so that the coordinates of the touch points are converted into the mouse coordinates calculated according to the absolute coordinates through the data conversion device. And then the data is sent to the vehicle-mounted computer B through the USB mouse, namely, on an actual display interface of the vehicle-mounted computer B, a key operation is triggered at a display position corresponding to the mouse coordinate calculated by the absolute coordinate, so that the vehicle-mounted computer B makes a corresponding response, and a display picture after the response is synchronized to the vehicle-mounted computer A, so that the display screen of the vehicle-mounted computer A is synchronously displayed. Therefore, the vehicle-mounted computer B can output data on the touch display screen of the vehicle-mounted computer A, namely the vehicle-mounted computer B can share the touch display screen of the vehicle-mounted computer A.
Step S30: and if the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment.
After the data received by the wired serial port and the network port is acquired, if the acquired data is network data, since the vehicle-mounted computer a and the vehicle-mounted computer B cannot be interconnected through a network and the data of the vehicle-mounted computer B is not allowed to flow out, in order to improve the safety of data transmission, the received network data needs to be converted into USB communication data through a data conversion device, so that the network data can be sent to the vehicle-mounted computer B in a legal data format which can be identified by the vehicle-mounted computer B. Therefore, after the received network data is converted into the USB communication data, the USB communication device may be triggered to send the USB communication data to the on-board computer B according to the converted USB communication data, so as to complete the data conversion from the on-board computer a to the on-board computer B, so that the on-board computer B can use the received USB communication data in corresponding service software, such as: if the converted USB communication data is map data, the vehicle-mounted computer B can use the map data for a special map or navigation software; if the converted USB communication data is video data, the vehicle-mounted computer B may use the video data in a dedicated video monitoring player or other playing software.
In this embodiment, by acquiring data received by a wired serial port and a network port, when the acquired data is touch data, the acquired data is converted into USB mouse data and sent to the second device, so that the second device responds to the USB mouse data, and feeds back a display signal after the response to the first device for display; and when the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment. The touch control data and the network data received from the first equipment are subjected to data conversion through the data conversion device and then sent to the second equipment, so that not only can a display signal of the second equipment be output on a display screen of the first equipment, but also the network data of a non-private network can be directionally transmitted to the second equipment from the first equipment, the second equipment is prevented from being inconvenient to operate and control when the second equipment does not have a display screen, and the data can not be directionally transmitted in a network interconnection mode when the first equipment and the second equipment are not allowed to be in network interconnection, so that the control convenience of the equipment is improved, and the directional transmission of the data is realized.
Referring to fig. 4, fig. 4 is a flowchart of a data conversion method according to a second embodiment of the present invention, in this embodiment, the data conversion method includes the following steps:
step S11: acquiring data received by a wired serial port and a network port;
step S12: determining the data type of the acquired data according to the identification information of the acquired data, and performing corresponding data conversion on the acquired data of different types according to the determined data type;
step S13: if the acquired data is touch data, converting the acquired data into USB mouse data and sending the USB mouse data to the second equipment so that the second equipment can respond to the USB mouse data, and feeding back a display signal after response to the first equipment for display;
step S14: and if the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment.
In this embodiment, for convenience of unified description, it is also assumed that the first device and the second device are both vehicle-mounted computers, and the first device is denoted as a vehicle-mounted computer a, and the second device is denoted as a vehicle-mounted computer B. Moreover, the communication mode between the first device and the data conversion apparatus is not limited to the wired serial port and the network port, and may also include WIFI, bluetooth, and the like, and the description is given only by taking the wired serial port and the network port as an example. After the data received by the wired serial port and the network port are acquired, the acquired data may be touch data sent by the vehicle-mounted computer a, network data sent by the vehicle-mounted computer a, control command data sent by the vehicle-mounted computer a, and the like. Therefore, when monitoring data received by the wired serial port and the network port, the data type of the acquired data needs to be determined first, and the determination can be specifically performed according to identification information corresponding to different types of data, wherein the identification information can be system default identification information or self-defined identification information according to data characteristics corresponding to different types of data. And then performing corresponding data conversion on the acquired data of different types according to the determined data types. If the acquired data is touch data, the touch data needs to be converted into mouse data calculated by absolute coordinates to trigger a USB mouse event, and the mouse data is sent to the vehicle-mounted computer B so that the vehicle-mounted computer B can make a corresponding response according to the mouse data; if the acquired data is network data, since the vehicle-mounted computer B can only be used in private networks such as public security private networks and the like, only legal data is allowed to flow in, and data is not allowed to flow out, the network data needs to be converted into legal network data which can be identified by the vehicle-mounted computer B, so that the vehicle-mounted computer B can be used in corresponding service software. In addition, if the acquired data is control command data, the data is converted into a control command which can be recognized by the vehicle-mounted computer B through the data conversion device, and the converted control command is sent to the vehicle-mounted computer B through the USB virtual serial port so as to control the vehicle-mounted computer B to make a corresponding response to the received control command.
In one embodiment, in order to output the display information of the on-board computer B to the on-board computer a, display activation software is installed on the on-board computer a, and the display activation software is used for outputting a display picture corresponding to a display signal of the on-board computer B to the on-board computer a for displaying on a touch display screen mounted on the on-board computer a without data conversion by a data conversion device. The display signal may be HDMI, mipi, DVI, VGA, LVDS, DP, or the like. Specifically, if the display signal of the on-board computer B is to be output to the on-board computer a for display, first, the signal input, such as enabling of the HDMI _ IN, needs to be turned on IN the display activation software to simulate the on-board computer a as an input display device, and then, after the display signal is output to the first device by the on-board computer B as the input signal of the first device, the display can be directly performed from the signal input end of the HDMIIN, instead of displaying the display signal of the on-board computer a itself.
However, on the premise that the on-board computer a and the on-board computer B do not establish a network connection, the on-board computer B does not know when the transmission of the display signal can be started. Therefore, before the on-board computer B transmits the display signal to the on-board computer a, in addition to running the display activation software on the on-board computer a, the on-board computer a needs to send a signal synchronization command to the on-board computer B through the data conversion device to inform the on-board computer B that the display signal can be transmitted. Therefore, in an embodiment, after monitoring the data received by the wired serial port and the network port, it is determined whether the wired serial port or the network port receives the signal synchronization command data, and if so, the signal synchronization command data is converted by the data conversion device to obtain a converted signal synchronization command, and then the signal synchronization command is sent to the vehicle-mounted computer B through the USB virtual serial port. After receiving the display signal sharing command, the vehicle-mounted computer B directly transmits the display signal to the vehicle-mounted computer A so as to display the display signal through a touch display screen of the vehicle-mounted computer A; and then after receiving the signal synchronization command and realizing synchronization, judging whether the wired serial port or the network port receives touch data or not so as to control the vehicle-mounted computer B to make a response corresponding to the touch data when receiving the touch data. And synchronizing the display signal to the vehicle-mounted computer A in real time after responding.
In the embodiment, data received by a wired serial port and a network port are acquired, the data type of the acquired data is determined according to identification information of the acquired data, corresponding data conversion is performed on the acquired data of different types according to the determined data type, if the acquired data is touch data, the acquired data is converted into mouse data and is sent to second equipment, the second equipment responds to the USB mouse data, and a display signal after the response is fed back to first equipment for display; and if the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment. By determining the data type of the acquired data and adopting different modes for data conversion, the problems that the display signal of the second equipment cannot be normally output to the first equipment for display due to data conversion errors and data transmission from the first equipment to the second equipment cannot be finished due to the fact that the data types of different data cannot be confirmed are avoided, and accuracy and effectiveness of data conversion are improved.
Referring to fig. 5, fig. 5 is a flowchart of a data conversion method according to a third embodiment of the present invention, in this embodiment, the data conversion method includes the following steps:
step S21: acquiring USB virtual serial port data received by the USB virtual serial port;
step S22: if the USB virtual serial port data is control command data, converting the USB virtual serial port data into a control command, and transmitting the control command to the first equipment through a wired serial port or a network port so as to control the first equipment to make a corresponding response to the received control command;
step S23: and if the USB virtual serial port data is configuration command data, converting the USB virtual serial port data into a configuration command so as to execute corresponding configuration operation according to the converted configuration command.
In this embodiment, it is also assumed that the first device and the second device are both vehicle-mounted computers, and the first device is denoted as a vehicle-mounted computer a, and the second device is denoted as a vehicle-mounted computer B. Because the data conversion device is in communication connection with the vehicle-mounted computer A through the wired serial port, the network port and the like, and is in communication connection with the vehicle-mounted computer B through the USB virtual serial port data, the data from the vehicle-mounted computer A to the vehicle-mounted computer B is directionally transmitted, the display signal of the vehicle-mounted computer B is output on the touch display screen of the vehicle-mounted computer A, the USB virtual serial port data of the USB virtual serial port is monitored besides the data received by the wired serial port and the network port, and parameter configuration is carried out or control commands are issued to the vehicle-mounted computer A according to the USB virtual serial port received by the USB virtual serial port. Therefore, while monitoring the data received by the wired serial port and the network port, it is also necessary to monitor the USB virtual serial port data received by the USB virtual serial port. And when monitoring USB virtual serial port data received by the USB virtual serial port, acquiring the USB virtual serial port data, and determining the data type of the USB virtual serial port data, wherein the data type at least comprises control command data and configuration command data.
Specifically, since the in-vehicle computer a is not allowed to be directly interconnected with the in-vehicle computer B via the network, the in-vehicle computer B needs to send some control command data to the in-vehicle computer a via the data conversion device during data transmission. For example, before the network data is sent from the on-board computer a to the on-board computer B, the on-board computer B needs to send a control command to the on-board computer a through the data conversion device to inform the on-board computer a of which data is requested by the on-board computer B, and then control the on-board computer a to transmit the requested data of the on-board computer B to the on-board computer B through the data conversion device according to the control command; in addition, in the process of transmitting the network data from the on-board computer a to the on-board computer B, the on-board computer B needs to send a control command to the on-board computer a through the data conversion device to inform the on-board computer a when the display switching back to the display interface of the on-board computer a can be terminated, so as to control the on-board computer a to switch back to the display interface of the on-board computer a according to the control command. Therefore, if the acquired USB virtual serial port data is control command data, the control command data needs to be converted into a control command corresponding to the vehicle-mounted computer a, and the control command data is transmitted to the vehicle-mounted computer a through the wired serial port or the network port, so that the vehicle-mounted computer a responds correspondingly according to the received control command when receiving the control command.
In another embodiment, since the vehicle-mounted computer B is used in a private network such as a public security private network, some configuration commands need to be sent to the data conversion device through the USB virtual serial port, so as to prevent the sensitive data of the vehicle-mounted computer B from being leaked to the vehicle-mounted computer a or prevent some network data downloaded by the vehicle-mounted computer a from carrying viruses and being transmitted to the vehicle-mounted computer B, which may cause safety hazards such as information leakage and system intrusion. Therefore, when the USB virtual serial port data is the configuration command data, the data conversion device may parse the received configuration command data to convert the configuration command data into a configuration command that can be recognized by the data conversion device, and then recognize the configuration command to execute a corresponding configuration operation according to the recognized configuration command. The configuration operation may specifically be policy rule configuration of a firewall, or may also be performance parameter configuration of a data conversion device, and the like.
In the embodiment, in the process of realizing the directional transmission of data from the first device to the second device and outputting the display signal of the second device on the touch display screen of the first device, the data received by the wired serial port and the network port and the USB virtual serial port data received by the USB virtual serial port are obtained, so that the vehicle-mounted computer A and the vehicle-mounted computer B can be more effectively communicated, the risks of data leakage, system intrusion and the like caused by the fact that the configuration operation cannot be performed according to the obtained USB virtual serial port data are avoided, and the safety of data transmission is improved; and the data conversion device can avoid that the USB virtual serial port data cannot be transmitted to the first equipment, so that the first equipment cannot make corresponding response, and the data requested by the second equipment cannot be transmitted to the second equipment, so that the first equipment and the second equipment can effectively communicate, and the effectiveness of data transmission is improved.
In addition, an embodiment of the present invention further provides a data conversion apparatus, where the data conversion apparatus includes a memory, a processor, and a data conversion program stored on the processor and executable on the processor, and the processor implements the steps of the data conversion method when executing the data conversion program.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a data conversion program is stored, and when executed by a processor, the data conversion program implements the steps of the data conversion method described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a television, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A data conversion method is used for realizing the directional transmission of data from a first device to a second device and outputting a display signal of the second device on a touch display screen of the first device, wherein the first device is provided with the touch display screen, and the second device is not provided with the touch display screen, and the data conversion method comprises the following steps:
acquiring data received by a wired serial port and a network port;
if the acquired data is touch data, converting the acquired data into USB mouse data and sending the USB mouse data to the second equipment so that the second equipment can respond to the USB mouse data, and feeding back a display signal after response to the first equipment for display;
and if the acquired data is network data, converting the acquired data into USB communication data and sending the USB communication data to the second equipment so as to finish network data transmission from the first equipment to the second equipment.
2. The data conversion method according to claim 1, wherein the step of converting the acquired data into USB mouse data and transmitting the USB mouse data to the second device comprises:
converting the acquired data into mouse data calculated in absolute coordinates;
and triggering a USB mouse event based on the converted mouse data and sending the mouse data to the second equipment so that the second equipment can trigger operation response at the position corresponding to the mouse data.
3. The data conversion method according to claim 1, wherein the step of converting the acquired data into USB communication data and sending the USB communication data to the second device comprises:
converting the acquired data into USB communication data;
and triggering the USB communication equipment based on the converted USB communication data, and transmitting the USB communication data to the second equipment so that the second equipment can use the received USB communication data for corresponding service software.
4. The data conversion method of claim 1, wherein the step of obtaining the data received by the wired serial port and the network port comprises, after the step of obtaining the data received by the wired serial port and the network port:
and determining the data type of the acquired data according to the identification information of the acquired data, so as to perform corresponding data conversion on different types of data according to the determined data type.
5. The data conversion method of claim 4, wherein after the step of determining the data type of the acquired data based on the identification information of the acquired data, the method further comprises:
if the data type is control command data, converting the acquired data into a control command;
and transmitting the control command to the second equipment through the USB virtual serial port so as to control the second equipment to make a corresponding response to the received control command.
6. The data conversion method according to claim 5, wherein before the step of converting the acquired data into USB mouse data and sending the USB mouse data to the second device if the acquired data is touch data, the method comprises:
judging whether the wired serial port or the network port receives signal synchronization command data or not;
and if the touch control data is received, converting the signal synchronization command data into a signal synchronization command, and sending the signal synchronization command to the second equipment through the USB virtual serial port, so that after the second equipment synchronizes the display signal to the first equipment, the second equipment is controlled to make a corresponding response based on the touch control data received by the wired serial port or the network port.
7. The data conversion method of claim 1, wherein the method further comprises:
acquiring USB virtual serial port data received by the USB virtual serial port;
and if the USB virtual serial port data is control command data, converting the USB virtual serial port data into a control command, and transmitting the control command to the first equipment through the wired serial port or the network port so as to control the first equipment to make a corresponding response to the received control command.
8. The data conversion method according to claim 7, wherein after the step of obtaining the USB virtual serial port data received by the USB virtual serial port, the method further comprises:
and if the USB virtual serial port data is configuration command data, converting the USB virtual serial port data into a configuration command so as to execute corresponding configuration operation according to the converted configuration command.
9. A data conversion apparatus, characterized in that the data conversion apparatus comprises a memory, a processor and a data conversion program stored on the memory and executable on the processor, the processor implementing the steps of the data conversion method according to any one of claims 1 to 8 when executing the data conversion program.
10. A computer-readable storage medium, having stored thereon a data conversion program which, when executed by a processor, implements the steps of the data conversion method according to any one of claims 1 to 8.
CN202010466043.4A 2020-05-27 2020-05-27 Data conversion method, device and storage medium Active CN111694778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010466043.4A CN111694778B (en) 2020-05-27 2020-05-27 Data conversion method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010466043.4A CN111694778B (en) 2020-05-27 2020-05-27 Data conversion method, device and storage medium

Publications (2)

Publication Number Publication Date
CN111694778A true CN111694778A (en) 2020-09-22
CN111694778B CN111694778B (en) 2023-05-26

Family

ID=72478653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010466043.4A Active CN111694778B (en) 2020-05-27 2020-05-27 Data conversion method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111694778B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306268A (en) * 2020-10-30 2021-02-02 广州朗国电子科技有限公司 Mouse switching method and device, storage medium and conference all-in-one machine equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1856140A (en) * 2005-04-18 2006-11-01 华为技术有限公司 Mobile telephone terminal as computer mouse and its working method
CN102622157A (en) * 2011-01-27 2012-08-01 西安龙飞软件有限公司 Method for achieving handwriting input of computer equipment by using mobile phone touch screen
CN204028816U (en) * 2014-05-16 2014-12-17 深圳市国通世纪科技开发有限公司 A kind of intelligent terminal for USB mouse and USB keyboard
CN109471667A (en) * 2018-11-16 2019-03-15 郑州大学 Computer and mobile phones integrated intelligent interactive method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1856140A (en) * 2005-04-18 2006-11-01 华为技术有限公司 Mobile telephone terminal as computer mouse and its working method
CN102622157A (en) * 2011-01-27 2012-08-01 西安龙飞软件有限公司 Method for achieving handwriting input of computer equipment by using mobile phone touch screen
CN204028816U (en) * 2014-05-16 2014-12-17 深圳市国通世纪科技开发有限公司 A kind of intelligent terminal for USB mouse and USB keyboard
CN109471667A (en) * 2018-11-16 2019-03-15 郑州大学 Computer and mobile phones integrated intelligent interactive method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306268A (en) * 2020-10-30 2021-02-02 广州朗国电子科技有限公司 Mouse switching method and device, storage medium and conference all-in-one machine equipment
CN112306268B (en) * 2020-10-30 2024-04-09 广州朗国电子科技股份有限公司 Mouse switching method and device, storage medium and conference integrated machine equipment

Also Published As

Publication number Publication date
CN111694778B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
KR101687932B1 (en) In-vehicle access of mobile device functions
US8943438B2 (en) Vehicle-mounted device having portable-device detection capability
KR101736990B1 (en) Apparatus and method for controlling mobile device engaging with vehicle
US9772919B2 (en) Automation of D-bus communication testing for bluetooth profiles
CN105511945B (en) Mobile device and matching method of application program of auxiliary device
JP5945916B2 (en) Information processing system, information processing method, portable terminal, server, control method and control program thereof
EP2778928B1 (en) D-bus communicaiton testing for bluetooth profiles
KR101984874B1 (en) Connecting system and method for user device and external device
US9811304B2 (en) Method and apparatus of capturing a screen image of a remotely managed machine
JP2018518727A (en) Access to a secure network using a streaming device
CN105975350B (en) Method and apparatus for integrating vehicle applications
JP2017531339A (en) Method and apparatus for interconnecting smart terminals and in-vehicle terminals
CN111694778B (en) Data conversion method, device and storage medium
CN106878467B (en) Method for remotely controlling equipment and remote control system
EP2820558B1 (en) Remote user interface providing apparatus and method
CN115550498B (en) Screen projection method, device, equipment and storage medium
KR101368966B1 (en) Portable Terminal and IVI for Interworking Application, Method thereof for Operating Application
JP4649584B2 (en) Peripheral device driver installation system
KR20210042063A (en) A method, a device, equipment and a storage medium for locating terminal
CN111193717A (en) FTP black and white list control method and device and electronic equipment
CN112217872A (en) Control method, control device and computer readable storage medium
CN112714272A (en) Inter-device control method, terminal, and computer-readable storage medium
CN111263218A (en) Method and system for realizing synchronous interaction of multiple devices
CN111818148B (en) Processing method, system, device and storage medium for vehicle-mounted event
EP3550864B1 (en) Vehicle-mounted electronic device for performing double authentication

Legal Events

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