WO2019174307A1 - 数据传输方法、装置、终端以及存储介质 - Google Patents

数据传输方法、装置、终端以及存储介质 Download PDF

Info

Publication number
WO2019174307A1
WO2019174307A1 PCT/CN2018/118087 CN2018118087W WO2019174307A1 WO 2019174307 A1 WO2019174307 A1 WO 2019174307A1 CN 2018118087 W CN2018118087 W CN 2018118087W WO 2019174307 A1 WO2019174307 A1 WO 2019174307A1
Authority
WO
WIPO (PCT)
Prior art keywords
control chip
descriptor
firmware upgrade
chip
module
Prior art date
Application number
PCT/CN2018/118087
Other languages
English (en)
French (fr)
Inventor
杨起源
Original Assignee
广州视源电子科技股份有限公司
广州视睿电子科技有限公司
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 广州视源电子科技股份有限公司, 广州视睿电子科技有限公司 filed Critical 广州视源电子科技股份有限公司
Publication of WO2019174307A1 publication Critical patent/WO2019174307A1/zh

Links

Images

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/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Definitions

  • the embodiments of the present application relate to communication technologies, for example, to a data transmission method, apparatus, terminal, and storage medium.
  • FIG. 1A is a schematic structural diagram of a touch device and other components on a smart terminal in the related art.
  • the touch device and other components of the smart terminal have a connection structure as shown in FIG. 1A.
  • the control chip in the smart terminal is directly connected to the touch device through the first universal serial bus (USB) interface 11, and is combined with the USB switch 13 and the smart terminal through the second USB interface 12.
  • the main device module is connected to the main device module.
  • the main device module can be a personal computer (PC) device module, an Android device Android module, or an external device module.
  • the smart terminal can embody different functions through different main device modules. Based on the above connection structure, data interaction of the smart device master device module of the touch device can be implemented.
  • the communication protocol A followed by the data interaction is customized by the touch device manufacturer; and when the control chip interacts with the main device module of the smart terminal.
  • the communication protocol B that is followed is custom formed by the manufacturer of the smart terminal.
  • the firmware of the touch device disposed thereon needs to be upgraded to improve the compatibility between the touch device and other modules in the smart terminal, thereby improving the use experience of the smart terminal.
  • the firmware upgrade package stored in the main device module needs to be sent to the touch device.
  • the technician proposes the following improvement methods: 1) One is to use software development to ensure the accuracy of data transmission, but this method requires detailed communication protocol A that is followed between the touch device and the control chip.
  • Figure 1B It is a structural connection diagram in which the firmware of the touch device is improved after the improvement in the related art, and the transmission protocol in the firmware upgrade is unified by modifying the hardware framework in FIG. 1B, but this method needs to add an extra between the touch device and the control chip.
  • the second USB switch 14 directly connects the touch device to the PC module, the Android module or the external device module that stores the touch device firmware upgrade package, which additionally adds hardware use cost.
  • the embodiment of the present application provides a data transmission method, device, terminal, and storage medium, so that the firmware upgrade of the touch device can be realized without complicated software development or modifying the hardware framework, thereby reducing the development and maintenance difficulty of the developer and saving The hardware usage cost of the smart terminal.
  • the embodiment of the present application provides a data transmission method, where the method includes: after the master device module detects that a port value of a listening port in the control chip is changed, acquiring a current universal serial interface USB description corresponding to the control chip.
  • the master device module determines a chip communication port that communicates with the control chip according to the current USB descriptor, and sends a firmware upgrade package to the control chip based on the chip communication port; the control chip is The touch device communication port corresponding to the chip communication port forwards the firmware upgrade package, so that the touch device performs firmware upgrade based on the firmware upgrade package.
  • the embodiment of the present application further provides a data transmission device, where the device includes: an acquiring module, configured to acquire, after the master device module detects that a port value of a listening port in the control chip is changed, acquiring a control chip corresponding to the control chip a current universal serial interface USB descriptor; a transmitting module configured to determine a chip communication port in communication with the control chip according to the current USB descriptor, and send a firmware upgrade package to the control chip based on the chip communication port And a forwarding module configured to forward the firmware upgrade package to a touch device communication port corresponding to the chip communication port to cause the touch device to perform firmware upgrade based on the firmware upgrade package.
  • an acquiring module configured to acquire, after the master device module detects that a port value of a listening port in the control chip is changed, acquiring a control chip corresponding to the control chip a current universal serial interface USB descriptor
  • a transmitting module configured to determine a chip communication port in communication with the control chip according to the current USB descriptor, and send
  • the embodiment of the present application further provides a terminal, where the terminal includes an input device, and further includes: at least one processor; a storage device configured to store at least one program; the at least one program is processed by the at least one The device is executed to enable the at least one processor to implement the data transmission method provided by the embodiment of the present application.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer program is stored, and when the program is executed by the processor, the data transmission method provided by the embodiment of the present application is implemented.
  • FIG. 1A is a schematic structural diagram of a touch device and other components on a smart terminal in the related art
  • FIG. 1B is a schematic diagram of a structure connection in which the firmware of the touch device is improved after being improved in the related art
  • FIG. 2 is a schematic flowchart of a data transmission method in Embodiment 1 of the present application.
  • Embodiment 3 is a schematic flowchart of a data transmission method in Embodiment 2 of the present application.
  • FIG. 4 is a schematic structural diagram of a data transmission apparatus in Embodiment 3 of the present application.
  • FIG. 5 is a schematic structural diagram of a terminal in Embodiment 4 of the present application.
  • Embodiment 2 is a flowchart of a data transmission method according to Embodiment 1 of the present application.
  • the present embodiment is applicable to a firmware upgrade of a touch device in an intelligent terminal by using a firmware upgrade package stored in a master device module in an intelligent terminal.
  • the method can be performed by a data transmission device implemented by at least one of software and hardware and configured on the smart terminal.
  • the data transmission method shown in FIG. 2 includes steps S101 to S103.
  • step S101 after the master device module detects that the port value of the listening port in the control chip is changed, the current USB descriptor corresponding to the control chip is acquired.
  • the control chip and the touch device are physically connected through the first USB interface 11.
  • the control chip can be used as a host in the USB master-slave structure
  • the touch device is used as a device in the USB master-slave structure.
  • the control chip and the touch device are connected for the first time, the control chip enumerates the touch device.
  • the USB descriptor is stored in the control chip.
  • control chip and the main device module are physically connected through the second USB interface 12 and the USB switch 13 , wherein the USB switch 13 serves as a multi-channel selection switch, and is connected to the main device module through control of the control chip.
  • the master device module can be used as a host in the USB master-slave structure, and the control chip functions as a device of the USB master-slave structure.
  • the USB descriptor of the control chip itself is obtained by default, but the subsequent main device module can still actively monitor the port value of the listening port on the control chip to determine the listening port. Whether the value of the port changes, and when the port value of the listening port changes, the master device acquires the data information in the storage space corresponding to the listening port in the control chip. In this embodiment, the master device module can be based on the data information.
  • the current USB descriptor of the control chip is obtained directly or indirectly, wherein the current USB is described as a USB descriptor equivalent to a touch device stored in the control chip.
  • step S102 the master device module determines a chip communication port that communicates with the control chip according to the current USB descriptor, and sends a firmware upgrade package to the control chip based on the chip communication port.
  • a firmware upgrade package of the touch device provided by the touch device vendor is stored in the main device module for firmware upgrade of the touch device.
  • the chip communication port can be specifically understood as a communication port that needs to be based on the firmware upgrade packet transmission of the main device module to the control chip, and the chip communication port can be specifically determined based on the current USB descriptor obtained by the main device module. Since the current USB descriptor is actually a USB descriptor of the touch device, the control chip can be regarded as a virtual touch device passively receiving the firmware upgrade package sent by the master device module.
  • the master device module enumerates at least a standard descriptor, a Human Interface Devices (HID) device descriptor, and an HID report descriptor in the USB descriptor of the touch device stored in the control chip.
  • the standard descriptor includes a configuration descriptor that describes multiple configuration information of the touch device, an interface descriptor corresponding to multiple interfaces included in each of the multiple configuration information, and multiple interfaces included in each of the multiple interfaces.
  • step S103 the control chip forwards the firmware upgrade package to a touch device communication port corresponding to the chip communication port, so that the touch device performs firmware upgrade based on the firmware upgrade package.
  • the chip communication port determined by the master device module according to the current USB descriptor is substantially equivalent to the touch device directly.
  • the communication port required for the main device module to transmit data is passively received.
  • the control chip is equivalent to a virtual touch between the main device module and the touch device.
  • the control chip itself can transfer the firmware upgrade package to the touch device through the touch device communication port without any processing on the received firmware upgrade package, so that the touch device can perform firmware upgrade based on the firmware upgrade package, wherein
  • the touch device communication port is substantially the same as the chip communication port, but is specifically disposed on the touch device, and together with the chip communication port disposed on the control chip, constitutes a data transmission channel for performing firmware upgrade packet transmission.
  • the master device module monitors that the port value of the listening port in the control chip is changed, the current universal serial interface USB descriptor corresponding to the control chip is obtained, and the current USB descriptor is determined according to the current USB descriptor.
  • the main device module can accurately transmit the firmware upgrade package to the touch device without complicated software development or modifying the hardware framework, thereby ensuring that the touch device can effectively perform the firmware upgrade. To reduce the development and maintenance difficulty of developers. About intelligent terminal hardware cost.
  • the master device module may determine according to the current USB descriptor. a chip communication port in communication with the control chip, and transmitting a firmware upgrade package to the control chip based on the chip communication port, further refining to: the master device module determining to the control according to the standard descriptor Transmitting, by the chip, a chip communication port required by the firmware upgrade package; the master device module selects a report descriptor corresponding to the target report identification code in the HID report descriptor, as a target data according to the firmware upgrade package. a transport format; when the device identifier in the HID device descriptor matches a standard identifier of the touch device, the master device module transmits the firmware to the chip communication port in accordance with the target data transmission format Upgrade package.”
  • the technical solution of the embodiment of the present application further adds that when the control chip receives the firmware upgrade command generated by the trigger, the communication control information saved in the set storage space is updated, and the device storage space is adjusted.
  • the technical solution of the port value corresponding to the listening port is to further describe the operation of changing the port value of the listening port of the control chip.
  • the technical solution of the embodiment of the present application further refines the “acquiring the current USB descriptor corresponding to the control chip” to “send a reset request to the control chip, and receives the control chip. After the external interrupt signal is fed back, the device information acquisition instruction is sent to the control chip; and the current USB descriptor that the control chip feeds back based on the device information acquisition instruction is acquired.
  • the data transmission method shown in FIG. 3 includes steps S201 to S208.
  • step S201 when receiving the firmware upgrade command generated by the trigger, the control chip updates the communication control information stored in the set storage space, and adjusts the port value of the listening port corresponding to the device storage space.
  • the control chip receives a firmware upgrade instruction for firmware upgrade of the touch device formed by the user's trigger operation. After receiving the firmware upgrade command, the control chip updates the communication control information saved in the storage space, and adjusts the port value of the listening port corresponding to the storage space of the device.
  • the storage space is set for storing communication control information, and the main device module directly or indirectly acquires the current USB descriptor in the control chip through the setting storage space.
  • control chip communication control information determines a change in the port value of the monitoring port corresponding to the storage space of the device in the control chip.
  • the master device module determines whether the communication control information in the control chip has changed by monitoring the port value of the listening port corresponding to the storage space of the device in the control chip. That is to say, if the communication control information stored in the storage space is changed, correspondingly, the port value of the listening port corresponding to the storage space of the device in the control chip also changes, and the main device module will The port value of the listening port corresponding to the device storage space of the control chip is used as a basis for obtaining the current USB descriptor in the control chip.
  • the communication control information stored in the storage space may be a USB descriptor of a plurality of devices in the USB master-slave structure stored in the control chip when the host structure in the USB master-slave structure is a control chip; It can be a local storage address that stores multiple USB descriptors.
  • the device identification information in the plurality of USB descriptors included in the USB descriptor sequence table of the USB descriptor stored in the control chip is acquired; when the communication control information stored in the storage space is set to a USB description And searching for target device identification information matching the setting identification information from the plurality of device identification information, and updating the target USB descriptor including the target device identification information as the communication control information to the setting In the storage space; or, when the communication control information stored in the storage space is set as the local storage address of the USB descriptor, the local storage address of the target USB descriptor including the target device identification information is updated as communication control information to The setting is in the storage space.
  • the devices corresponding to the control chip are touch devices, other devices 1, other devices 3, ..., other devices n, then the corresponding control chips It can be understood that there is a USB descriptor containing a touch device, a USB descriptor of n other devices, and a USB descriptor sequence table formed by controlling the USB descriptor of the chip itself.
  • Each USB descriptor in the list includes a device identification information; when the control chip receives the firmware upgrade instruction, it needs to find and set identification information from multiple device identification information included in the USB descriptor sequence table (ie, Touching device identification information) corresponding device identification information as target device identification information, and updating the target USB descriptor including the target device identification information as communication control information into the set storage space; or storing the target USB descriptor
  • the local storage address is updated as communication control information into the set storage space.
  • the firmware upgrade instruction is one of: a first upgrade instruction generated by a user touching a touch interface of the touch device; and a second trigger generated by the user triggering an upgrade control switch key in the main device module
  • the upgrade instruction; or the identifier of the mode switch identifier in the logic implementation of the control chip code is a third upgrade instruction corresponding to the upgrade identifier value.
  • the master device module After the master device module detects that the port value of the listening port in the control chip is changed, the master device module sends a reset request to the control chip, and after receiving the external interrupt signal fed back by the control chip, the control chip is sent to the control chip. Send device information acquisition command.
  • step S203 the current USB descriptor that is fed back by the control chip based on the device information acquisition instruction is acquired; wherein the current USB descriptor is determined by the communication control information.
  • step S202 and step S203 after the master device module detects that the port value of the listening port in the control chip changes, it sends a reset request to the control chip. After the control chip receives the reset request, the control chip feeds back an external interrupt signal to the master device module. After receiving the external interrupt signal, the master device module sends a device information acquisition instruction for acquiring a USB descriptor of the control chip to the control chip.
  • the master device module After the control chip receives the device information acquisition instruction, the master device module obtains the communication control information in the device storage space, and when the communication control information is a USB descriptor, the USB descriptor (ie, the target USB descriptor) As the current USB descriptor; when the communication control information is the local storage address of the USB descriptor, the USB descriptor (ie, the target USB descriptor) stored in the local storage address is acquired as the current USB descriptor.
  • the communication control information is a USB descriptor
  • the USB descriptor ie, the target USB descriptor
  • the USB descriptor ie, the target USB descriptor
  • the current USB descriptor includes at least: a standard descriptor, a human interface device HID report descriptor, and an HID device descriptor.
  • step S204 the master device module determines, according to the standard descriptor, a chip communication port required to transmit the firmware upgrade package to the control chip.
  • a configuration descriptor corresponding to the touch device, an interface descriptor corresponding to each of the plurality of interfaces included in the plurality of configuration information, and each of the plurality of ports included in each interface are stored in the standard descriptor.
  • the corresponding port descriptor, through the port descriptor in the standard descriptor, the master device module determines the chip communication port that transmits the firmware upgrade packet to the control chip.
  • step S205 the master device module selects a report descriptor corresponding to the target report identification code in the HID report descriptor as a target data transmission format according to the firmware upgrade package.
  • the HID report descriptor includes a report descriptor corresponding to a plurality of different function operations, and the master device module determines the control descriptor by searching for a report descriptor corresponding to the target report identifier code included in the HID report descriptor.
  • step S206 it is determined whether the device identifier in the HID device descriptor matches the standard identifier of the touch device; if the device identifier in the HID device descriptor matches the standard identifier of the touch device, Step S207 is performed.
  • a device identifier identifying the device type is included in the HID device descriptor.
  • the device identifier in the HID device descriptor is the same as the standard identifier of the touch device, it is determined that the current USB descriptor is a USB descriptor of the touch device, and the control chip can receive the master device transmission as a virtual touch device.
  • Firmware upgrade package is included in the HID device descriptor.
  • step S207 the master device module transmits the firmware upgrade package to the chip communication port according to the target data transmission format.
  • step S208 the control chip forwards the firmware upgrade package to a touch device communication port corresponding to the chip communication port, so that the touch device performs firmware upgrade based on the firmware upgrade package.
  • the embodiment of the present application further refines the operation of the main device module acquiring the current USB descriptor in the control chip and sending the firmware upgrade package to the control chip, and adding the operation of changing the port value of the monitoring port of the control chip, thereby further improving the data transmission.
  • the technical solution of the method avoids the situation that the data exchange of multiple devices adopts different protocols in the process of transmitting the firmware upgrade package of the touch device, and the main device module cannot accurately transmit the firmware upgrade package to the touch device, thereby realizing the need without complicated
  • the main device module can accurately transmit the firmware upgrade package to the touch device, thereby reducing the development and maintenance difficulty of the developer and ensuring the intelligent terminal when the touch device can effectively perform the firmware upgrade.
  • Hardware usage costs are examples of the firmware upgrade package to the touch device, thereby reducing the development and maintenance difficulty of the developer and ensuring the intelligent terminal when the touch device can effectively perform the firmware upgrade.
  • Embodiment 4 is a schematic structural diagram of a data transmission apparatus according to Embodiment 3 of the present application.
  • the embodiment is applicable to a firmware upgrade of a touch device in an intelligent terminal by using a firmware upgrade package stored in a main device module in an intelligent terminal.
  • the device comprises: an obtaining module 301, a sending module 302 and a forwarding module 303.
  • the obtaining module 301 is configured to acquire a current universal serial interface USB descriptor corresponding to the control chip after the master device module detects that the port value of the listening port in the control chip is changed.
  • the sending module 302 is configured to determine, according to the current USB descriptor, a chip communication port that communicates with the control chip, and send a firmware upgrade package to the control chip based on the chip communication port.
  • the forwarding module 303 is configured to forward the firmware upgrade package to a touch device communication port corresponding to the chip communication port, so that the touch device performs firmware upgrade based on the firmware upgrade package.
  • the obtaining module 301 acquires a current USB descriptor corresponding to the control chip; and the sending module 302 determines and controls according to the current USB descriptor.
  • the main device module avoids the situation that the data exchange of multiple devices is different in the process of transmitting the firmware upgrade package of the touch device, and the main device module cannot accurately transmit the firmware upgrade package to the touch device, thereby realizing the need for complicated
  • the main device module can accurately transmit the firmware upgrade package to the touch device, thereby reducing the development and maintenance difficulty of the developer and saving the hardware of the intelligent terminal while ensuring that the touch device can effectively perform the firmware upgrade. The cost.
  • the current USB descriptor includes: a standard descriptor, a human interface device HID report descriptor, and an HID device descriptor.
  • the sending module 302 includes: a determining unit, configured to determine, according to the standard descriptor, a chip communication port required to transmit the firmware upgrade package to the control chip; and the selecting unit is configured to select the HID report description a report descriptor corresponding to the target report identification code as a target data transmission format according to the firmware upgrade package; a sending unit configured to be the device identifier in the HID device descriptor and the touch device When the standard identifiers match, the firmware upgrade package is transmitted to the chip communication port in accordance with the target data transmission format.
  • the apparatus further includes: an adjustment module, configured to: when the control chip receives the firmware upgrade instruction generated by the trigger, update the communication control information saved in the set storage space, and adjust the device storage The port value of the listening port corresponding to the space.
  • the adjusting module includes: a first acquiring unit, configured to acquire device identification information of each USB descriptor in the USB descriptor sequence table stored in the control chip.
  • An update unit configured to search for target device identification information matching the set identification information from all the acquired device identification information, and update the target USB descriptor including the target device identification information as communication control information to the Or setting the storage space; or updating the local storage address of the target USB descriptor including the target device identification information as the communication control information into the set storage space.
  • the firmware upgrade instruction is one of: a first upgrade instruction generated by a user touching a touch interface of the touch device; and a user triggering an upgrade control key in the main device module And generating a second upgrade instruction; or, the identifier of the mode switch identifier in the logic implementation of the control chip code is a third upgrade instruction corresponding to the upgrade identifier value.
  • the obtaining module 301 includes: a sending unit, configured to send a reset request to the control chip, and send the device to the control chip after receiving an external interrupt signal fed back by the control chip And a second acquisition unit configured to acquire the current USB descriptor that is fed back by the control chip based on the device information acquisition instruction; wherein the current USB descriptor is determined by the communication control information.
  • the data transmission device may be configured to provide a data transmission method according to any embodiment of the present application, and have a function module corresponding to the data transmission method.
  • the obtaining module 301 can be configured in the main device module; the sending module 302 can be configured in the main device module; and the forwarding module 303 can be configured in the control chip.
  • the adjustment module can be configured in the control chip.
  • FIG. 5 is a schematic structural diagram of a terminal according to Embodiment 4 of the present application.
  • the terminal provided in Embodiment 4 of the present application includes: an input device 401, a processor 402, and a storage device 403.
  • the input device 401 is configured to receive a firmware upgrade package of the touch device vendor.
  • the processor in the terminal can be at least one.
  • a processor 402 is taken as an example.
  • the input device 401 in the terminal may be connected to the processor 402 and the storage device 403 through a bus or other manner, and the processor 402 and the storage device 403 are also connected by a bus or other manner.
  • a bus connection is taken as an example.
  • the processor 402 in the terminal can monitor whether the port value of the listening port in the control chip changes; and can also obtain the current USB descriptor in the control chip; and can also determine the chip of the control chip according to the current USB descriptor.
  • the communication port; the firmware upgrade package can also be sent to the control chip based on the chip communication port.
  • the storage device 403 in the terminal is configured as a computer readable storage medium, and is configured to store at least one program, where the program may be a software program, a computer executable program, and a module, as in the data transmission method in the embodiment of the present application.
  • the program instructions/modules (for example, the modules in the data transmission device shown in FIG. 4 include: an acquisition module 301, a transmission module 302, and a forwarding module 303).
  • the processor 402 executes a plurality of functional applications and data processing of the terminal by executing software programs, instructions, and modules stored in the storage device 403, that is, implementing the data transmission method in the foregoing method embodiments.
  • the storage device 403 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the device, etc.
  • the firmware upgrade package various USB descriptors, USB descriptor sequence table, target report identification code, and standard identifier, etc.
  • storage device 403 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • storage device 403 can further include memory remotely located relative to processor 402, which can be connected to the device over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer program is stored, and when the program is executed by the data transmission device, the data transmission method provided in Embodiment 1 or Embodiment 2 of the present application is implemented, and the method includes After the master device module detects that the port value of the listening port in the control chip is changed, acquiring a current universal serial interface USB descriptor corresponding to the control chip; and determining, by the master device module, according to the current USB descriptor The chip communication port of the control chip communication, and sending a firmware upgrade package to the control chip based on the chip communication port; the control chip forwarding the firmware upgrade package to a touch device communication port corresponding to the chip communication port And causing the touch device to perform a firmware upgrade based on the firmware upgrade package.
  • the present application can be implemented by software and necessary general hardware, and can also be implemented by hardware.
  • the technical solution of the present application which is essential or contributes to the related art, may be embodied in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk of a computer, Read-Only Memory (ROM), Random Access Memory (RAM), Flash (FLASH), hard disk or optical disk, etc., including a number of instructions to make a computer device (can be a personal computer, The server, or network device, etc.) performs the methods described in each of the embodiments of the present application.
  • a computer readable storage medium such as a floppy disk of a computer, Read-Only Memory (ROM), Random Access Memory (RAM), Flash (FLASH), hard disk or optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

本申请实施例公开了数据传输方法、装置、终端以及存储介质。该方法包括:主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于控制芯片的当前USB描述符;主设备模块根据该当前USB描述符,确定与控制芯片通信的芯片通信端口,并基于该芯片通信端口向控制芯片发送固件升级包;控制芯片向与所述芯片通信端口对应的触摸设备通信端口转送该固件升级包,以使触摸设备基于该固件升级包进行固件升级。

Description

数据传输方法、装置、终端以及存储介质
本申请要求在2018年03月13日提交中国专利局、申请号为201810203509.4的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术,例如涉及数据传输方法、装置、终端以及存储介质。
背景技术
目前,很多智能终端上设置有触摸功能的触摸设备,由此简便、方便、自然的实现了人机交互,进而也扩大了具有触摸功能的智能终端的应用领域。图1A是相关技术中智能终端上触摸设备与其他组件的结构连接示意图,目前,触摸设备与智能终端的其他组件具有如图1A所示的连接结构。
参见图1A,智能终端中的控制芯片通过第一通用串行总线(Universal Serial Bus,USB)接口11与触摸设备直接相连,并通过第二USB接口12结合USB切换器13与智能终端上设置的主设备模块相连,其中,主设备模块可以是个人计算机(Personal Computer,PC)设备模块、安卓设备Android模块或者外接设备模块,智能终端可以通过所设置的不同主设备模块来体现不同的功能。基于上述连接结构,可实现触摸设备智能终端主设备模块的数据交互。一般地,触摸设备与控制芯片通过连接第一USB接口11连接后,数据交互时所遵循的通信协议A由触摸设备生产厂商自定义形成;而控制芯片与智能终端的主设备模块数据交互时所遵循的通信协议B由智能终端生产厂商自定义形成。
在对智能终端的开发和使用的过程中需要对设置其上的触摸设备进行固件升级,以提高触摸设备与智能终端中其他模块之间的兼容性,进而提升智能终端的使用体验度。相关技术中,对触摸设备固件升级时,需要将存放在主设备模块中的固件升级包发送给触摸设备,但由于上述连接结构中多个设备的数据交互采用不同的协议,主设备模块无法准确的向触摸设备传输固件升级包。针对上述情况,技术人员提出下述改进方法:1)一种是采用软件开发的方式保证 数据传输的准确性,但该种方式需要对触摸设备与控制芯片之间遵循的通信协议A进行详细的解析并且需要编写大量的代码实现逻辑对遵循不同通信协议的数据进行传输,以实现对触摸设备的二次开发进而实现对触摸设备的固件升级,增加了开发人员的开发维护难度;2)图1B是相关技术中改进后便于触摸设备进行固件升级的结构连接示意图,采用图1B中修改硬件框架的方式统一化固件升级时的传输协议,但该种方式需要在触摸设备与控制芯片之间添加额外第二USB切换器14,将触摸设备与存储触摸设备固件升级包的PC模块、Android模块或者外接设备模块直接相连,额外增添了硬件使用成本。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本申请实施例提供了数据传输方法、装置、终端以及存储介质,以无需进行复杂的软件开发或修改硬件框架的情况下即可实现对触摸设备的固件升级,减少开发人员的开发维护难度,节约智能终端的硬件使用成本。
第一方面,本申请实施例提供了数据传输方法,该方法包括:主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于所述控制芯片的当前通用串行接口USB描述符;所述主设备模块根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包;所述控制芯片向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。
第二方面,本申请实施例还提供了数据传输装置,该装置包括:获取模块,设置为在主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于所述控制芯片的当前通用串行接口USB描述符;发送模块,设置为根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包;转送模块,设置为向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。
第三方面,本申请实施例还提供了一种终端,该终端包括输入装置,还包 括:至少一个处理器;存储装置,设置为存储至少一个程序;所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现本申请实施例提供的数据传输方法。
第四方面,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本申请实施例提供的数据传输方法。
本申请在阅读并理解了附图和详细描述后,可以明白其他方面。
附图说明
图1A是相关技术中智能终端上触摸设备与其他组件的结构连接示意图;
图1B是相关技术中改进后便于触摸设备进行固件升级的结构连接示意图;
图2是本申请实施例一中的数据传输方法的流程示意图;
图3是本申请实施例二中的数据传输方法的流程示意图;
图4是本申请实施例三中的数据传输装置的结构示意图;
图5是本申请实施例四中的终端的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。
实施例一
图2为本申请实施例一提供的数据传输方法的流程图,本实施例可适用于采用智能终端中的主设备模块中存储的固件升级包对智能终端中的触摸设备进行固件升级的情况,该方法可以由数据传输装置来执行,该装置由软件和硬件中的至少一种来实现,并配置在智能终端上。如图2所示的数据传输方法,包括步骤S101至步骤S103。
在步骤S101中,主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于所述控制芯片的当前USB描述符。
基于本实施例提供的数据传输方法用于触摸设备的固件升级时,无需改变 触摸设备与智能终端中其他组件的连接结构,由此可认为,触摸设备与智能终端中其他组件的连接结构仍如图1A所示,控制芯片与触摸设备通过第一USB接口11物理连接。在本实施例中,可将控制芯片作为USB主从结构中的主机,触摸设备作为USB主从结构中的设备,当控制芯片与触摸设备在首次进行连接时,控制芯片会枚举触摸设备的USB描述符并存储在控制芯片中。
此外,控制芯片与主设备模块之间通过第二USB接口12以及USB切换器13进行物理连接,其中USB切换器13作为一个多通道的选择开关,通过控制芯片的控制连接主设备模块中的任一模块。本实施例可将主设备模块作为USB主从结构中的主机,控制芯片作为USB主从结构的设备。
可以理解的是,主设备模块与控制芯片首次连接后会默认获取控制芯片自身的USB描述符,但后续主设备模块仍可以主动监听控制芯片上的监听端口的端口值,来判定该监听端口的端口值是否发生变化,并在监听端口的端口值发生变化时,主设备模块获取控制芯片中与监听端口相对应设定存储空间中的数据信息,本实施例中主设备模块基于该数据信息可以直接或间接的获取控制芯片的当前USB描述符,其中,该当前USB描述为相当于控制芯片中存储的触摸设备的USB描述符。
在步骤S102中,所述主设备模块根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包。
在该步骤中,主设备模块中存储有触摸设备供应商提供的触摸设备的固件升级包,用以对触摸设备进行固件升级。所述芯片通信端口具体可理解为主设备模块向控制芯片进行固件升级包传输时需要依据的通信端口,该芯片通信端口具体可基于主设备模块获得的当前USB描述符确定。由于当前USB描述符实际为触摸设备的USB描述符,所以控制芯片此时可看作一个虚拟的触摸设备被动接收主设备模块发送的固件升级包。
在一实施例中,主设备模块枚举控制芯片中存储的触摸设备的USB描述符中至少包括标准描述符、人机接口设备(Human Interface Devices,HID)设备描述符以及HID报告描述符。其中,标准描述符包括对触摸设备的多种配置信息进行描述的配置描述符、多种配置信息中每一种包含的多个接口对应的接口描述符、多个接口中每一个包含的多个端口中每一个端口对应的端口描述符, 通过标准描述符中的端口描述符,主设备模块确定向控制芯片传输固件升级包的芯片通信端口。
在步骤S103中,所述控制芯片向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。
在本实施例中,由于主设备模块所获取的当前USB描述符具体可看做触摸设备的USB描述符,因此,主设备模块根据当前USB描述符确定的芯片通信端口实质上相当于触摸设备直接与主设备模块采用USB接口的方式进行物理连接时,被动接收主设备模块发送数据所需的通信端口,在该种情况下,控制芯片相当于主设备模块与触摸设备之间的一个虚拟的触摸设备,此时,控制芯片自身无需对接收的固件升级包进行任何处理,就可通过触摸设备通信端口向触摸设备转送该固件升级包,以使触摸设备能够基于该固件升级包进行固件升级,其中,该触摸设备通信端口实质上与芯片通信端口相同,但具体设置在触摸设备上,与设置在控制芯片上的芯片通信端口一同构成了进行固件升级包传输的数据传输通道。
本申请实施例通过主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于所述控制芯片的当前通用串行接口USB描述符;根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包;控制芯片向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级,采用上述技术方案避免了在传输触摸设备的固件升级包的过程中,多个设备的数据交互采用的协议不同导致主设备模块无法准确向触摸设备传输固件升级包的情况,实现了无需进行复杂的软件开发或修改硬件框架的情况下主设备模块能够准确的向触摸设备传输固件升级包,从而在保证触摸设备能够有效进行固件升级的情况下,减少开发人员的开发维护难度,节约智能终端的硬件使用成本。
实施例二
图3为本申请实施例二提供的数据传输方法的流程示意图,本实施例在上述多个实施例的技术方案的基础场,可以将“所述主设备模块根据所述当前USB 描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包”进一步细化为“所述主设备模块根据所述标准描述符,确定向所述控制芯片传输所述固件升级包所需的芯片通信端口;所述主设备模块选取所述HID报告描述符中与目标报告标识码对应的报告描述符,作为传输所述固件升级包所依照的目标数据传输格式;当所述HID设备描述符中的设备标识符与所述触摸设备的标准标识符相匹配时,所述主设备模块依照所述目标数据传输格式向所述芯片通信端口传输所述固件升级包”。
在一实施例中,本申请实施例的技术方案还追加了“所述控制芯片接收到触发生成的固件升级指令时,更新设定存储空间中保存的通信控制信息,并调整所述设备存储空间所对应监听端口的端口值”的技术方案,以进一步描述控制芯片的监听端口的端口值发生变化的操作。
在一实施例中,本申请实施例的技术方案将“获取对应于所述控制芯片的当前USB描述符”进一步细化为“向所述控制芯片发送复位请求,并在接收到所述控制芯片反馈的外部中断信号后,向所述控制芯片发送设备信息获取指令;获取所述控制芯片基于设备信息获取指令反馈的所述当前USB描述符”。
如图3所示的数据传输方法,包括步骤S201至步骤S208。
在步骤S201中,控制芯片接收到触发生成的固件升级指令时,更新设定存储空间中保存的通信控制信息,并调整所述设备存储空间所对应监听端口的端口值。
在该步骤中,控制芯片会接收到由于用户的触发操作而形成的对触摸设备进行固件升级的固件升级指令。在控制芯片接收到该固件升级指令后,更新设定存储空间中保存的通信控制信息,同时调整该设备存储空间所对应的监听端口的端口值。其中,设定存储空间用于存储通信控制信息,并且主设备模块通过该设定存储空间来直接或者间接获取控制芯片中的当前USB描述符。
需要说明的是,控制芯片通信控制信息确定控制芯片中与该设备存储空间相对应监听端口的端口值变化。而主设备模块通过监听控制芯片中与该设备存储空间相对应的监听端口的端口值来确定控制芯片中的通信控制信息是否发生了变化。也就是说,如果设定存储空间中保存的通信控制信息发生了变化,那么相应的,控制芯片中与该设备存储空间相对应的监听端口的端口值也会发生变化,此时主设备模块将会以控制芯片的设备存储空间所对应的监听端口的端 口值,作为后续获取控制芯片中的当前USB描述符的依据。其中,设定存储空间中存储的通信控制信息可以是,当USB主从结构中的主机结构为控制芯片时,在控制芯片中存储的USB主从结构中的多个设备的USB描述符;还可以是存储多个USB描述符的本地存储地址。
在一实施例中,通过获取控制芯片中所存储USB描述符的USB描述符序列表中包含的多个USB描述符中的设备标识信息;当设定存储空间中存储的通信控制信息为USB描述符时,从多个所述设备标识信息中查找与设定标识信息相匹配的目标设备标识信息,并将包含所述目标设备标识信息的目标USB描述符作为通信控制信息更新到所述设定存储空间中;或者,当设定存储空间中存储的通信控制信息为USB描述符的本地存储地址时,将包含所述目标设备标识信息的目标USB描述符的本地存储地址作为通信控制信息更新到所述设定存储空间中。
示例性地,假设以控制芯片作为USB主从结构的主机时,与控制芯片相对应的设备为触摸设备、其他设备1、其他设备3、...、其他设备n,那么相应的在控制芯片中可以理解为存在一个包含触摸设备的USB描述符、n个其他设备的USB描述符以及控制芯片自身的USB描述符形成的USB描述符序列表。该列表中每个USB描述符均包含一个设备标识信息;当控制芯片接收到固件升级指令后,需要从USB描述符序列表中包含的多个设备标识信息中查找与设定标识信息(也即触摸设备标识信息)相对应的设备标识信息作为目标设备标识信息,并将包含该目标设备标识信息的目标USB描述符作为通信控制信息更新到设定存储空间中;或者将存储该目标USB描述符的本地存储地址作为通信控制信息更新到设定存储空间中。
在一实施例中,所述固件升级指令为以下之一:用户触摸所述触摸设备的触摸界面而产生的第一升级指令;用户触发所述主设备模块中升级控制开关键而产生的第二升级指令;或者,所述控制芯片代码逻辑实现中的模式切换标识符的标识值为升级标识值时对应产生的第三升级指令。
在步骤S202、主设备模块监听到控制芯片中监听端口的端口值发生改变后,向所述控制芯片发送复位请求,并在接收到所述控制芯片反馈的外部中断信号后,向所述控制芯片发送设备信息获取指令。
在步骤S203中,获取所述控制芯片基于设备信息获取指令反馈的所述当前 USB描述符;其中,所述当前USB描述符通过所述通信控制信息确定。
在步骤S202和步骤S203中,主设备模块监听到控制芯片中监听端口的端口值发生变化后,向控制芯片发送复位请求。在控制芯片接收到该复位请求后,控制芯片会向主设备模块反馈外部中断信号。当主设备模块接收到该外部中断信号后,向控制芯片发送用于获取控制芯片的USB描述符的设备信息获取指令。
在控制芯片接收到该设备信息获取指令后,主设备模块会通过获取设备存储空间中的通信控制信息,当通信控制信息为USB描述符时,将该USB描述符(也即目标USB描述符)作为当前USB描述符;当通信控制信息为USB描述符的本地存储地址时,获取该本地存储地址中存储的USB描述符(也即目标USB描述符)作为当前USB描述符。
需要说明的是,其中当前USB描述符至少包括:标准描述符、人机接口设备HID报告描述符以及HID设备描述符。
在步骤S204中,所述主设备模块根据所述标准描述符,确定向所述控制芯片传输所述固件升级包所需的芯片通信端口。
在标准描述符中存储有与触摸设备相对应的配置描述符、多种配置信息中包含的多个接口中每个接口对应的接口描述符、每个接口中包含的多个端口中每个端口对应的端口描述符,通过标准描述符中的端口描述符,主设备模块确定向控制芯片传输固件升级包的芯片通信端口。
在步骤S205中,所述主设备模块选取所述HID报告描述符中与目标报告标识码对应的报告描述符,作为传输所述固件升级包所依照的目标数据传输格式。
在HID报告描述符中会包含多种不同功能操作对应的报告描述符,主设备模块通过查找HID报告描述符中包含的报告标识码与目标报告标识码相对应的报告描述符,以确定向控制芯片传输固件升级包时所依照的数据传输格式。
在步骤S206中,判断HID设备描述符中的设备标识符与所述触摸设备的标准标识符是否相匹配;如果HID设备描述符中的设备标识符与所述触摸设备的标准标识符相匹配,执行步骤S207。
在HID设备描述符中包含有标识该设备类型的设备标识符。当HID设备描述符中的设备标识符与触摸设备的标准标识符相同时,则确定当前USB描述符为触摸设备的USB描述符,此时控制芯片可以作为一个虚拟的触摸设备接收主 控设备传输的固件升级包。
在步骤S207中,主设备模块依照所述目标数据传输格式向所述芯片通信端口传输所述固件升级包。
在步骤S208中,所述控制芯片向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。
本申请实施例进一步细化了主设备模块获取控制芯片中当前USB描述符以及向控制芯片发送固件升级包的操作,并追加控制芯片的监听端口的端口值发生变化的操作,进一步完善了数据传输方法的技术方案,避免了在传输触摸设备的固件升级包的过程中,多个设备的数据交互采用的协议不同导致主设备模块无法准确向触摸设备传输固件升级包的情况,实现了无需进行复杂的软件开发或修改硬件框架的情况下主设备模块能够准确的向触摸设备传输固件升级包,从而在保证触摸设备能够有效进行固件升级的情况下,减少开发人员的开发维护难度,节约智能终端的硬件使用成本。
实施例三
图4为本申请实施例三提供的数据传输装置的结构示意图,本实施例可适用于采用智能终端中的主设备模块中存储的固件升级包对智能终端中的触摸设备进行固件升级的情况,该装置包括:获取模块301,发送模块302以及转送模块303。
其中,获取模块301,设置为在主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于所述控制芯片的当前通用串行接口USB描述符。
发送模块302,设置为根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包。
转送模块303,设置为向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。
本申请实施例通过主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取模块301获取对应于所述控制芯片的当前USB描述符;发送模块302根据当前USB描述符,确定与控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包;转送模块303向与芯片通信端口对 应的触摸设备通信端口转送固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。采用上述技术方案避免了在传输触摸设备的固件升级包的过程中,多个设备的数据交互采用的协议不同导致主设备模块无法准确向触摸设备传输固件升级包的情况,实现了无需进行复杂的软件开发或修改硬件框架的情况下主设备模块能够准确的向触摸设备传输固件升级包,从而在保证触摸设备能够有效进行固件升级的情况下,减少开发人员的开发维护难度,节约智能终端的硬件使用成本。
在一实施例中,所述当前USB描述符包括:标准描述符、人机接口设备HID报告描述符以及HID设备描述符。
所述发送模块302,包括:确定单元,设置为根据所述标准描述符,确定向所述控制芯片传输所述固件升级包所需的芯片通信端口;选取单元,设置为选取所述HID报告描述符中与目标报告标识码对应的报告描述符,作为传输所述固件升级包所依照的目标数据传输格式;发送单元,设置为当所述HID设备描述符中的设备标识符与所述触摸设备的标准标识符相匹配时,依照所述目标数据传输格式向所述芯片通信端口传输所述固件升级包。
在一实施例中,该装置,还包括:调整模块,设置为在所述控制芯片接收到触发生成的固件升级指令时,更新设定存储空间中保存的通信控制信息,并调整所述设备存储空间所对应监听端口的端口值。
在一实施例中,所述调整模块,包括:第一获取单元,设置为获取所述控制芯片中所存储USB描述符序列表中每个USB描述符的设备标识信息。更新单元,设置为从获取的所有所述设备标识信息中查找与设定标识信息相匹配的目标设备标识信息,并将包含所述目标设备标识信息的目标USB描述符作为通信控制信息更新到所述设定存储空间中;或者,将包含所述目标设备标识信息的目标USB描述符的本地存储地址作为通信控制信息更新到所述设定存储空间中。
在一实施例中,该装置中,所述固件升级指令为以下之一:用户触摸所述触摸设备的触摸界面而产生的第一升级指令;用户触发所述主设备模块中升级控制开关键而产生的第二升级指令;或者,所述控制芯片代码逻辑实现中的模式切换标识符的标识值为升级标识值时对应产生的第三升级指令。
在一实施例中,所述获取模块301,包括:发送单元,设置为向所述控制 芯片发送复位请求,并在接收到所述控制芯片反馈的外部中断信号后,向所述控制芯片发送设备信息获取指令;第二获取单元,设置为获取所述控制芯片基于设备信息获取指令反馈的所述当前USB描述符;其中,所述当前USB描述符通过所述通信控制信息确定。
上述数据传输装置可执行本申请任意实施例所提供数据传输方法,具备执行数据传输方法相应的功能模块。
可以理解的是,针对图1A中的具备触摸设备的智能终端的结构示意图,获取模块301可配置于主设备模块中;发送模块302可配置于主设备模块中;转送模块303可配置于控制芯片中;调整模块可配置于控制芯片中。
实施例四
图5为本申请实施例四提供的一种终端的结构示意图,如图5所示,本申请实施例四提供的终端,包括:输入装置401、处理器402以及存储装置403。其中,输入装置401设置为接收触摸设备供应商的固件升级包。该终端中的处理器可以是至少一个。图5中以一个处理器402为例,所述终端中的输入装置401可以通过总线或其他方式处理器402以及存储装置403相连,且处理器402和存储装置403也通过总线或其他方式连接,图5中以通过总线连接为例。
在本实施例中,终端中的处理器402可以监听控制芯片中监听端口的端口值是否发生变化;还可以获取控制芯片中的当前USB描述符;还可以根据当前USB描述符确定控制芯片的芯片通信端口;还可以基于芯片通信端口向控制芯片发送固件升级包。
该终端中的存储装置403作为一种计算机可读存储介质,可设置为存储至少一个程序,所述程序可以是软件程序、计算机可执行程序以及模块,如本申请实施例中数据传输方法对应的程序指令/模块(例如,附图4所示的数据传输装置中的模块,包括:获取模块301,发送模块302以及转送模块303)。处理器402通过运行存储在存储装置403中的软件程序、指令以及模块,从而执行终端的多种功能应用以及数据处理,即实现上述方法实施例中数据传输方法。
存储装置403可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据设备的使用所创建的数据等(如上述实施例中的固件升级包、多种USB描述符、USB描述 符序列表、目标报告标识码以及标准标识符等)。此外,存储装置403可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储装置403可进一步包括相对于处理器402远程设置的存储器,这些远程存储器可以通过网络连接至设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
此外,本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被数据传输装置执行时实现本申请实施例一或实施例二提供的数据传输方法,该方法包括:主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于所述控制芯片的当前通用串行接口USB描述符;所述主设备模块根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包;所述控制芯片向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本申请可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请每个实施例所述的方法。

Claims (14)

  1. 一种数据传输方法,包括:
    主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于所述控制芯片的当前通用串行接口USB描述符;
    所述主设备模块根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包;
    所述控制芯片向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。
  2. 根据权利要求1所述的方法,其中,所述当前USB描述符包括:标准描述符、人机接口设备HID报告描述符以及HID设备描述符;
    所述主设备模块根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包,包括:
    所述主设备模块根据所述标准描述符,确定向所述控制芯片传输所述固件升级包所需的芯片通信端口;
    所述主设备模块选取所述HID报告描述符中与目标报告标识码对应的报告描述符,作为传输所述固件升级包所依照的目标数据传输格式;
    当所述HID设备描述符中的设备标识符与所述触摸设备的标准标识符相匹配时,所述主设备模块依照所述目标数据传输格式向所述芯片通信端口传输所述固件升级包。
  3. 根据权利要求1所述的方法,在所述主设备模块监听到控制芯片中监听端口的端口值发生改变之前,还包括:
    所述控制芯片接收到触发生成的固件升级指令时,更新设定存储空间中保存的通信控制信息,并调整所述设备存储空间所对应监听端口的端口值。
  4. 根据权利要求3所述的方法,其中,所述更新设定存储空间中保存的通信控制信息,包括:
    获取所述控制芯片中所存储USB描述符序列表中每个USB描述符的设备标识信息;
    从获取的所有所述设备标识信息中查找与设定标识信息相匹配的目标设备标识信息;以及
    将包含所述目标设备标识信息的目标USB描述符作为通信控制信息更新到所述设定存储空间中;或者,将包含所述目标设备标识信息的目标USB描述符 的本地存储地址作为通信控制信息更新到所述设定存储空间中。
  5. 根据权利要求3所述的方法,其中所述固件升级指令为以下之一:
    用户触摸所述触摸设备的触摸界面而产生的第一升级指令;
    用户触发所述主设备模块中升级控制开关键而产生的第二升级指令;以及所述控制芯片代码逻辑实现中的模式切换标识符的标识值为升级标识值时对应产生的第三升级指令。
  6. 根据权利要求3所述的方法,其中,所述获取对应于所述控制芯片的当前USB描述符,包括:
    向所述控制芯片发送复位请求,并在接收到所述控制芯片反馈的外部中断信号后,向所述控制芯片发送设备信息获取指令;
    获取所述控制芯片基于所述设备信息获取指令反馈的所述当前USB描述符;
    其中,所述当前USB描述符通过所述通信控制信息确定。
  7. 一种数据传输装置,包括:
    获取模块,设置为在主设备模块监听到控制芯片中监听端口的端口值发生改变后,获取对应于所述控制芯片的当前通用串行接口USB描述符;
    发送模块,设置为根据所述当前USB描述符,确定与所述控制芯片通信的芯片通信端口,并基于所述芯片通信端口向所述控制芯片发送固件升级包;
    转送模块,设置为向与所述芯片通信端口对应的触摸设备通信端口转送所述固件升级包,以使所述触摸设备基于所述固件升级包进行固件升级。
  8. 根据权利要求7所述的装置,其中,所述当前USB描述符包括:标准描述符、人机接口设备HID报告描述符以及HID设备描述符;
    所述发送模块,包括:
    确定单元,设置为根据所述标准描述符,确定向所述控制芯片传输所述固件升级包所需的芯片通信端口;
    选取单元,设置为选取所述HID报告描述符中与目标报告标识码对应的报告描述符,作为传输所述固件升级包所依照的目标数据传输格式;
    发送单元,设置为当所述HID设备描述符中的设备标识符与所述触摸设备的标准标识符相匹配时,依照所述目标数据传输格式向所述芯片通信端口传输所述固件升级包。
  9. 根据权利要求7所述的装置,所述装置还包括:
    调整模块,设置为在所述控制芯片接收到触发生成的固件升级指令时,更新设定存储空间中保存的通信控制信息,并调整所述设备存储空间所对应监听端口的端口值。
  10. 根据权利要求9所述的装置,所述调整模块包括:第一获取单元以及更新单元;
    所述第一获取单元,设置为获取所述控制芯片中所存储USB描述符序列表中每个USB描述符的设备标识信息;
    所述更新单元,设置为从获取的所有所述设备标识信息中查找与设定标识信息相匹配的目标设备标识信息;并将包含所述目标设备标识信息的目标USB描述符作为通信控制信息更新到所述设定存储空间中,或者,将包含所述目标设备标识信息的目标USB描述符的本地存储地址作为通信控制信息更新到所述设定存储空间中。
  11. 根据权利要求9所述的装置,所述固件升级指令为以下之一:
    用户触摸所述触摸设备的触摸界面而产生的第一升级指令;
    用户触发所述主设备模块中升级控制开关键而产生的第二升级指令;
    或者,所述控制芯片代码逻辑实现中的模式切换标识符的标识值为升级标识值时对应产生的第三升级指令。
  12. 根据权利要求9所述的装置,所述获取模块包括:发送单元以及第二获取单元;
    所述发送单元,设置为向所述控制芯片发送复位请求,并在接收到所述控制芯片反馈的外部中断信号后,向所述控制芯片发送设备信息获取指令;
    所述第二获取单元,设置为获取所述控制芯片基于设备信息获取指令反馈的所述当前USB描述符;其中,所述当前USB描述符通过所述通信控制信息确定。
  13. 一种终端,包括输入装置,还包括:
    至少一个处理器;
    存储装置,设置为存储至少一个程序;
    所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-6中任一项所述的数据传输方法。
  14. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-6中任一项所述的数据传输方法。
PCT/CN2018/118087 2018-03-13 2018-11-29 数据传输方法、装置、终端以及存储介质 WO2019174307A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810203509.4A CN108366131B (zh) 2018-03-13 2018-03-13 数据传输方法、装置、终端以及存储介质
CN201810203509.4 2018-03-13

Publications (1)

Publication Number Publication Date
WO2019174307A1 true WO2019174307A1 (zh) 2019-09-19

Family

ID=63003897

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/118087 WO2019174307A1 (zh) 2018-03-13 2018-11-29 数据传输方法、装置、终端以及存储介质

Country Status (2)

Country Link
CN (1) CN108366131B (zh)
WO (1) WO2019174307A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108366131B (zh) * 2018-03-13 2020-10-02 广州视源电子科技股份有限公司 数据传输方法、装置、终端以及存储介质
CN111221009B (zh) * 2018-11-23 2023-10-13 青岛海信移动通信技术有限公司 一种定位芯片的切换方法、移动终端及计算机存储介质
CN114185609A (zh) * 2021-11-04 2022-03-15 深圳市德明利技术股份有限公司 设备配置信息的处理方法、装置、储存介质和处理器
CN114153368A (zh) * 2021-12-07 2022-03-08 Oppo广东移动通信有限公司 应用控制方法和系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033770A (zh) * 2010-12-17 2011-04-27 中兴通讯股份有限公司 移动终端的触摸屏固件升级方法及装置
CN102750155A (zh) * 2011-04-19 2012-10-24 鸿富锦精密工业(深圳)有限公司 用于更新固件的控制板、固件更新系统及方法
US20130194282A1 (en) * 2012-01-30 2013-08-01 Samsung Electronics Co., Ltd. Display apparatus, upgrade apparatus, display system including the same and control method thereof
CN105718281A (zh) * 2015-07-29 2016-06-29 中科创达软件科技(深圳)有限公司 一种触摸屏固件升级方法及装置
CN107368219A (zh) * 2017-07-12 2017-11-21 广州视源电子科技股份有限公司 触摸响应方法、芯片及智能设备
CN108366131A (zh) * 2018-03-13 2018-08-03 广州视源电子科技股份有限公司 数据传输方法、装置、终端以及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646048B (zh) * 2012-05-03 2016-02-10 中兴通讯股份有限公司 移动终端触摸屏固件升级的方法及装置
CN103577213B (zh) * 2012-08-09 2018-08-31 努比亚技术有限公司 一种智能终端触摸屏固件的升级方法
CN105094880A (zh) * 2014-05-23 2015-11-25 中兴通讯股份有限公司 通用串行总线的驱动方法、计算机及复合设备
CN106168863A (zh) * 2015-05-19 2016-11-30 义隆电子股份有限公司 具触控芯片的电脑装置及该触控芯片的更新方法
CN106502743A (zh) * 2016-11-01 2017-03-15 捷开通讯(深圳)有限公司 电子设备的触摸屏固件的升级方法和升级装置、电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033770A (zh) * 2010-12-17 2011-04-27 中兴通讯股份有限公司 移动终端的触摸屏固件升级方法及装置
CN102750155A (zh) * 2011-04-19 2012-10-24 鸿富锦精密工业(深圳)有限公司 用于更新固件的控制板、固件更新系统及方法
US20130194282A1 (en) * 2012-01-30 2013-08-01 Samsung Electronics Co., Ltd. Display apparatus, upgrade apparatus, display system including the same and control method thereof
CN105718281A (zh) * 2015-07-29 2016-06-29 中科创达软件科技(深圳)有限公司 一种触摸屏固件升级方法及装置
CN107368219A (zh) * 2017-07-12 2017-11-21 广州视源电子科技股份有限公司 触摸响应方法、芯片及智能设备
CN108366131A (zh) * 2018-03-13 2018-08-03 广州视源电子科技股份有限公司 数据传输方法、装置、终端以及存储介质

Also Published As

Publication number Publication date
CN108366131B (zh) 2020-10-02
CN108366131A (zh) 2018-08-03

Similar Documents

Publication Publication Date Title
WO2019174307A1 (zh) 数据传输方法、装置、终端以及存储介质
US8352577B2 (en) Method and apparatus for updating information on an embedded system
EP2845114B1 (en) Extensible wse hub to support a multi-hop tree of usb hubs or peripherals over a wireless link
US8650332B2 (en) Method for switching working mode, USB device, and host device
US20080126628A1 (en) Methods, devices and computer program products for automatically providing an alternate usb configuration of a usb compliant peripheral device for exposure to a host computer
US8560750B2 (en) Systems and methods for advanced interrupt scheduling and priority processing in a storage system environment
US10540301B2 (en) Virtual host controller for a data processing system
WO2010115366A1 (zh) 设备驱动方法、装置及通信系统
US10216664B2 (en) Remote resource access method and switching device
CN114296808B (zh) 一种引脚配置方法、装置、电子设备及存储介质
US20160077986A1 (en) Electronic apparatus providing real-time switching and sharing of usb electronic devices among hosts
CN111930678A (zh) 一种数据传输方法、装置及电子设备和存储介质
CN111143010A (zh) 终端设备的控制方法、终端设备及存储介质
CN113647061A (zh) 设备发现方法、装置、控制终端及物联网辅助设备
CN116737618B (zh) Fpga架构、器件、数据处理方法、系统及存储介质
WO2024037376A1 (zh) 服务管理方法、装置、设备及可读存储介质
WO2018003841A1 (ja) シリアル通信方法及びセンサコントローラ
US8893105B2 (en) Activation-based regulatory updates
US8996771B1 (en) System and method for communication via universal serial bus
US8849647B2 (en) Dual-firmware for next generation emulation
JP6216909B1 (ja) シリアル通信方法及びセンサコントローラ
CN111868687B (zh) 信息处理装置、方法及程序
CN111610995A (zh) 一种设备固件升级方法、装置、电子设备和存储介质
US20230170745A1 (en) Control method, electronic device, and writing interaction device
KR102448146B1 (ko) 단말의 개선을 위한 파일 관리 방법 및 이를 수행하는 장치들

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18910069

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18910069

Country of ref document: EP

Kind code of ref document: A1