AT path multiplexing method and device, electronic equipment and readable storage medium
By introducing enhanced transmission mode and transmission head in the AT path, the poor compatibility problem during AT path multiplexing is solved, the separation of AT command response and reported messages is realized, and communication efficiency and system stability are improved.
Patent Information
- Application Number
- CN202411211417.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-01-10
AI Technical Summary
During the AT channel multiplexing, the concurrency of multiple AT channels under the same serial port is not completely isolated from the reported messages, resulting in poor compatibility and increasing system complexity and maintenance costs.
By determining whether the preset AT enhanced transmission mode is turned on, and using the enhanced transmission header for data transmission processing based on different AT transmission application scenarios, it supports the transmission of different types of data and the concurrency of multiple AT processes, and realizes the separation of AT command response and active reporting.
Improves compatibility and scalability of AT multiplexing, simplifies data transmission processing, and reduces system complexity and maintenance costs.
Smart Images

Figure CN119292972A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication transmission technology, and in particular to a multiplexing method, device and electronic device for an AT path. Background Art
[0002] The control plane interaction process between the communication module and the host computer master is mainly completed through AT commands (AT attention: the character command interface between the host computer and the module), and the issuance and response of instructions are realized through serial port transmission. However, the AT command processing follows a wait-and-stop mechanism, that is, the master must wait for the module to return a response after sending an AT command before continuing to send the next command. This serial processing method greatly limits the communication efficiency, especially in scenarios that require frequent interactions. Secondly, the irregular reporting messages (URC) on the module side may be inserted into the response stream of the AT command irregularly, making it difficult for the master control end to distinguish which are direct responses to the AT command and which are messages reported autonomously by the module when parsing the response, thereby causing parsing anomalies and data confusion.
[0003] The existing technology mainly uses multiple physical serial ports to achieve the parallel sending and receiving of multiple AT commands through physical isolation, and sets up dedicated channels to isolate and transmit report messages. Although this method is effective, it puts higher requirements on the hardware design of the main control, increases the complexity and cost of the system, and not all main controls have such hardware conditions. The existing technology also multiplexes a serial port into multiple virtual AT channels through the CMUX protocol to achieve flexible allocation and efficient use of resources, but the design of the CMUX protocol is relatively complex and requires the support of the module end. In actual applications, it is easy to have the problem of incomplete isolation of multiple AT concurrency and report messages under the same serial port, resulting in reduced system compatibility and stability. The main control end also needs to adapt the CMUX protocol in software implementation, which increases development difficulty and maintenance costs.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The present application provides an AT channel multiplexing method, device and electronic device to solve the technical problem of poor compatibility caused by concurrent and reporting isolation of multiple AT channels under the same serial port during AT channel multiplexing.
[0006] According to one aspect of an embodiment of the present application, the present application provides a multiplexing method for an AT path, including: determining whether a preset AT enhanced transmission mode is turned on; if so, obtaining a current AT transmission application scenario; and performing data transmission processing based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode.
[0007] Optionally, after determining whether the preset AT enhanced transmission mode is turned on, it includes: if the preset AT enhanced transmission mode is turned on, the communication module extracts the AT enhanced transmission mode parameters in the special AT instruction; the communication module sets parameters based on the AT enhanced transmission mode parameters, and the AT enhanced transmission mode parameters include the maximum number of concurrent transmissions and the maximum single transmission length.
[0008] Optionally, the current AT transmission application scenario includes a normal AT command, and the data transmission processing is performed based on the processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode, including: adding a first type of enhanced transmission header to the AT command sent to the communication module; receiving return data returned by the communication module carrying the first type of enhanced transmission header; judging the data type of the return data based on the first type of enhanced transmission header; matching the corresponding AT command based on the data type and the current AT session ID in the first type of enhanced transmission header.
[0009] Optionally, the current AT transmission application scenario includes AT active reporting, and the data transmission processing is performed based on the processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode, including: receiving reporting data sent by the communication module and carrying a second type enhanced transmission header; determining type information of the second type transmission header; and processing the reporting data based on the type information.
[0010] Optionally, the current AT transmission application scenario includes an ultra-long AT return segment, and the data transmission processing is performed based on the processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode, including: adding a first type of enhanced transmission header to the AT command sent to the module; processing the AT command, and if the AT command is greater than the maximum single return length or greater than the internal cache size of the module, performing a segmented return; receiving the return data carrying the first type of enhanced transmission header returned by the communication module in segments; processing the return data returned in segments in segments, or caching the return data in segments until the AT response result code is received and then processing the cached return data.
[0011] Optionally, the current AT transmission application scenario includes a data input mode, and the data transmission processing is performed based on the processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode, including: sending an AT data instruction to the communication module based on the current session ID to enter the data mode; receiving the data mode prompt returned by the communication module; sending original data based on the fourth type enhanced transmission header; receiving the AT result code returned by the communication module according to the original data carrying the fourth type enhanced transmission header.
[0012] Optionally, the determination of whether the preset AT enhanced transmission mode is turned on includes: sending an AT test command with an AT enhanced transmission header to the communication module; receiving AT test response data fed back by the communication module; and determining whether the preset AT enhanced transmission mode is turned on based on the AT test response data.
[0013] According to another aspect of an embodiment of the present application, the present application provides an AT path multiplexing device, including: a transmission mode judgment module, used to judge whether a preset AT enhanced transmission mode is turned on; a transmission scenario acquisition module, used to obtain a current AT transmission application scenario; a data transmission processing module, used to perform data transmission processing based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode.
[0014] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the steps of the above method are implemented when the processor executes the computer program.
[0015] According to another aspect of an embodiment of the present application, the present application also provides a computer-readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to execute the above method.
[0016] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:
[0017] The present application is based on the AT command channel extension enhanced transmission mode, and supports different types of data to be transmitted using the AT channel by enhancing the Type field in the transmission header. The master control can easily separate the module active reporting and AT command response, and realize multiple AT process concurrency by enhancing the Session field in the transmission header, which can realize AT concurrency, data transmission, and separation of AT command response and AT active reporting, thereby improving the compatibility of AT multiplexing and having good scalability. By enhancing the Type field in the transmission header, more service types can be supported on the AT channel. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] Figure 1 A schematic diagram of a hardware environment of an AT path multiplexing method provided according to an embodiment of the present application;
[0021] Figure 2 A schematic diagram of a multiplexing method for an AT path according to an embodiment of the present application;
[0022] Figure 3 A block diagram of an AT path multiplexing device provided according to an embodiment of the present application;
[0023] Figure 4 A schematic diagram of an optional electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0025] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.
[0026] In the related art, in the AT command transmission, since multiple physical serial ports or complex CMUX protocols are relied on to implement multiple AT channels and isolate the reporting messages, there are problems of hardware design or software implementation limitations and poor compatibility.
[0027] In order to solve the problem mentioned in the background technology, according to one aspect of an embodiment of the present application, an embodiment of a multiplexing method of an AT path is provided.
[0028] Optionally, in the embodiment of the present application, the above method can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1 As shown, the server 103 is connected to the terminal 101 via a network, and can be used to provide services for the terminal or a client installed on the terminal. A database 105 can be set on the server or independently of the server to provide data storage services for the server 103. The above-mentioned network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 includes but is not limited to a PC, a mobile phone, a tablet computer, etc.
[0029] An AT channel multiplexing method in the embodiment of the present application can be executed by the server 103, or can be executed by the server 103 and the terminal 101 together, such as Figure 2 As shown, the method may include the following steps:
[0030] S202: Determine whether the preset AT enhanced transmission mode is enabled.
[0031] Specifically, S202 includes:
[0032] Send an AT test command with an AT enhanced transmission header to the communication module;
[0033] Receive AT test response data fed back by the communication module;
[0034] Determine whether the preset AT enhanced transmission mode is enabled according to the AT test response data.
[0035] The AT path represents a data transmission channel between the host (host computer) and the communication module. This embodiment mainly implements the multiplexing function of the AT path between the host and the communication module through the AT path enhanced transmission mode.
[0036] In the above embodiment, by sending an AT test command with an AT enhanced transmission header and receiving response data fed back by the communication module, accurate information about whether the preset AT enhanced transmission mode is turned on can be obtained in real time, which helps to quickly diagnose problems or confirm configuration status, thereby improving the response speed and accuracy of the system.
[0037] Further, if the preset AT enhanced transmission mode is turned on, the communication module extracts the AT enhanced transmission mode parameters in the special AT command;
[0038] The communication module performs parameter setting based on the AT enhanced transmission mode parameters, where the AT enhanced transmission mode parameters include a maximum number of concurrent messages and a single maximum transmission length.
[0039] Before determining whether the preset AT enhanced transmission mode is turned on, it also includes: sending an AT special instruction to the communication module for controlling the preset AT enhanced transmission mode to turn on the AT special instruction, where the AT special instruction is "AT+ETMODE", where "AT" represents the data transmission channel between the host and the module, and "ETMODE" represents the enhanced transmission mode. When the preset enhanced transmission mode between the host and the communication module needs to be turned on, set "AT+ETMODE=1[OPTION]", where "[OPTION]" is used to set the maximum concurrency number and the single maximum transmission length of the preset AT enhanced transmission mode, where the maximum concurrency number refers to the maximum number of AT instructions that the communication module can process or perform simultaneously in the preset AT enhanced transmission mode. The single maximum transmission length refers to the maximum value of the amount of data allowed to be transmitted in an AT command transmission session, which limits the maximum number of bytes or data packets that can be contained in each transmission.
[0040] In the traditional AT communication mode, only one AT command or data transmission task may be processed at a time, and the next one can only be processed after the task is completed. In the preset AT enhanced transmission mode of this embodiment, by increasing the maximum number of concurrencies, multiple tasks can be allowed to be processed simultaneously, greatly improving the communication efficiency and throughput of the AT path. In the absence of a preset AT enhanced transmission mode, the amount of data transmitted in a single time may be limited by hardware or protocols, resulting in the need to divide a large amount of data into multiple small data packets for multiple transmissions when transmitting, which not only increases the complexity of transmission, but also may affect the efficiency and reliability of transmission. By increasing the maximum single transmission length in the preset AT enhanced transmission mode, more data can be allowed to be transmitted in a single time, reducing the number of transmissions, thereby improving transmission efficiency and reducing transmission delays.
[0041] In this embodiment, it is also necessary to set the specific prefix identifier of all AT commands sent and received under the AT special instruction "AT+ETMODE=1" to "ET <type> <sessionid> - <length>,<AT Content> ", where ET stands for AT enhanced transport header tag; <type>Indicates the transmission type. SessionID indicates the current AT session ID. SessionID is maintained by the session initiator. All activated AT sessions need to use different SessionIDs. The corresponding SessionID is released after the session ends. After the SessionID is released, it is decided whether to continue to reuse it based on different processing strategies. Length indicates the length of the subsequent AT Content. AT Content indicates the data transmitted by the original AT channel. For example, when the original AT command is "AT+COPS?"\r", the enhanced transmission command obtained is "ETC001-0009AT+COPS?"\r", and the command returned by the original AT command is "\r\n+COPS:0,2,"46000",7\r\n\r\nOK\r\n". When the original report message is "\r\n+SIM:Inserted\r\n,\r\n+SIM READY\r\n", the corresponding AT enhanced transmission report message is "ETI001-0018\r\n+SIM:Inserted\r\n,ETI002-0014\r\n+SIM READY\r\n".
[0042] S204, if the AT enhanced transmission mode is preset, the current AT transmission application scenario is obtained, and the current AT transmission application scenario includes a normal AT command, an AT active report, an extra-long AT return segment, and a data input mode.
[0043] S206: Perform data transmission processing based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode.
[0044] Specifically, when the current AT transmission application scenario includes a normal AT command, S206 includes:
[0045] Adding a first type enhanced transmission header to the AT command sent to the communication module;
[0046] receiving return data carrying the first type enhanced transmission header returned by the communication module;
[0047] Determining the data type of the returned data based on the first type enhanced transmission header;
[0048] The corresponding AT command is matched based on the data type and the current AT session ID in the first type enhanced transmission header.
[0049] In this embodiment, the host first adds a first type enhanced transmission header to the AT command sent to the communication module, and the communication module also adds a first type enhanced transmission header to the corresponding AT return command. The current session ID (SessionID) in the first type transmission header of the AT return command of the communication module needs to be consistent with the current session ID of the corresponding AT command. After the host receives the return data with the first type enhanced transmission header sent by the communication module, it determines the data type of the return data according to the first type enhanced transmission header carried by the return data, and matches the corresponding AT command based on the data type of the return data and the current AT session ID in the first type enhanced transmission header. Through the current session ID, the host can perform the process of concurrently executing multiple AT commands.
[0050] In the above embodiment, by adding the first type enhanced transmission header to the AT command and the corresponding return data, it can be ensured that the host can accurately associate the returned AT command with the previously sent AT command, and can effectively avoid data confusion and mismatching problems that may occur in concurrent communication or complex communication environments. The introduction of the current session ID enables the host to process multiple AT commands concurrently at the same time. In complex communication scenarios, the host may need to conduct multiple sessions or requests with the communication module at the same time. By assigning a unique current session ID to each session, the host can efficiently manage and track these sessions, thereby improving communication efficiency and system performance. Based on the first type enhanced transmission header to determine the data type of the returned data, the host can handle different types of returned data more flexibly. If an error or abnormality occurs during the communication process, the host can quickly locate the problem by checking the information in the first type enhanced transmission header.
[0051] Specifically, when the current AT transmission application scenario is AT active reporting, S206 includes:
[0052] receiving reporting data carrying a second type enhanced transmission header sent by a communication module;
[0053] Determining type information of the second type transmission header;
[0054] The reported data is processed based on the type information.
[0055] In this embodiment, the reported data carrying the second type transmission header sent by the communication module includes the URC (unsolicited result code) in the AT command. When a specific event occurs, the Tongxi module actively sends the above URC to the host, and the host does not need to send a request command to the communication module first. For example, when there is an incoming call, a new text message is received, or the communication module needs to notify other specific events of the host, the communication module will send the URC to the host. The host determines the status of the communication module or the specific event that has occurred through the URC, and there is no need to send a query command to the host in advance.
[0056] In the above embodiment, the communication module can send URC to the host when a specific event occurs, without waiting for the host to send a query command. The active reporting mechanism can improve the real-time response capability of the system, so that the host can obtain the status of the communication module or the specific event that has occurred more quickly. The second type of enhanced transmission header ensures the integrity and accuracy of the URC data, helps to reduce errors and packet loss during data transmission, and enhances the reliability and stability of the system. The host directly processes the URC according to the type information in the second type of enhanced transmission header, without having to parse the entire URC message to determine its type, which simplifies the processing logic of the host and improves processing efficiency.
[0057] Specifically, when the current AT transmission application scenario is an ultra-long AT return segment, S206 includes:
[0058] Add the first type of enhanced transmission header to the AT command sent to the module;
[0059] Processing the AT command, if the AT command is larger than the maximum single return length or larger than the module internal buffer size, returning the command in segments;
[0060] receiving the return data carrying the first type enhanced transmission header returned by the communication module in segments;
[0061] The returned data is processed in segments, or the returned data is buffered in segments until an AT response result code is received and then the buffered returned data is processed.
[0062] In this embodiment, the host first adds a first type of enhanced transmission header to the AT command sent to the communication module. After receiving the AT command with the first type of enhanced transmission header added, the communication module processes it. If the AT return data exceeds the maximum single return length or the module internal return buffer size, the AT response data is returned in segments. After all the AT response data are returned in segments, the AT response result code is returned to end the AT session. After receiving the AT response data, the host chooses to process the AT response data in segments, that is, after receiving a segment of AT response data, it processes it, and then receives the next segment of AT response data and processes it, until all AT response data are processed. In other real-time methods of the present application, the AT response data can also be processed after all AT response data are received and the final result code is received.
[0063] In the above embodiment, through the segmented return mechanism, the host can choose to process each segment of the returned data immediately according to the actual situation, or cache all the data first and then process them uniformly after the final result code arrives, which can achieve optimization according to different application scenarios and performance requirements. When the return data of the AT command exceeds the maximum single return length or the internal cache size of the module, the segmented return mechanism can ensure that all data can be transmitted to the host completely and reliably, reducing the risk of transmission failure or data loss caused by excessive single transmission data volume. For AT commands that need to process a large amount of return data, the segmented return mechanism can avoid the situation where system performance is degraded due to processing a large amount of data at one time.
[0064] Specifically, when the current AT transmission application scenario is a data input mode, S206 includes:
[0065] Send AT data command to the communication module based on the current session ID to enter data mode;
[0066] Receive the data mode prompt returned by the communication module;
[0067] Sending original data based on the fourth type of enhanced transmission header;
[0068] An AT result code is received which is returned by the communication module according to the original data carrying the fourth type enhanced transmission header.
[0069] In this embodiment, the host sends an AT data instruction to the communication module based on the current session ID to enter the data mode. After entering the data mode, the original binary data can be sent. Taking the AT+DATA command as an example, the current session ID is "Session 003", the AT data instruction is "AT+DATA", and the host uses "Session 003" to send "AT+DATA" to the communication module to enter the data mode, and indicates the number of bytes to be sent, for example, the number of bytes to be sent is 100 bytes. After the communication module receives the AT data instruction "AT+DATA" sent by the host, it returns a data mode prompt to the host to notify the host that it has entered the data mode, and the data mode prompt is "\r\n>\r\n". After receiving the data mode prompt "\r\n>\r\n", the host uses the fourth type of enhanced transmission header to send the original data to the communication module. After the communication module receives the original data, it sends a T result code carrying the original data of the fourth type of enhanced transmission header to the host.
[0070] In the above embodiment, by using the current session ID to identify and manage different communication sessions, the correct transmission and reception of data is ensured, and data confusion and errors can be effectively avoided in complex or concurrent communication environments. The host can directly enter the data mode by sending the AT data instruction and specifying the number of bytes to be sent, without additional configuration, simplifying the data input process and improving communication efficiency. By introducing the data mode prompt, the host can clearly determine when to start sending the original data, thereby enhancing the data transmission efficiency. The fourth type of enhanced transmission header helps the communication module to verify when receiving data, thereby improving the reliability of data transmission. After receiving the original data, the communication module sends the AT result code carrying the fourth type of enhanced transmission header to the host. This feedback mechanism enables the host to determine the execution of the AT command in a timely manner, so as to perform corresponding processing or response. The data mode enables the host to send original binary data to the communication module, expands the application scope of AT communication, and can support richer data types and communication protocols.
[0071] When the data transmission process is completed, the host sends an AT special command for closing the preset AT enhanced transmission mode to the communication, and the AT special command for closing the preset AT enhanced transmission mode is "AT+ETMODE=0".
[0072] According to another aspect of the embodiment of the present application, Figure 3 As shown, a multiplexing device of AT is provided, comprising:
[0073] The transmission mode determination module 301 is used to determine whether the preset AT enhanced transmission mode is turned on;
[0074] The transmission scenario acquisition module 303 is used to acquire the current AT transmission application scenario;
[0075] The data transmission processing module 305 is used to perform data transmission processing based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode.
[0076] It should be noted that the transmission mode judgment module 301 in this embodiment can be used to execute step S202 in the embodiment of the present application, the transmission scene acquisition module 303 in this embodiment can be used to execute step S204 in the embodiment of the present application, and the data transmission processing module 305 in this embodiment can be used to execute step S206 in the embodiment of the present application.
[0077] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.
[0078] According to another aspect of the embodiments of the present application, the present application provides an electronic device, such as Figure 4 As shown, it includes a memory 402, a processor 403, a communication interface 404 and a communication bus 405. The memory 402 stores a computer program that can be run on the processor 404. The memory 402 and the processor 404 communicate through the communication interface 406 and the communication bus 408. When the processor 404 executes the computer program, the steps of the above method are implemented.
[0079] The electronic device provided in the embodiment of the present application may specifically be a module capable of realizing a communication function or a terminal device including the module, etc. The terminal device may be a mobile terminal or a smart terminal. The mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a laptop computer, etc.; the smart terminal may specifically be a terminal including a wireless communication module such as a smart car, a smart watch, a shared bicycle, a smart cabinet, etc.; the module may specifically be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, and a NB-IOT communication module.
[0080] The memory and processor in the above electronic device communicate through the communication bus and the communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0081] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0082] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0083] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any of the above embodiments.
[0084] Optionally, in an embodiment of the present application, the computer-readable medium is configured to store program codes for the processor to execute the following steps:
[0085] S202, determining whether the preset AT enhanced transmission mode is enabled;
[0086] S204, if the preset AT enhanced transmission mode is turned on, obtaining the current AT transmission application scenario;
[0087] S206: Perform data transmission processing based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode.
[0088] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0089] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.
[0090] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions of the present application, or a combination thereof.
[0091] For software implementation, the technology of this article can be implemented by a unit that performs the functions of this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0092] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0093] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0094] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0096] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0097] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0098] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.< / type> < / length> < / sessionid> < / type>
Claims
1. A multiplexing method for an AT channel, characterized in that: include: Determine whether the preset AT enhanced transmission mode is enabled; If yes, then obtain the current AT transmission application scenario; Data transmission processing is performed based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode.
2. The AT path multiplexing method according to claim 1, characterized in that: After determining whether the preset AT enhanced transmission mode is turned on, the method includes: If the preset AT enhanced transmission mode is turned on, the communication module extracts the AT enhanced transmission mode parameters in the special AT command; The communication module performs parameter setting based on the AT enhanced transmission mode parameters, where the AT enhanced transmission mode parameters include a maximum number of concurrent messages and a single maximum transmission length.
3. The AT path multiplexing method according to claim 1, characterized in that: The current AT transmission application scenario includes a normal AT command, and the data transmission processing is performed based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode, including: Adding a first type enhanced transmission header to the AT command sent to the communication module; receiving return data carrying the first type enhanced transmission header returned by the communication module; Determining the data type of the returned data based on the first type enhanced transmission header; The corresponding AT command is matched based on the data type and the current AT session ID in the first type enhanced transmission header.
4. The AT path multiplexing method according to claim 1, characterized in that: The current AT transmission application scenario includes an AT active report, and the data transmission processing is performed based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode, including: receiving reporting data carrying a second type enhanced transmission header sent by a communication module; Determining type information of the second type transmission header; The reported data is processed based on the type information.
5. The AT path multiplexing method according to claim 1, characterized in that: The current AT transmission application scenario includes an extra-long AT return segment, and the data transmission processing is performed based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode, including: Add the first type of enhanced transmission header to the AT command sent to the module; Processing the AT command, if the AT command is larger than the maximum single return length or larger than the module internal buffer size, returning the command in segments; receiving the return data carrying the first type enhanced transmission header returned by the communication module in segments; The returned data is processed in segments, or the returned data is buffered in segments until an AT response result code is received and then the buffered returned data is processed.
6. The AT path multiplexing method according to claim 1, characterized in that: The current AT transmission application scenario includes a data input mode, and the data transmission processing is performed based on a processing method corresponding to the current AT transmission application scenario in the preset AT enhanced transmission mode, including: Send AT data command to the communication module based on the current session ID to enter data mode; Receive the data mode prompt returned by the communication module; Sending original data based on the fourth type of enhanced transmission header; An AT result code is received which is returned by the communication module according to the original data carrying the fourth type enhanced transmission header.
7. The AT path multiplexing method according to claim 1, characterized in that: The determining whether the preset AT enhanced transmission mode is turned on includes: Send an AT test command with an AT enhanced transmission header to the communication module; Receive AT test response data fed back by the communication module; Determine whether the preset AT enhanced transmission mode is enabled according to the AT test response data.
8. A multiplexing device for an AT channel, characterized in that: include: A transmission mode determination module, used to determine whether the preset AT enhanced transmission mode is turned on; The transmission scenario acquisition module is used to obtain the current AT transmission application scenario; The data transmission processing module is used to perform data transmission processing based on a processing method corresponding to the current AT transmission application scenario in a preset AT enhanced transmission mode.
9. An electronic device, comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate through the communication bus and the communication interface, characterized in that: When the processor executes the computer program, the AT path multiplexing method described in any one of claims 1 to 7 is implemented.
10. A readable storage medium storing program instructions, when the program instructions are read and executed by a computing device, the computing device executes the AT path multiplexing method according to any one of claims 1 to 7.