Communication method and device based on docking station and mobile terminal, equipment and medium
By implementing the communication protocol handshake and device whitelist matching method between the mobile terminal and the dock, the security problem of unauthorized device connections in the prior art is solved, and two-way authentication and higher security are achieved.
Patent Information
- Application Number
- CN202510064284.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, there is a lack of mutual handshake and authentication communication protocol between the mobile terminal and the dock, resulting in unauthorized devices being connected without restrictions, reducing the security of the business scenario.
By obtaining the USB interface communication protocol information between the mobile terminal and the dock, the mobile terminal sends a communication signal to the dock and matches it through the preset device whitelist to ensure that only certified devices can successfully connect.
The two-way authentication process between the mobile terminal and the dock is realized, which significantly improves the credibility and security of data transmission and device connections, prevents unsuccessfully identified devices from accessing the system, and ensures the security of business scenarios.
Smart Images

Figure CN120017615A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of office mobility, and in particular to a communication method, device, equipment and medium based on a docking station and a mobile terminal. Background Art
[0002] At present, with the promotion of mobile office, industry window services are also showing a trend of mobility. In order to increase the reuse rate of office assets and improve the development and operation and maintenance efficiency of office assets, mobile terminals are usually connected to expansion docks and used as hosts. However, there is currently no handshake and authentication communication protocol between mobile terminals and expansion docks. Any USB device can be connected to the mobile terminal without restrictions. In addition, the mobile terminal and the expansion dock cannot recognize each other. When an unauthorized mobile terminal or expansion dock is connected to the system, it is easy to forge the device and communicate with the mobile terminal, resulting in poor security in business scenarios. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a communication method, device, equipment and medium based on a docking station and a mobile terminal, which can prevent an unsuccessfully identified docking station or mobile terminal from accessing the system, thereby ensuring the security of the business scenario.
[0004] In a first aspect, an embodiment of the present invention provides a communication method based on a docking station and a mobile terminal, which is applied to a mobile office system, wherein the mobile office system includes a mobile terminal and a docking station, the mobile terminal is provided with a first USB interface, the docking station is provided with a second USB interface, and the mobile terminal is connected to the docking station via the first USB interface and the second USB interface, including:
[0005] Acquire communication protocol information of the first USB interface and the second USB interface;
[0006] The mobile terminal sends a first communication signal to the docking station according to the communication protocol information, and the docking station responds to the first communication signal and receives a plurality of transmission data packets sent by the mobile terminal to the docking station, wherein a device whitelist is preset in the mobile terminal;
[0007] The mobile terminal and the expansion dock both extract the plurality of data transmission packets to obtain first field information and second field information;
[0008] Matching the first field information and the second field information with the device whitelist respectively;
[0009] When the first field information and the second field information successfully match the device whitelist, the mobile terminal is successfully connected to the docking station.
[0010] In some embodiments of the present invention, the matching the first field information and the second field information with the device whitelist respectively includes:
[0011] When the first field information and the second field information fail to successfully match the device whitelist, the expansion dock stops receiving the transmission data packet sent by the mobile terminal;
[0012] The mobile terminal is disconnected from the docking station.
[0013] In some embodiments of the present invention, the mobile terminal sends the first communication signal to the docking station according to the communication protocol information, including:
[0014] Acquire a first time period and a second time period of the mobile terminal;
[0015] When the communication time of the mobile terminal reaches the first time period, the mobile terminal sends the first communication signal to the expansion dock, wherein the mobile terminal cyclically sends the first communication signal to the expansion dock according to a preset cycle period;
[0016] When the communication time reaches the second time period, it is determined that the mobile terminal is not successfully connected to the expansion dock, and the connection between the mobile terminal and the expansion dock fails.
[0017] In some embodiments of the present invention, after obtaining the first time period and the second time period of the mobile terminal, the method further includes:
[0018] Before the communication time reaches the first time period, the mobile terminal sends request instruction information and request response information to the expansion dock;
[0019] The expansion dock sends a ready instruction and a ready response to the mobile terminal according to the request instruction information and the request response information;
[0020] When the communication time reaches the first time period, the mobile terminal resends the request instruction information and the request response information to the expansion dock.
[0021] In some embodiments of the present invention, the mobile terminal and the docking station both extract the plurality of data transmission packets to obtain the first field information and the second field information, including:
[0022] Acquire a plurality of first character strings in the first field information and a plurality of second character strings in the second field information, wherein the first character strings and the second character strings at least include device information, device model information, and serial number information;
[0023] Obtaining third string information of the device whitelist, and matching the first string and the second string with the third string respectively;
[0024] When the first character string and the second character string do not successfully match the third character string, the communication between the mobile terminal and the docking station is stopped.
[0025] In some embodiments of the present invention, after the mobile terminal is successfully connected to the docking station, the method further includes:
[0026] The mobile terminal and the expansion dock both obtain first event information;
[0027] The first driving layer of the mobile terminal sends the first event information to the first application layer, and the second driving layer of the docking station sends the first event information to the second application layer;
[0028] When the first service layer of the mobile terminal and the second service layer of the docking station respectively receive the first event information received by the first application layer and the second application layer, it is determined that the mobile terminal and the docking station are successfully connected, and a service process is executed;
[0029] When the first application layer and the second application layer do not receive the first event information, it is determined that the mobile terminal and the docking station are not successfully connected, and the mobile terminal stops sending the first communication signal to the docking station.
[0030] In some embodiments of the present invention, the first communication signal includes at least a protocol header, message content, a CRC check value of the MSG content, and a protocol tail, and the MSG content includes at least a hardware identifier, an instruction type, instruction information, data length, and data information.
[0031] In a second aspect, an embodiment of the present invention provides a communication device based on a docking station and a mobile terminal, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the communication method based on the docking station and the mobile terminal as described in the first aspect above.
[0032] In a third aspect, an embodiment of the present invention provides an electronic device, comprising the communication device based on a docking station and a mobile terminal as described in the second aspect above.
[0033] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the communication method based on the expansion dock and the mobile terminal as described in the first aspect above.
[0034] The communication method based on the expansion dock and the mobile terminal according to the embodiment of the present invention has at least the following beneficial effects:
[0035] The communication protocol information of the first USB interface and the second USB interface is obtained; the mobile terminal sends a first communication signal to the expansion dock according to the communication protocol information, and the expansion dock responds to the first communication signal and receives multiple transmission data packets sent by the mobile terminal to the expansion dock, wherein a device whitelist is preset in the mobile terminal; the mobile terminal and the expansion dock both extract multiple data transmission packets to obtain first field information and second field information; the first field information and the second field information are matched with the device whitelist respectively; when the first field information and the second field information are successfully matched with the device whitelist, the mobile terminal is successfully connected to the expansion dock. According to the technical solution of this embodiment, the mobile terminal and the expansion dock are connected through the communication protocol between the first USB interface and the second USB interface, thereby realizing a two-way authentication process between the mobile terminal and the expansion dock, significantly improving the credibility and security of data transmission and device connection, ensuring that only trusted and verified devices can communicate with each other, and effectively blocking the access of non-authenticated devices at the physical interface level, thereby preventing the expansion dock or mobile terminal that has not been successfully identified from accessing the system, and ensuring the security of the business scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of a communication method based on a docking station and a mobile terminal provided by an embodiment of the present invention;
[0037] Figure 2 is a flow chart of matching field information with a device whitelist according to an embodiment of the present invention;
[0038] Figure 3 is a flow chart of a mobile terminal sending a first communication signal to a docking station according to communication protocol information according to an embodiment of the present invention;
[0039] Figure 4 is a flow chart after obtaining a first time period and a second time period of a mobile terminal according to an embodiment of the present invention;
[0040] Figure 5 is a flow chart of obtaining first field information and second field information according to an embodiment of the present invention;
[0041] Figure 6 is a flow chart after a mobile terminal is successfully connected to a docking station according to an embodiment of the present invention;
[0042] Figure 7 is a structural block diagram of a mobile office system according to an embodiment of the present invention;
[0043] Figure 8 It is a structural diagram of a communication device based on a docking station and a mobile terminal provided by another embodiment of the present invention.
[0044] Description of reference numerals:
[0045] The mobile terminal 100 , the first USB interface 110 , the docking station 200 , and the second USB interface 120 . DETAILED DESCRIPTION
[0046] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0047] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0048] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0049] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution.
[0050] Reference Figure 7The embodiment of the present invention provides a communication method based on a docking station 200 and a mobile terminal 100, which is applied to a mobile office system. The mobile office system includes a mobile terminal 100 and a docking station 200. The mobile terminal 100 is provided with a first USB interface 110, and the docking station 200 is provided with a second USB interface 120. The mobile terminal 100 and the docking station 200 are connected through the first USB interface 110 and the second USB interface 120. And the first driver layer of the mobile terminal 100 and the second driver layer of the docking station 200 are used to realize the batch transmission of the handshake protocol between the first USB interface 110 and the second USB interface 120. Among them, the mobile terminal 100 is used as a master device, and the docking station 200 is used as a slave device. All communications are initiated by the mobile terminal 100, and the docking station 200 responds. Thereby, mutual recognition between the mobile terminal 100 and the docking station 200 is realized, and the security during the execution of the business is improved. It should be noted that the mobile terminal 100 in this embodiment can be a smart device such as a tablet computer, and this embodiment is not specifically limited.
[0051] The control method of the embodiment of the present invention is further described below based on the accompanying drawings.
[0052] Reference Figure 1 , Figure 1 A flow chart of a communication method based on a docking station 200 and a mobile terminal 100 provided in an embodiment of the present invention, the communication method based on the docking station 200 and the mobile terminal 100 includes but is not limited to the following steps:
[0053] Step S11, obtaining communication protocol information of the first USB interface 110 and the second USB interface 120;
[0054] It should be noted that by obtaining the communication protocol information of the first USB interface 110 and the second USB interface 120, the communication protocol compatibility between the mobile terminal 100 and the docking station 200 is ensured. Only when the communication protocols between the mobile terminal 100 and the docking station 200 match can stable data transmission be achieved.
[0055] Step S12, the mobile terminal 100 sends a first communication signal to the docking station 200 according to the communication protocol information, and the docking station 200 responds to the first communication signal and receives a plurality of transmission data packets sent by the mobile terminal 100 to the docking station 200, wherein a device whitelist is preset in the mobile terminal 100;
[0056] It should be noted that the device whitelist mechanism can ensure that only the mobile terminal 100 and the expansion dock 200 that have been authenticated and authorized by the handshake protocol can communicate and transmit data, prevent unauthorized device connection, and thus avoid the risk of data leakage and tampering. By following the communication protocol of the first USB interface 110 and the second USB interface 120, the mobile terminal 100 and the expansion dock 200 can ensure that the communication between the two parties is accurate and reliable. Further avoid the occurrence of communication errors or data loss caused by protocol mismatch. In addition, the expansion dock 200 can quickly respond to the first communication signal sent by the mobile terminal 100, thereby shortening the waiting time for data transmission, and the mobile terminal 100 can send multiple transmission data packets to the expansion dock 200, reducing redundancy and repetition in the data transmission process, and improving the speed and efficiency of data transmission.
[0057] Step S13, the mobile terminal 100 and the docking station 200 both extract multiple data transmission packets to obtain first field information and second field information;
[0058] It should be noted that during the data transmission process, data transmission packets may be lost or damaged due to network fluctuations, equipment failures, etc. This embodiment extracts and parses multiple data transmission packets to obtain first field information and second field information, and can recover and restore the original data to the greatest extent, thereby ensuring the integrity of the data.
[0059] Step S14, matching the first field information and the second field information with the device whitelist respectively;
[0060] It should be noted that, by matching the first field information and the second field information with the device whitelist respectively, a preliminary bidirectional communication connection comparison between the docking station 200 and the mobile terminal 100 is achieved.
[0061] Step S15 , when the first field information and the second field information successfully match the device whitelist, the mobile terminal 100 is successfully connected to the docking station 200 .
[0062] It should be noted that only when the first field information and the second field information successfully match the device whitelist, can an effective connection be established between the mobile terminal 100 and the docking station 200. This ensures that only authenticated and authorized devices can access or transmit data, and verifies the source and legitimacy of the data. This ensures the accuracy and consistency of the data, prevents data from being tampered with or forged, and ensures the safety of the device.
[0063] It should be noted that the mobile terminal 100 and the expansion dock 200 are connected through the communication protocol between the first USB interface 110 and the second USB interface 120, thereby realizing a two-way authentication process between the mobile terminal 100 and the expansion dock 200, which significantly improves the credibility and security of data transmission and device connection, ensures that only devices that have been trusted and verified can communicate with each other, and effectively blocks the access of non-authenticated devices at the physical interface level, thereby preventing the expansion dock 200 or mobile terminal 100 that has not been successfully identified from accessing the system, thereby ensuring the security of business scenarios.
[0064] In addition, in one embodiment, referring to Figure 2 ,exist Figure 1 Step S14 of the illustrated embodiment also includes but is not limited to the following steps:
[0065] Step S21, when the first field information and the second field information fail to match the device whitelist, the docking station 200 stops receiving the transmission data packet sent by the mobile terminal 100;
[0066] Step S22 : the mobile terminal 100 is disconnected from the docking station 200 .
[0067] It should be noted that by matching and verifying the field information with the device whitelist respectively, when the expansion dock 200 or the mobile terminal 100 fails to successfully match the device whitelist, the mobile terminal 100 can quickly stop sending transmission data packets to the expansion dock 200 and disconnect the connection, thereby effectively preventing data leakage and illegal access.
[0068] In addition, in one embodiment, referring to Figure 3 ,exist Figure 1 Step S12 of the illustrated embodiment also includes but is not limited to the following steps:
[0069] Step S31, obtaining a first time period and a second time period of the mobile terminal 100;
[0070] Step S32, when the communication time of the mobile terminal 100 reaches the first time period, the mobile terminal 100 sends a first communication signal to the docking station 200, wherein the mobile terminal 100 cyclically sends the first communication signal to the docking station 200 according to a preset cycle period;
[0071] Step S33 , when the communication time reaches the second time period, it is determined that the mobile terminal 100 and the docking station 200 are not successfully connected, and the connection between the mobile terminal 100 and the docking station 200 fails.
[0072] It should be noted that, in the present embodiment, the first time period is 3 seconds, and the second time period is 10 seconds. Specifically, when the communication time of the mobile terminal 100 reaches the first time period (i.e., every 3 seconds), the mobile terminal 100 initiates a complete communication process, and the docking station 200 responds. When the communication time reaches the second time period (i.e., within 10 seconds, no communication connection is established between the mobile terminal 100 and the docking station 200 for three consecutive times), the communication is considered to have failed. After the communication fails, the docking station 200 will no longer receive USB data from the mobile terminal 100. At the same time, the docking station 200 is also unable to directly transmit data to the mobile terminal 100 through the first USB interface 110 and the second USB interface 120, thereby achieving the effect of two-way data disconnection, ensuring the safety of device use between the mobile terminal 100 and the docking station 200.
[0073] In addition, in one embodiment, referring to Figure 4 ,exist Figure 3 After step S31 in the illustrated embodiment, the following steps are also included but not limited to:
[0074] Step S41, before the communication time reaches the first time period, the mobile terminal 100 sends a request instruction message and a request response message to the docking station 200;
[0075] Step S42, the docking station 200 sends a ready instruction and a ready response to the mobile terminal 100 according to the request instruction information and the request response information;
[0076] Step S43 , when the communication time reaches the first time period, the mobile terminal 100 resends the request instruction information and the request response information to the docking station 200 .
[0077] It should be noted that the mobile terminal 100 sends a request instruction and corresponding information before the communication time reaches the first time period, so that the docking station 200 can quickly identify and respond to the instruction information sent by the mobile terminal 100, so that the mobile terminal 100 and the docking station 200 can quickly and stably establish a communication connection, reduce the delay in the communication process through a timely request and response mechanism, and further improve the efficiency and speed of data transmission. Furthermore, after receiving the request instruction from the mobile terminal 100, the docking station 200 quickly sends a ready instruction to the mobile terminal 100 to confirm that the docking station 200 can receive or process subsequent data transmission in a timely manner. After the first time period, the request instruction and response information are resent to ensure that the mobile terminal 100 can cyclically send the first communication signal to the docking station 200 according to the preset cycle period, thereby completing the complete communication process.
[0078] In addition, in one embodiment, referring to Figure 5 ,exist Figure 1Step S13 of the illustrated embodiment also includes but is not limited to the following steps:
[0079] Step S51, obtaining a plurality of first character strings in the first field information and a plurality of second character strings in the second field information, wherein the first character string and the second character string at least include device information, device model information and serial number information;
[0080] Step S52, obtaining third string information of the device whitelist, and matching the first string and the second string with the third string respectively;
[0081] Step S53 , when the first character string, the second character string and the third character string are not successfully matched, the communication between the mobile terminal 100 and the docking station 200 is stopped.
[0082] It should be noted that after the communication connection is successfully established between the mobile terminal 100 and the expansion dock 200, the mobile terminal 100 and the expansion dock 200 respectively extract the first field information and the second field information in the data packet, wherein the first field information and the second field information are both HWID fields; further, the mobile terminal 100 and the expansion dock 200 respectively obtain the first character string and the second character string in the first field information and the second field information, wherein the first character string and the second character string both include the device manufacturer, product model and product serial number.
[0083] Furthermore, the third string in the device whitelist is obtained, and the first string and the second string are matched with the third string respectively. When the first string and the second string do not successfully match the third string, the communication is terminated. In this way, invalid data transmission caused by unauthorized device access is reduced, and during the data transmission process, the legitimacy of the device is verified to ensure that the data will not be intercepted or tampered by unauthorized devices, further ensuring the confidentiality and integrity of the data during the business.
[0084] In addition, in one embodiment, referring to Figure 6 ,exist Figure 1 After step S15 of the illustrated embodiment, the following steps are also included but not limited to:
[0085] Step S61, the mobile terminal 100 and the docking station 200 both obtain first event information;
[0086] Step S62, the first driving layer of the mobile terminal 100 sends the first event information to the first application layer, and the second driving layer of the docking station 200 sends the first event information to the second application layer;
[0087] Step S63, when the first service layer of the mobile terminal 100 and the second service layer of the docking station 200 receive the first event information received by the first application layer and the second application layer respectively, it is determined that the mobile terminal 100 and the docking station 200 are successfully connected, and the service process is executed;
[0088] Step S64 , when the first application layer and the second application layer do not receive the first event information, it is determined that the mobile terminal 100 and the docking station 200 are not successfully connected, and the mobile terminal 100 stops sending the first communication signal to the docking station 200 .
[0089] It should be noted that the mobile terminal 100 is provided with a first driver layer, a first application layer and a first business layer, and the docking station 200 is provided with a second driver layer, a second application layer and a first business layer. After the mobile terminal 100 and the docking station 200 are successfully connected in communication, the first driver layer and the second driver layer send first event information to the first application layer and the second application layer respectively. Exemplarily, the first event information is an online event. When the first business layer and the second business layer receive the "online@ / devices / virtual / misc / dcm" event, it is determined that the mobile terminal 100 and the docking station 200 are successfully connected and start to execute the business process; when the first application layer and the second application layer do not receive the first time information, it is determined that the mobile terminal 100 and the docking station 200 are not successfully connected, and the mobile terminal 100 no longer sends business-related data to the docking station 200 through the first USB interface 110 and the second USB interface 120.
[0090] In addition, in one embodiment, the first communication signal at least includes a protocol header, a message content, a CRC check value of the MSG content, and a protocol tail, and the MSG content at least includes a hardware identifier, an instruction type, instruction information, a data length, and data information. It should be noted that the communication format of the first communication signal is a HEAD protocol header, a MSG message content, a CRC check value of the CRC MSG content, and a TAIL protocol tail, wherein the protocol header is 1 byte, the message content is 70 bytes, the CRC check value of the MSG content is 2 bytes, and the protocol tail is 1 byte. Further, the message content specifically includes a HWID hardware identifier, a CMD instruction type, a TYPE instruction, a LEN data length, and DATA data. Further, the HWID hardware identifier includes at least a VID (identification device manufacturer), a PID (product model), and a SN (product serial number), wherein the HWID is 44 bytes, the TYPE is 1 byte, the CMD is 1 byte, the LEN is one byte, and the DATA is 1 byte.
[0091] like Figure 8 As shown, Figure 8: is a structural diagram of a communication device based on a docking station and a mobile terminal provided by an embodiment of the present invention. The present invention also provides a communication device based on a docking station and a mobile terminal, including:
[0092] The processor 801 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0093] The memory 802 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 802 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 802, and the processor 801 calls and executes the communication method based on the expansion dock and the mobile terminal in the embodiment of this application;
[0094] Input / output interface 803, used to implement information input and output;
[0095] The communication interface 804 is used to realize the communication interaction between the present apparatus and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0096] A bus 805 that transmits information between the various components of the device (e.g., the processor 801, the memory 802, the input / output interface 803, and the communication interface 804);
[0097] The processor 801 , the memory 802 , the input / output interface 803 and the communication interface 804 are connected to each other in communication within the device via a bus 805 .
[0098] An embodiment of the present application further provides an electronic device, including the communication device based on the expansion dock and the mobile terminal as described above.
[0099] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the communication method based on the expansion dock and the mobile terminal is implemented.
[0100] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are implemented to be located in one place, or may also be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0101] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0102] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation mode. Technical personnel familiar with the field can also make various equivalent deformations or substitutions under the shared conditions without violating the spirit of the present invention. These equivalent deformations or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A communication method based on a docking station and a mobile terminal, characterized in that: Applied to a mobile office system, the mobile office system includes a mobile terminal and a docking station, the mobile terminal is provided with a first USB interface, the docking station is provided with a second USB interface, the mobile terminal and the docking station are connected via the first USB interface and the second USB interface, including: Acquire communication protocol information of the first USB interface and the second USB interface; The mobile terminal sends a first communication signal to the docking station according to the communication protocol information, and the docking station responds to the first communication signal and receives a plurality of transmission data packets sent by the mobile terminal to the docking station, wherein a device whitelist is preset in the mobile terminal; The mobile terminal and the expansion dock both extract the plurality of data transmission packets to obtain first field information and second field information; Matching the first field information and the second field information with the device whitelist respectively; When the first field information and the second field information successfully match the device whitelist, the mobile terminal is successfully connected to the docking station.
2. The communication method based on the expansion dock and the mobile terminal according to claim 1, characterized in that: The matching the first field information and the second field information with the device whitelist respectively includes: When the first field information and the second field information fail to successfully match the device whitelist, the expansion dock stops receiving the transmission data packet sent by the mobile terminal; The mobile terminal is disconnected from the docking station.
3. The communication method based on the expansion dock and the mobile terminal according to claim 1, characterized in that: The mobile terminal sends a first communication signal to the docking station according to the communication protocol information, including: Acquire a first time period and a second time period of the mobile terminal; When the communication time of the mobile terminal reaches the first time period, the mobile terminal sends the first communication signal to the expansion dock, wherein the mobile terminal cyclically sends the first communication signal to the expansion dock according to a preset cycle period; When the communication time reaches the second time period, it is determined that the mobile terminal is not successfully connected to the expansion dock, and the connection between the mobile terminal and the expansion dock fails.
4. The communication method based on the expansion dock and the mobile terminal according to claim 3, characterized in that: After obtaining the first time period and the second time period of the mobile terminal, the method further includes: Before the communication time reaches the first time period, the mobile terminal sends request instruction information and request response information to the expansion dock; The expansion dock sends a ready instruction and a ready response to the mobile terminal according to the request instruction information and the request response information; When the communication time reaches the first time period, the mobile terminal resends the request instruction information and the request response information to the expansion dock.
5. The communication method based on the expansion dock and the mobile terminal according to claim 1, characterized in that: The mobile terminal and the expansion dock both extract the plurality of data transmission packets to obtain first field information and second field information, including: Acquire a plurality of first character strings in the first field information and a plurality of second character strings in the second field information, wherein the first character strings and the second character strings at least include device information, device model information, and serial number information; Obtaining third string information of the device whitelist, and matching the first string and the second string with the third string respectively; When the first character string and the second character string do not successfully match the third character string, the communication between the mobile terminal and the docking station is stopped.
6. The communication method based on the expansion dock and the mobile terminal according to claim 1, characterized in that: After the mobile terminal is successfully connected to the expansion dock, the method further includes: The mobile terminal and the expansion dock both obtain first event information; The first driving layer of the mobile terminal sends the first event information to the first application layer, and the second driving layer of the docking station sends the first event information to the second application layer; When the first service layer of the mobile terminal and the second service layer of the docking station respectively receive the first event information received by the first application layer and the second application layer, it is determined that the mobile terminal and the docking station are successfully connected, and a service process is executed; When the first application layer and the second application layer do not receive the first event information, it is determined that the mobile terminal and the docking station are not successfully connected, and the mobile terminal stops sending the first communication signal to the docking station.
7. The communication method based on the expansion dock and the mobile terminal according to claim 1, characterized in that: The first communication signal includes at least a protocol header, message content, a CRC check value of the MSG content and a protocol tail, and the MSG content includes at least a hardware identifier, an instruction type, instruction information, a data length and data information.
8. A communication device based on a docking station and a mobile terminal, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the communication method based on the expansion dock and the mobile terminal as described in any one of claims 1 to 7.
9. An electronic device, characterized in that: It includes the communication device based on the expansion dock and the mobile terminal as described in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the communication method based on a docking station and a mobile terminal as described in any one of claims 1 to 7.