CN113839973B - Communication connection method, device, equipment and storage medium - Google Patents

Communication connection method, device, equipment and storage medium Download PDF

Info

Publication number
CN113839973B
CN113839973B CN202010581067.4A CN202010581067A CN113839973B CN 113839973 B CN113839973 B CN 113839973B CN 202010581067 A CN202010581067 A CN 202010581067A CN 113839973 B CN113839973 B CN 113839973B
Authority
CN
China
Prior art keywords
connection
preset
communication
connection request
upper computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010581067.4A
Other languages
Chinese (zh)
Other versions
CN113839973A (en
Inventor
周晓磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Actions Technology Co Ltd
Original Assignee
Actions Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Actions Technology Co Ltd filed Critical Actions Technology Co Ltd
Priority to CN202010581067.4A priority Critical patent/CN113839973B/en
Publication of CN113839973A publication Critical patent/CN113839973A/en
Application granted granted Critical
Publication of CN113839973B publication Critical patent/CN113839973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The invention relates to the field of communication, and provides a communication connection method, a device, equipment and a storage medium, which can select a preset communication pipeline to be connected with an upper computer, receive a connection request received from the upper computer in a preset connection window when an electronic equipment executes a process, check the connection request to ensure the reliability of the connection request, determine the communication protocol type of the connection request when the connection request passes the check, and start the preset communication pipeline to establish connection with the upper computer so as to realize the rapid establishment of communication connection with the upper computer.

Description

Communication connection method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for communication connection.
Background
In the prior art, in order to meet the DFU (device firmware upgrade ) or test requirements, a protocol connection mechanism needs to be inserted in advance in a normal running process of the electronic device, and whether to connect to the upper computer is determined by the protocol connection mechanism.
However, the above scheme has the following general problems:
1. when no connection is required, the operation time is prolonged due to the fact that the connection is required to wait for the overtime time to be too long;
2. when no connection request exists, the complete connection flow still needs to be operated, and other processes of the electronic equipment can be continuously executed by judging the overtime or the states of other software and hardware, so that the operation time is increased;
3. when there is no connection request, the corresponding hardware module and pin still need to be operated according to the connection flow, which affects the state of the hardware pin, and at this time, if other devices are connected to the pin, the electrical characteristics of the devices are affected.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a communication connection method, apparatus, device, and storage medium that can quickly establish a communication connection with a host computer.
A communication connection method applied to an electronic device, wherein the electronic device communicates with an upper computer, the communication connection method comprising:
selecting a preset communication pipeline to be connected with the upper computer;
when the electronic equipment executes a process, receiving a connection request received from the upper computer in a preset connection window;
checking the connection request;
when the connection request passes the verification, determining the communication protocol type of the connection request;
and starting the preset communication pipeline to establish connection with the upper computer.
According to a preferred embodiment of the present invention, the connection request is sent to the electronic device by the upper computer every a preset period.
According to a preferred embodiment of the present invention, the duration of the preset connection window is greater than the preset period, and the difference between the duration of the preset connection window and the preset period is less than or equal to a preset threshold.
According to a preferred embodiment of the present invention, said checking said connection request comprises:
extracting data of the connection request;
when the data of the connection request is matched with preset data, determining that the connection request passes the verification; or alternatively;
and when the data of the connection request is not matched with the preset data, determining that the connection request fails to pass the verification.
According to a preferred embodiment of the invention, the method further comprises:
and when the connection request fails to pass the verification, continuously receiving the connection request received from the upper computer in the preset connection window.
According to a preferred embodiment of the present invention, the starting the preset communication pipe to establish connection with the host computer includes:
when the preset communication pipeline is serial communication, starting a UART RX pin to establish connection with the upper computer; or alternatively
When the preset communication pipeline is I2C communication, an I2C pin is started to establish connection with the upper computer; or alternatively
And when the preset communication pipeline is SPI communication, starting an SPI pin to establish connection with the upper computer.
According to a preferred embodiment of the present invention, the starting the preset communication pipe to establish connection with the host computer further includes:
the preset communication pipeline is a wireless pipeline and is in wireless connection with the upper computer; wherein the wireless pipe comprises a BLE broadcast.
According to a preferred embodiment of the invention, the method further comprises:
and when a connection request is not received from the upper computer in the preset connection window, continuing to execute the process of the electronic equipment.
A communication connection apparatus operable with an electronic device, the electronic device in communication with an upper computer, the apparatus comprising:
the selection unit is used for selecting a preset communication pipeline to be connected with the upper computer;
the receiving unit is used for receiving a connection request received from the upper computer in a preset connection window when the electronic equipment executes a process;
a verification unit, configured to verify the connection request;
a determining unit, configured to determine a communication protocol type of the connection request when the connection request passes a check;
and the connection unit is used for starting the preset communication pipeline to establish connection with the upper computer.
An electronic device, the electronic device comprising:
a memory storing at least one instruction; and
And the processor executes the instructions stored in the memory to realize the communication connection method.
A computer-readable storage medium having stored therein at least one instruction for execution by a processor in an electronic device to implement the communication connection method.
According to the technical scheme, the method and the device can select the preset communication pipeline to be connected with the upper computer, receive the connection request received from the upper computer in the preset connection window when the electronic equipment executes the process, check the connection request to ensure the reliability of the connection request, and when the connection request passes the check, determine the communication protocol type of the connection request, start the preset communication pipeline to establish connection with the upper computer so as to realize the rapid establishment of the communication connection with the upper computer.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the communication connection method of the present invention.
FIG. 2 is a schematic diagram of an execution process of the present invention.
Fig. 3 is a functional block diagram of a preferred embodiment of the communication connection device of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing a communication connection method.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flow chart of a preferred embodiment of the communication connection method of the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The communication connection method is applied to one or more electronic devices, wherein the electronic devices are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware of the electronic devices comprises, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (Field-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices and the like.
The electronic device may be any electronic product that can interact with a user in a human-computer manner, such as a personal computer, tablet computer, smart phone, personal digital assistant (Personal Digital Assistant, PDA), game console, interactive internet protocol television (Internet Protocol Television, IPTV), smart wearable device, etc.
The electronic device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The network in which the electronic device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
S10, selecting a preset communication pipeline to be connected with the upper computer.
The preset communication channel refers to a physical communication channel, such as a serial port, an SPI (Serial Peripheral Interface ), an I2C (Inter-Integrated Circuit, serial communication bus), etc., which is determined when the host computer is connected to the electronic device.
S11, when the electronic equipment executes the process, receiving a connection request received from an upper computer in a preset connection window.
In this embodiment, the electronic device communicates with the host computer.
Further, the processes may include various processes of the electronic device during normal operation.
In this embodiment, the connection request is sent by the upper computer to the electronic device at intervals of a preset period.
In this embodiment, the duration of the preset connection window is greater than the preset period, and the difference between the duration of the preset connection window and the preset period is less than or equal to a preset threshold.
And the duration of the preset connection window, the preset period and the preset threshold value can be configured according to actual requirements.
For example: the duration of the preset connection window may be configured to be 25ms, the preset threshold may be configured to be 5ms, and the preset period may be configured to be 20ms.
By the embodiment, the duration of the preset connection window is configured to be longer than the preset period, so that the connection request can be guaranteed to be received, normal connection with an upper computer is prevented from being influenced due to the fact that the connection request is missed, and meanwhile, the duration of the preset connection window is configured to be slightly longer than the preset period, connection waiting time can be effectively reduced, and normal execution of other threads of a system is prevented from being influenced due to long-time connection waiting.
S12, checking the connection request.
In at least one embodiment of the present invention, in order to ensure the reliability of the connection request, the connection request needs to be checked.
Specifically, the verifying the connection request includes:
extracting data of the connection request;
when the data of the connection request is matched with preset data, determining that the connection request passes the verification; or alternatively;
and when the data of the connection request is not matched with the preset data, determining that the connection request fails to pass the verification.
The preset data may be data pre-agreed by the electronic device and the upper computer.
Specifically, different connection requests correspond to different communication protocols, the connection requests are sent by the upper computer according to the requirements of the communication protocols, and the electronic equipment selects the different communication protocols according to the received connection requests; for example, DFU (device firmware upgrade ) may be preset to "CCCC", and connection request data of the test protocol may be preset to "TTTT".
Preferably, the data of the connection request may further include a repeated data sequence, for example, the data of the connection request is 3 consecutive characters "active content", and when the data of the connection request matches with the preset data, only one character string "active content" is required to be matched, that is, the data of the connection request is considered to match with the preset data ", the connection request may be determined to pass the verification.
In at least one embodiment of the invention, the method further comprises:
and when the connection request fails to pass the verification, continuously receiving the connection request received from the upper computer in the preset connection window.
By the embodiment, the receiving can be continuously performed when the connection request is determined to not pass the verification, so that the occurrence of detection omission is avoided.
S13, when the connection request passes the verification, determining the communication protocol type of the connection request.
The communication protocol type refers to a communication protocol type built on a communication pipeline, for example, based on UART (Universal Asynchronous Receiver Transmitter ), and can select either a firmware upgrade protocol or a software test protocol.
The communication protocol types may include, but are not limited to: serial communication, I2C communication, SPI communication, etc.
S14, starting the preset communication pipeline to establish connection with the upper computer.
Specifically, the starting the preset communication pipeline to establish connection with the upper computer includes:
when the preset communication pipeline is serial communication, starting a UART RX pin to establish connection with the upper computer; or alternatively
When the preset communication pipeline is I2C communication, an I2C pin is started to establish connection with the upper computer; or alternatively
And when the preset communication pipeline is SPI communication, starting an SPI pin to establish connection with the upper computer.
For example, the I2C pins may include I2C clock, I2C data, etc., and the SPI pins may include SPI clock, SPI MISO, SPI SS, etc.
By the implementation mode, different pins can be started to be connected with the upper computer according to different communication pipelines, and connection failure is avoided.
Further, the starting the preset communication pipeline to establish connection with the upper computer further includes:
the preset communication pipeline is a wireless pipeline and is in wireless connection with the upper computer; wherein the wireless pipe comprises a BLE broadcast.
In at least one embodiment of the invention, the method further comprises:
and when a connection request is not received from the upper computer in the preset connection window, continuing to execute the process of the electronic equipment.
As shown in fig. 2, a schematic diagram of an execution process is shown, the process being executed by the electronic device is process0 and process1, and the process corresponding to the preset connection window is process connection, after the execution of process0 is finished, the process connection is entered, and when the process connection does not receive a connection request from the upper computer in the preset connection window, the process1 is continuously executed.
By the implementation mode, the problem that a complete connection flow is still required to be operated when no connection request exists can be effectively solved, and corresponding hardware modules and pins do not need to be operated according to the connection flow so as to influence the state of the hardware pins, and further, the influence on the electrical characteristics of devices when other devices are connected to the pins is avoided.
According to the technical scheme, the method and the device can select the preset communication pipeline to be connected with the upper computer, receive the connection request received from the upper computer in the preset connection window when the electronic equipment executes the process, check the connection request to ensure the reliability of the connection request, and when the connection request passes the check, determine the communication protocol type of the connection request, start the preset communication pipeline to establish connection with the upper computer so as to realize the rapid establishment of the communication connection with the upper computer.
Fig. 3 is a functional block diagram of a preferred embodiment of the communication connection device of the present invention. The communication connection device 11 comprises a receiving unit 110, a checking unit 111, a determining unit 112, a connecting unit 113, a selecting unit 114. The module/unit referred to in the present invention refers to a series of computer program segments capable of being executed by the processor 13 and of performing a fixed function, which are stored in the memory 12. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The communication connection device 11 is operated in an electronic device, and the electronic device is in communication with an upper computer, and includes:
the selecting unit 114 selects a preset communication pipe to be connected with the upper computer.
The preset communication channel refers to a physical communication channel, such as a serial port, an SPI (Serial Peripheral Interface ), an I2C (Inter-Integrated Circuit), etc., which is determined when the host computer is connected with the electronic device.
When the electronic device executes the process, the receiving unit 110 receives a connection request received from the upper computer within a preset connection window.
The process may include various processes of the electronic device during normal operation.
In this embodiment, the connection request is sent by the upper computer to the receiving unit 110 at intervals of a preset period.
In this embodiment, the duration of the preset connection window is greater than the preset period, and the difference between the duration of the preset connection window and the preset period is less than or equal to a preset threshold.
And the duration of the preset connection window, the preset period and the preset threshold value can be configured according to actual requirements.
For example: the duration of the preset connection window may be configured to be 25ms, the preset threshold may be configured to be 5ms, and the preset period may be configured to be 20ms.
By the embodiment, the duration of the preset connection window is configured to be longer than the preset period, so that the connection request can be guaranteed to be received, normal connection with an upper computer is prevented from being influenced due to the fact that the connection request is missed, and meanwhile, the duration of the preset connection window is configured to be slightly longer than the preset period, connection waiting time can be effectively reduced, and normal execution of other threads of a system is prevented from being influenced due to long-time connection waiting.
The verification unit 111 verifies the connection request.
In at least one embodiment of the present invention, in order to ensure the reliability of the connection request, the connection request needs to be checked.
Specifically, the checking unit 111 checks that the connection request includes:
extracting data of the connection request;
when the data of the connection request is matched with preset data, determining that the connection request passes the verification; or alternatively;
and when the data of the connection request is not matched with the preset data, determining that the connection request fails to pass the verification.
The preset data may be data pre-agreed by the electronic device and the upper computer.
Specifically, different connection requests correspond to different communication protocols, the connection requests are sent by the upper computer according to the requirements of the communication protocols, and the electronic equipment selects the different communication protocols according to the received connection requests; for example, DFU (device firmware upgrade ) may be preset to "CCCC", and connection request data of the test protocol may be preset to "TTTT".
Preferably, the data of the connection request may further include a repeated data sequence, for example, the data of the connection request is 3 consecutive characters "active content", and when the data of the connection request matches with the preset data, only one character string "active content" is required to be matched, that is, the data of the connection request is considered to match with the preset data ", the connection request may be determined to pass the verification.
In at least one embodiment of the present invention, when the connection request fails to pass the verification, the receiving unit 110 continues to receive the connection request received from the upper computer within the preset connection window.
By the embodiment, the receiving can be continuously performed when the connection request is determined to not pass the verification, so that the occurrence of detection omission is avoided.
When the connection request passes the verification, the determination unit 112 determines the communication protocol type of the connection request.
The communication protocol type refers to a communication protocol type built on a communication pipeline, for example, based on UART (Universal Asynchronous Receiver Transmitter ), and can select either a firmware upgrade protocol or a software test protocol.
The communication protocol types may include, but are not limited to: serial communication, I2C communication, SPI communication, etc.
The connection unit 113 starts the preset communication pipe to establish connection with the upper computer.
Specifically, the enabling of the connection unit 113 to establish connection between the preset communication pipe and the host computer includes:
when the preset communication pipeline is serial communication, starting a UART RX pin to establish connection with the upper computer; or alternatively
When the preset communication pipeline is I2C communication, an I2C pin is started to establish connection with the upper computer; or alternatively
And when the preset communication pipeline is SPI communication, starting an SPI pin to establish connection with the upper computer.
For example, the I2C pins may include I2C clock, I2C data, etc., and the SPI pins may include SPI clock, SPI MISO, SPI SS, etc.
By the implementation mode, different pins can be started to be connected with the upper computer according to different communication pipelines, and connection failure is avoided.
Further, the starting the preset communication pipeline to establish connection with the upper computer further includes:
the preset communication pipeline is a wireless pipeline and is in wireless connection with the upper computer; wherein the wireless pipe comprises a BLE broadcast.
In at least one embodiment of the present invention, when a connection request is not received from the upper computer within the preset connection window, the process of the electronic device is continuously executed.
As shown in fig. 2, the executing process is a process0 and a process1, and the process corresponding to the preset connection window is a protocol connection, after the execution of the process0 is finished, the process is entered into the protocol connection, and when the connection request is not received from the upper computer in the preset connection window, the process1 is continuously executed.
By the implementation mode, the problem that a complete connection flow is still required to be operated when no connection request exists can be effectively solved, and corresponding hardware modules and pins do not need to be operated according to the connection flow so as to influence the state of the hardware pins, and further, the influence on the electrical characteristics of devices when other devices are connected to the pins is avoided.
According to the technical scheme, the method and the device can select the preset communication pipeline to be connected with the upper computer, receive the connection request received from the upper computer in the preset connection window when the electronic equipment executes the process, check the connection request to ensure the reliability of the connection request, and when the connection request passes the check, determine the communication protocol type of the connection request, start the preset communication pipeline to establish connection with the upper computer so as to realize the rapid establishment of the communication connection with the upper computer.
Fig. 4 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing the communication connection method.
The electronic device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program, such as a communication connection program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, the electronic device 1 may be a bus type structure, a star type structure, the electronic device 1 may further comprise more or less other hardware or software than illustrated, or a different arrangement of components, for example, the electronic device 1 may further comprise an input-output device, a network access device, etc.
It should be noted that the electronic device 1 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
The memory 12 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 may in some embodiments be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. The memory 12 may in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 12 may be used not only for storing application software installed in the electronic apparatus 1 and various types of data, such as codes of communication connection programs, but also for temporarily storing data that has been output or is to be output.
The processor 13 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, a combination of various control chips, and the like. The processor 13 is a Control Unit (Control Unit) of the electronic device 1, connects the respective components of the entire electronic device 1 using various interfaces and lines, and executes various functions of the electronic device 1 and processes data by running or executing programs or modules (for example, executing a communication connection program or the like) stored in the memory 12, and calling data stored in the memory 12.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules/units may be a series of instruction segments of a computer program capable of performing a specific function for describing the execution of the computer program in the electronic device 1. For example, the computer program may be divided into a receiving unit 110, a verifying unit 111, a determining unit 112, a connecting unit 113, a selecting unit 114.
The processor 13 executes the operating system of the electronic device 1 and various types of applications installed. The processor 13 executes the application program to implement the steps of the various communication connection method embodiments described above, such as the steps shown in fig. 1.
Alternatively, the processor 13 may implement the functions of the modules/units in the above-described device embodiments when executing the computer program, for example:
selecting a preset communication pipeline to be connected with the upper computer;
when the electronic equipment executes a process, receiving a connection request received from the upper computer in a preset connection window;
checking the connection request;
when the connection request passes the verification, determining the communication protocol type of the connection request;
and starting the preset communication pipeline to establish connection with the upper computer.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor (processor) to perform portions of the communication connection method according to the embodiments of the present invention.
The integrated modules/units of the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on this understanding, the present invention may also be implemented by a computer program for instructing a relevant hardware device to implement all or part of the procedures of the above-mentioned embodiment method, where the computer program may be stored in a computer readable storage medium and the computer program may be executed by a processor to implement the steps of each of the above-mentioned method embodiments.
Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
Further, the computer-usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one arrow is shown in FIG. 3, but only one bus or one type of bus is not shown. The bus is arranged to enable a connection communication between the memory 12 and at least one processor 13 or the like.
Although not shown, the electronic device 1 may further comprise a power source (such as a battery) for powering the various components, which may preferably be logically connected to the at least one processor 13 via a power management means, so as to perform functions such as charge management, discharge management, and power consumption management via the power management means. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
Further, the electronic device 1 may also comprise a network interface, optionally the network interface may comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the electronic device 1 and other electronic devices.
The electronic device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
Fig. 4 shows only an electronic device 1 with components 12-13, it being understood by a person skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In connection with fig. 1, the memory 12 in the electronic device 1 stores a plurality of instructions to implement a method of communication connection, the processor 13 being executable to implement:
selecting a preset communication pipeline to be connected with the upper computer;
when the electronic equipment executes a process, receiving a connection request received from the upper computer in a preset connection window;
checking the connection request;
when the connection request passes the verification, determining the communication protocol type of the connection request;
and starting the preset communication pipeline to establish connection with the upper computer.
Specifically, the specific implementation method of the above instructions by the processor 13 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. A communication connection method applied to an electronic device, wherein the electronic device is in communication with an upper computer, and the method is characterized by comprising the following steps:
selecting a preset communication pipeline to be connected with the upper computer;
when the electronic equipment executes a process, receiving a connection request received from the upper computer in a preset connection window;
checking the connection request;
when the connection request passes the verification, determining the communication protocol type of the connection request;
starting the preset communication pipeline to establish connection with the upper computer;
the verifying the connection request includes:
extracting data of the connection request;
when the data of the connection request is matched with preset data, determining that the connection request passes the verification; or alternatively;
and when the data of the connection request is not matched with the preset data, determining that the connection request fails to pass the verification.
2. The communication connection method according to claim 1, wherein the connection request is transmitted to the electronic device by the host computer every a predetermined period.
3. The communication connection method according to claim 2, wherein a duration of the preset connection window is greater than the preset period, and a difference between the duration of the preset connection window and the preset period is less than or equal to a preset threshold.
4. The method of communication connection of claim 1, wherein the method further comprises:
and when the connection request fails to pass the verification, continuously receiving the connection request received from the upper computer in the preset connection window.
5. The method of communication connection according to claim 1, wherein the starting the preset communication pipe to establish a connection with the host computer comprises:
when the preset communication pipeline is serial communication, starting a UART RX pin to establish connection with the upper computer; or alternatively
When the preset communication pipeline is I2C communication, an I2C pin is started to establish connection with the upper computer; or alternatively
And when the preset communication pipeline is SPI communication, starting an SPI pin to establish connection with the upper computer.
6. The method for connecting communications according to claim 1, wherein said enabling said predetermined communications pipe to establish a connection with said host computer further comprises:
the preset communication pipeline is a wireless pipeline and is in wireless connection with the upper computer; wherein the wireless pipe comprises a BLE broadcast.
7. The communication connection method according to any one of claims 1 to 6, characterized in that the method further comprises:
and when a connection request is not received from the upper computer in the preset connection window, continuing to execute the process of the electronic equipment.
8. A communication connection apparatus operable with an electronic device, the electronic device being in communication with an upper computer, the apparatus comprising:
the selection unit is used for selecting a preset communication pipeline to be connected with the upper computer;
the receiving unit is used for receiving a connection request received from the upper computer in a preset connection window when the electronic equipment executes a process;
a verification unit, configured to verify the connection request;
a determining unit, configured to determine a communication protocol type of the connection request when the connection request passes a check;
and the connection unit is used for starting the preset communication pipeline to establish connection with the upper computer.
9. An electronic device, the electronic device comprising:
a memory storing at least one instruction; and
A processor executing instructions stored in the memory to implement the communication connection method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized by: the computer-readable storage medium has stored therein at least one instruction that is executed by a processor in an electronic device to implement the communication connection method of any of claims 1 to 7.
CN202010581067.4A 2020-06-23 2020-06-23 Communication connection method, device, equipment and storage medium Active CN113839973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010581067.4A CN113839973B (en) 2020-06-23 2020-06-23 Communication connection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010581067.4A CN113839973B (en) 2020-06-23 2020-06-23 Communication connection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113839973A CN113839973A (en) 2021-12-24
CN113839973B true CN113839973B (en) 2024-04-12

Family

ID=78964037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010581067.4A Active CN113839973B (en) 2020-06-23 2020-06-23 Communication connection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113839973B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1198227A (en) * 1996-07-01 1998-11-04 富士通株式会社 Device and method of controlling intergroup resource utilization
US6859523B1 (en) * 2001-11-14 2005-02-22 Qgenisys, Inc. Universal task management system, method and product for automatically managing remote workers, including assessing the work product and workers
CN102045325A (en) * 2009-10-13 2011-05-04 北京搜狗科技发展有限公司 Input method and system based on network communication
CN102781023A (en) * 2012-07-27 2012-11-14 浙江宇脉科技有限公司 Network optimization method based on time window
WO2012169752A2 (en) * 2011-06-07 2012-12-13 (주)잉카인터넷 Authentication system and method for device attempting connection
CN104092559A (en) * 2014-06-10 2014-10-08 深圳市信锐网科技术有限公司 Method and apparatus for configuring connection parameter information of wireless network
WO2015025189A1 (en) * 2013-08-18 2015-02-26 Yogesh Chunilal Rathod Enable user to establish request data specific connections with other users for communication, participation and collaboration
CN107396290A (en) * 2017-07-25 2017-11-24 上海小蚁科技有限公司 Establish the method and device, storage medium, terminal of WI FI connections

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2135429B1 (en) * 2007-03-16 2017-09-06 BRITISH TELECOMMUNICATIONS public limited company Data transmission scheduler
US8688839B2 (en) * 2011-12-02 2014-04-01 Verizon Patent And Licensing Inc. Intelligent connection manager
EP3255931B1 (en) * 2016-06-07 2019-08-07 Nxp B.V. Configuring wireless communications and an advertising event according to multiple communication protocols
CN107508847B (en) * 2016-06-14 2021-06-08 斑马智行网络(香港)有限公司 Connection establishing method, device and equipment
EP3407147A1 (en) * 2017-05-24 2018-11-28 Siemens Aktiengesellschaft Method for operating a cyclically working automation control, automation control and engineering system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1198227A (en) * 1996-07-01 1998-11-04 富士通株式会社 Device and method of controlling intergroup resource utilization
US6859523B1 (en) * 2001-11-14 2005-02-22 Qgenisys, Inc. Universal task management system, method and product for automatically managing remote workers, including assessing the work product and workers
CN102045325A (en) * 2009-10-13 2011-05-04 北京搜狗科技发展有限公司 Input method and system based on network communication
WO2012169752A2 (en) * 2011-06-07 2012-12-13 (주)잉카인터넷 Authentication system and method for device attempting connection
CN102781023A (en) * 2012-07-27 2012-11-14 浙江宇脉科技有限公司 Network optimization method based on time window
WO2015025189A1 (en) * 2013-08-18 2015-02-26 Yogesh Chunilal Rathod Enable user to establish request data specific connections with other users for communication, participation and collaboration
CN104092559A (en) * 2014-06-10 2014-10-08 深圳市信锐网科技术有限公司 Method and apparatus for configuring connection parameter information of wireless network
CN107396290A (en) * 2017-07-25 2017-11-24 上海小蚁科技有限公司 Establish the method and device, storage medium, terminal of WI FI connections

Also Published As

Publication number Publication date
CN113839973A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
CN111949708B (en) Multi-task prediction method, device, equipment and medium based on time sequence feature extraction
CN112015663B (en) Test data recording method, device, equipment and medium
CN115936886B (en) Failure detection method, device, equipment and medium for heterogeneous securities trading system
WO2022161244A1 (en) Multi-host arbitration method and apparatus, and readable storage medium
CN114070763B (en) Test method, client, server and medium based on improved REST protocol
CN113839973B (en) Communication connection method, device, equipment and storage medium
EP4174642A1 (en) Method and device for installing program
CN112069387B (en) Internet event propagation outbreak prediction method and device, electronic equipment and medium
CN115421793A (en) Display method of starting state and computing equipment
CN113972989B (en) Data verification method, storage medium and electronic equipment
CN110716806B (en) Edge node computing capability determining method, electronic equipment, system and medium
CN110688073B (en) Data storage method, electronic device, system and medium
CN110879743B (en) Task eliminating method, device, system and medium based on edge computing environment
CN116225789B (en) Transaction system backup capability detection method, device, equipment and medium
CN116306591B (en) Flow form generation method, device, equipment and medium
CN116418896B (en) Task execution method, device, equipment and medium based on timer
CN115964307B (en) Automatic test method, device, equipment and medium for transaction data
CN116860508B (en) Distributed system software defect continuous self-healing method, device, equipment and medium
CN112637280B (en) Data transmission method, device, electronic equipment and storage medium
CN116760835B (en) Distributed storage method, device and medium
CN112000945B (en) Authorization method, device, equipment and medium based on artificial intelligence
CN116013311A (en) Edge intelligent voice recognition method and related equipment
CN111950707B (en) Behavior prediction method, device, equipment and medium based on behavior co-occurrence network
CN110716939B (en) Data management method, electronic device, system and medium
CN116017381A (en) Bluetooth connection method, device and medium for air conditioner

Legal Events

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